diff options
| author | 2023-11-03 20:25:01 +0000 | |
|---|---|---|
| committer | 2023-11-03 20:25:01 +0000 | |
| commit | 4cb17881b78674939575a2c6c43145e90c27506c (patch) | |
| tree | 0faee00067455df66d3c66565b25fb491276ce05 | |
| parent | 1f7440d1f81e06d44a63ce4036eac9cf07d649a4 (diff) | |
| parent | 3013db9adeabec36e694ff7675558f9207a328be (diff) | |
Merge "Add BiometricPrompt.CryptoObject.getOpId()." into main
| -rw-r--r-- | core/api/current.txt | 1 | ||||
| -rw-r--r-- | core/java/android/hardware/biometrics/BiometricPrompt.java | 9 | ||||
| -rw-r--r-- | core/java/android/hardware/biometrics/CryptoObject.java | 2 | ||||
| -rw-r--r-- | core/java/android/hardware/biometrics/flags.aconfig | 7 |
4 files changed, 18 insertions, 1 deletions
diff --git a/core/api/current.txt b/core/api/current.txt index 1b0311d19a8d..013010be95be 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -18633,6 +18633,7 @@ package android.hardware.biometrics { method @Deprecated @Nullable public android.security.identity.IdentityCredential getIdentityCredential(); method @FlaggedApi("android.hardware.biometrics.add_key_agreement_crypto_object") @Nullable public javax.crypto.KeyAgreement getKeyAgreement(); method @Nullable public javax.crypto.Mac getMac(); + method @FlaggedApi("android.hardware.biometrics.get_op_id_crypto_object") public long getOpId(); method @Nullable public android.security.identity.PresentationSession getPresentationSession(); method @Nullable public java.security.Signature getSignature(); } diff --git a/core/java/android/hardware/biometrics/BiometricPrompt.java b/core/java/android/hardware/biometrics/BiometricPrompt.java index 7a43286692c4..97bbfbbe4908 100644 --- a/core/java/android/hardware/biometrics/BiometricPrompt.java +++ b/core/java/android/hardware/biometrics/BiometricPrompt.java @@ -21,6 +21,7 @@ import static android.Manifest.permission.USE_BIOMETRIC; import static android.Manifest.permission.USE_BIOMETRIC_INTERNAL; import static android.hardware.biometrics.BiometricManager.Authenticators; import static android.hardware.biometrics.Flags.FLAG_ADD_KEY_AGREEMENT_CRYPTO_OBJECT; +import static android.hardware.biometrics.Flags.FLAG_GET_OP_ID_CRYPTO_OBJECT; import android.annotation.CallbackExecutor; import android.annotation.FlaggedApi; @@ -851,6 +852,14 @@ public class BiometricPrompt implements BiometricAuthenticator, BiometricConstan public @Nullable KeyAgreement getKeyAgreement() { return super.getKeyAgreement(); } + + /** + * Get the operation handle associated with this object or 0 if none. + */ + @FlaggedApi(FLAG_GET_OP_ID_CRYPTO_OBJECT) + public long getOpId() { + return super.getOpId(); + } } /** diff --git a/core/java/android/hardware/biometrics/CryptoObject.java b/core/java/android/hardware/biometrics/CryptoObject.java index 39fbe83b6abb..8d3ea3f914ec 100644 --- a/core/java/android/hardware/biometrics/CryptoObject.java +++ b/core/java/android/hardware/biometrics/CryptoObject.java @@ -154,7 +154,7 @@ public class CryptoObject { * @hide * @return the opId associated with this object or 0 if none */ - public final long getOpId() { + public long getOpId() { if (mCrypto == null) { return 0; } else if (mCrypto instanceof IdentityCredential) { diff --git a/core/java/android/hardware/biometrics/flags.aconfig b/core/java/android/hardware/biometrics/flags.aconfig index 979f5705378c..56ec7632fa20 100644 --- a/core/java/android/hardware/biometrics/flags.aconfig +++ b/core/java/android/hardware/biometrics/flags.aconfig @@ -14,3 +14,10 @@ flag { bug: "282058146" } +flag { + name: "get_op_id_crypto_object" + namespace: "biometrics" + description: "Feature flag for adding a get operation id api to CryptoObject." + bug: "307601768" +} + |