Add new error for system errors that are retryable

Some issues require a system error to be raised that
indicates we should retry the process. This adds a new
error and bumps the version of the api for future use.

Test: atest keystore2_test
Bug: 238619180
Change-Id: Iff8fa83f7b223e08de9fa31434e16aa3aa2153f6
This commit is contained in:
Shaquille Johnson 2024-01-03 18:30:11 +00:00
parent 46531afc61
commit ac3c2cdea4
4 changed files with 27 additions and 28 deletions

View file

@ -41,7 +41,7 @@ cc_library {
], ],
shared_libs: [ shared_libs: [
"android.system.keystore2-V3-ndk", "android.system.keystore2-V4-ndk",
"libbinder_ndk", "libbinder_ndk",
"libcrypto", "libcrypto",
"libcutils", "libcutils",

View file

@ -23,8 +23,8 @@ package {
aidl_interface { aidl_interface {
name: "android.security.attestationmanager", name: "android.security.attestationmanager",
srcs: [ "android/security/attestationmanager/*.aidl", ], srcs: ["android/security/attestationmanager/*.aidl"],
imports: [ "android.hardware.security.keymint-V3" ], imports: ["android.hardware.security.keymint-V3"],
unstable: true, unstable: true,
backend: { backend: {
java: { java: {
@ -36,13 +36,13 @@ aidl_interface {
ndk: { ndk: {
enabled: true, enabled: true,
apps_enabled: false, apps_enabled: false,
} },
}, },
} }
aidl_interface { aidl_interface {
name: "android.security.authorization", name: "android.security.authorization",
srcs: [ "android/security/authorization/*.aidl" ], srcs: ["android/security/authorization/*.aidl"],
imports: [ imports: [
"android.hardware.security.keymint-V3", "android.hardware.security.keymint-V3",
"android.hardware.security.secureclock-V1", "android.hardware.security.secureclock-V1",
@ -58,13 +58,13 @@ aidl_interface {
ndk: { ndk: {
enabled: true, enabled: true,
apps_enabled: false, apps_enabled: false,
} },
}, },
} }
aidl_interface { aidl_interface {
name: "android.security.apc", name: "android.security.apc",
srcs: [ "android/security/apc/*.aidl" ], srcs: ["android/security/apc/*.aidl"],
unstable: true, unstable: true,
backend: { backend: {
java: { java: {
@ -75,13 +75,13 @@ aidl_interface {
}, },
ndk: { ndk: {
enabled: true, enabled: true,
} },
}, },
} }
aidl_interface { aidl_interface {
name: "android.security.compat", name: "android.security.compat",
srcs: [ "android/security/compat/*.aidl" ], srcs: ["android/security/compat/*.aidl"],
imports: [ imports: [
"android.hardware.security.keymint-V3", "android.hardware.security.keymint-V3",
"android.hardware.security.secureclock-V1", "android.hardware.security.secureclock-V1",
@ -104,9 +104,9 @@ aidl_interface {
aidl_interface { aidl_interface {
name: "android.security.maintenance", name: "android.security.maintenance",
srcs: [ "android/security/maintenance/*.aidl" ], srcs: ["android/security/maintenance/*.aidl"],
imports: [ imports: [
"android.system.keystore2-V3", "android.system.keystore2-V4",
], ],
unstable: true, unstable: true,
backend: { backend: {
@ -119,13 +119,13 @@ aidl_interface {
ndk: { ndk: {
enabled: true, enabled: true,
apps_enabled: false, apps_enabled: false,
} },
}, },
} }
aidl_interface { aidl_interface {
name: "android.security.legacykeystore", name: "android.security.legacykeystore",
srcs: [ "android/security/legacykeystore/*.aidl" ], srcs: ["android/security/legacykeystore/*.aidl"],
unstable: true, unstable: true,
backend: { backend: {
java: { java: {
@ -137,15 +137,15 @@ aidl_interface {
ndk: { ndk: {
enabled: true, enabled: true,
apps_enabled: false, apps_enabled: false,
} },
}, },
} }
aidl_interface { aidl_interface {
name: "android.security.metrics", name: "android.security.metrics",
srcs: [ "android/security/metrics/*.aidl" ], srcs: ["android/security/metrics/*.aidl"],
imports: [ imports: [
"android.system.keystore2-V3", "android.system.keystore2-V4",
], ],
unstable: true, unstable: true,
backend: { backend: {
@ -158,7 +158,7 @@ aidl_interface {
ndk: { ndk: {
enabled: true, enabled: true,
apps_enabled: false, apps_enabled: false,
} },
}, },
} }
@ -168,21 +168,21 @@ aidl_interface {
java_defaults { java_defaults {
name: "keystore2_use_latest_aidl_java_static", name: "keystore2_use_latest_aidl_java_static",
static_libs: [ static_libs: [
"android.system.keystore2-V3-java-source" "android.system.keystore2-V4-java-source",
], ],
} }
java_defaults { java_defaults {
name: "keystore2_use_latest_aidl_java_shared", name: "keystore2_use_latest_aidl_java_shared",
libs: [ libs: [
"android.system.keystore2-V3-java-source" "android.system.keystore2-V4-java-source",
], ],
} }
java_defaults { java_defaults {
name: "keystore2_use_latest_aidl_java", name: "keystore2_use_latest_aidl_java",
libs: [ libs: [
"android.system.keystore2-V3-java" "android.system.keystore2-V4-java",
], ],
} }
@ -192,38 +192,37 @@ java_defaults {
cc_defaults { cc_defaults {
name: "keystore2_use_latest_aidl_ndk_static", name: "keystore2_use_latest_aidl_ndk_static",
static_libs: [ static_libs: [
"android.system.keystore2-V3-ndk", "android.system.keystore2-V4-ndk",
], ],
} }
cc_defaults { cc_defaults {
name: "keystore2_use_latest_aidl_ndk_shared", name: "keystore2_use_latest_aidl_ndk_shared",
shared_libs: [ shared_libs: [
"android.system.keystore2-V3-ndk", "android.system.keystore2-V4-ndk",
], ],
} }
cc_defaults { cc_defaults {
name: "keystore2_use_latest_aidl_cpp_shared", name: "keystore2_use_latest_aidl_cpp_shared",
shared_libs: [ shared_libs: [
"android.system.keystore2-V3-cpp", "android.system.keystore2-V4-cpp",
], ],
} }
cc_defaults { cc_defaults {
name: "keystore2_use_latest_aidl_cpp_static", name: "keystore2_use_latest_aidl_cpp_static",
static_libs: [ static_libs: [
"android.system.keystore2-V3-cpp", "android.system.keystore2-V4-cpp",
], ],
} }
// A rust_defaults that includes the latest Keystore2 AIDL library. // A rust_defaults that includes the latest Keystore2 AIDL library.
// Modules that depend on Keystore2 directly can include this rust_defaults to avoid // Modules that depend on Keystore2 directly can include this rust_defaults to avoid
// managing dependency versions explicitly. // managing dependency versions explicitly.
rust_defaults { rust_defaults {
name: "keystore2_use_latest_aidl_rust", name: "keystore2_use_latest_aidl_rust",
rustlibs: [ rustlibs: [
"android.system.keystore2-V3-rust", "android.system.keystore2-V4-rust",
], ],
} }

View file

@ -1,7 +1,7 @@
<manifest version="1.0" type="framework"> <manifest version="1.0" type="framework">
<hal format="aidl"> <hal format="aidl">
<name>android.system.keystore2</name> <name>android.system.keystore2</name>
<version>3</version> <version>4</version>
<interface> <interface>
<name>IKeystoreService</name> <name>IKeystoreService</name>
<instance>default</instance> <instance>default</instance>

View file

@ -46,7 +46,7 @@ rust_defaults {
"libkeystore-engine", "libkeystore-engine",
], ],
shared_libs: [ shared_libs: [
"android.system.keystore2-V3-ndk", "android.system.keystore2-V4-ndk",
"libbase", "libbase",
"libcrypto", "libcrypto",
"libkeymaster_portable", "libkeymaster_portable",