From ac3c2cdea4ce4f4d465c96d425da94716474aa48 Mon Sep 17 00:00:00 2001 From: Shaquille Johnson Date: Wed, 3 Jan 2024 18:30:11 +0000 Subject: [PATCH] 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 --- keystore-engine/Android.bp | 2 +- keystore2/aidl/Android.bp | 49 +++++++++---------- .../android.system.keystore2-service.xml | 2 +- keystore2/test_utils/Android.bp | 2 +- 4 files changed, 27 insertions(+), 28 deletions(-) diff --git a/keystore-engine/Android.bp b/keystore-engine/Android.bp index 88ae016c..7fbfe53a 100644 --- a/keystore-engine/Android.bp +++ b/keystore-engine/Android.bp @@ -41,7 +41,7 @@ cc_library { ], shared_libs: [ - "android.system.keystore2-V3-ndk", + "android.system.keystore2-V4-ndk", "libbinder_ndk", "libcrypto", "libcutils", diff --git a/keystore2/aidl/Android.bp b/keystore2/aidl/Android.bp index 8f5c13b0..c297a158 100644 --- a/keystore2/aidl/Android.bp +++ b/keystore2/aidl/Android.bp @@ -23,8 +23,8 @@ package { aidl_interface { name: "android.security.attestationmanager", - srcs: [ "android/security/attestationmanager/*.aidl", ], - imports: [ "android.hardware.security.keymint-V3" ], + srcs: ["android/security/attestationmanager/*.aidl"], + imports: ["android.hardware.security.keymint-V3"], unstable: true, backend: { java: { @@ -36,13 +36,13 @@ aidl_interface { ndk: { enabled: true, apps_enabled: false, - } + }, }, } aidl_interface { name: "android.security.authorization", - srcs: [ "android/security/authorization/*.aidl" ], + srcs: ["android/security/authorization/*.aidl"], imports: [ "android.hardware.security.keymint-V3", "android.hardware.security.secureclock-V1", @@ -58,13 +58,13 @@ aidl_interface { ndk: { enabled: true, apps_enabled: false, - } + }, }, } aidl_interface { name: "android.security.apc", - srcs: [ "android/security/apc/*.aidl" ], + srcs: ["android/security/apc/*.aidl"], unstable: true, backend: { java: { @@ -75,13 +75,13 @@ aidl_interface { }, ndk: { enabled: true, - } + }, }, } aidl_interface { name: "android.security.compat", - srcs: [ "android/security/compat/*.aidl" ], + srcs: ["android/security/compat/*.aidl"], imports: [ "android.hardware.security.keymint-V3", "android.hardware.security.secureclock-V1", @@ -104,9 +104,9 @@ aidl_interface { aidl_interface { name: "android.security.maintenance", - srcs: [ "android/security/maintenance/*.aidl" ], + srcs: ["android/security/maintenance/*.aidl"], imports: [ - "android.system.keystore2-V3", + "android.system.keystore2-V4", ], unstable: true, backend: { @@ -119,13 +119,13 @@ aidl_interface { ndk: { enabled: true, apps_enabled: false, - } + }, }, } aidl_interface { name: "android.security.legacykeystore", - srcs: [ "android/security/legacykeystore/*.aidl" ], + srcs: ["android/security/legacykeystore/*.aidl"], unstable: true, backend: { java: { @@ -137,15 +137,15 @@ aidl_interface { ndk: { enabled: true, apps_enabled: false, - } + }, }, } aidl_interface { name: "android.security.metrics", - srcs: [ "android/security/metrics/*.aidl" ], + srcs: ["android/security/metrics/*.aidl"], imports: [ - "android.system.keystore2-V3", + "android.system.keystore2-V4", ], unstable: true, backend: { @@ -158,7 +158,7 @@ aidl_interface { ndk: { enabled: true, apps_enabled: false, - } + }, }, } @@ -168,21 +168,21 @@ aidl_interface { java_defaults { name: "keystore2_use_latest_aidl_java_static", static_libs: [ - "android.system.keystore2-V3-java-source" + "android.system.keystore2-V4-java-source", ], } java_defaults { name: "keystore2_use_latest_aidl_java_shared", libs: [ - "android.system.keystore2-V3-java-source" + "android.system.keystore2-V4-java-source", ], } java_defaults { name: "keystore2_use_latest_aidl_java", libs: [ - "android.system.keystore2-V3-java" + "android.system.keystore2-V4-java", ], } @@ -192,38 +192,37 @@ java_defaults { cc_defaults { name: "keystore2_use_latest_aidl_ndk_static", static_libs: [ - "android.system.keystore2-V3-ndk", + "android.system.keystore2-V4-ndk", ], } cc_defaults { name: "keystore2_use_latest_aidl_ndk_shared", shared_libs: [ - "android.system.keystore2-V3-ndk", + "android.system.keystore2-V4-ndk", ], } cc_defaults { name: "keystore2_use_latest_aidl_cpp_shared", shared_libs: [ - "android.system.keystore2-V3-cpp", + "android.system.keystore2-V4-cpp", ], } cc_defaults { name: "keystore2_use_latest_aidl_cpp_static", static_libs: [ - "android.system.keystore2-V3-cpp", + "android.system.keystore2-V4-cpp", ], } - // A rust_defaults that includes the latest Keystore2 AIDL library. // Modules that depend on Keystore2 directly can include this rust_defaults to avoid // managing dependency versions explicitly. rust_defaults { name: "keystore2_use_latest_aidl_rust", rustlibs: [ - "android.system.keystore2-V3-rust", + "android.system.keystore2-V4-rust", ], } diff --git a/keystore2/android.system.keystore2-service.xml b/keystore2/android.system.keystore2-service.xml index 45f995c8..4d8a756d 100644 --- a/keystore2/android.system.keystore2-service.xml +++ b/keystore2/android.system.keystore2-service.xml @@ -1,7 +1,7 @@ android.system.keystore2 - 3 + 4 IKeystoreService default diff --git a/keystore2/test_utils/Android.bp b/keystore2/test_utils/Android.bp index e37ba607..602c98c0 100644 --- a/keystore2/test_utils/Android.bp +++ b/keystore2/test_utils/Android.bp @@ -46,7 +46,7 @@ rust_defaults { "libkeystore-engine", ], shared_libs: [ - "android.system.keystore2-V3-ndk", + "android.system.keystore2-V4-ndk", "libbase", "libcrypto", "libkeymaster_portable",