diff options
author | 2024-03-05 15:19:54 +0000 | |
---|---|---|
committer | 2024-03-05 15:19:54 +0000 | |
commit | 9b5907be653a8552288545b9bd57d0dc1ca975ef (patch) | |
tree | 73523e73549da05c8caee265c3305143c766a07c | |
parent | 2966eb208c543cc50c1eab61111410c4306d6b3a (diff) | |
parent | 31cd951ef5afa0f5c2eeffd53782c4e56930b3cd (diff) |
Merge "Revert "Add CTS test cases for new exposing APIs(1/2)"" into main
7 files changed, 4 insertions, 60 deletions
diff --git a/core/api/test-current.txt b/core/api/test-current.txt index 17ed908c5a06..6fb6b0d1d5bf 100644 --- a/core/api/test-current.txt +++ b/core/api/test-current.txt @@ -1547,10 +1547,6 @@ package android.hardware.biometrics { method public boolean isAllowBackgroundAuthentication(); } - public abstract static class BiometricPrompt.AuthenticationCallback { - method @FlaggedApi("android.hardware.biometrics.face_background_authentication") public void onAuthenticationAcquired(int); - } - public static class BiometricPrompt.Builder { method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.TEST_BIOMETRIC, "android.permission.USE_BIOMETRIC_INTERNAL"}) public android.hardware.biometrics.BiometricPrompt.Builder setAllowBackgroundAuthentication(boolean); method @FlaggedApi("android.multiuser.enable_biometrics_to_unlock_private_space") @NonNull @RequiresPermission(anyOf={android.Manifest.permission.TEST_BIOMETRIC, "android.permission.USE_BIOMETRIC_INTERNAL"}) public android.hardware.biometrics.BiometricPrompt.Builder setAllowBackgroundAuthentication(boolean, boolean); @@ -1569,7 +1565,6 @@ package android.hardware.biometrics { } public class SensorProperties { - ctor @FlaggedApi("android.hardware.biometrics.face_background_authentication") public SensorProperties(int, int, @NonNull java.util.List<android.hardware.biometrics.SensorProperties.ComponentInfo>); method @NonNull public java.util.List<android.hardware.biometrics.SensorProperties.ComponentInfo> getComponentInfo(); method public int getSensorId(); method public int getSensorStrength(); @@ -1714,18 +1709,6 @@ package android.hardware.display { } -package android.hardware.face { - - @FlaggedApi("android.hardware.biometrics.face_background_authentication") public class FaceManager { - method @FlaggedApi("android.hardware.biometrics.face_background_authentication") @NonNull @RequiresPermission(android.Manifest.permission.TEST_BIOMETRIC) public android.hardware.biometrics.BiometricTestSession createTestSession(int); - method @FlaggedApi("android.hardware.biometrics.face_background_authentication") @NonNull public java.util.List<android.hardware.face.FaceSensorProperties> getSensorProperties(); - } - - @FlaggedApi("android.hardware.biometrics.face_background_authentication") public class FaceSensorProperties extends android.hardware.biometrics.SensorProperties { - } - -} - package android.hardware.fingerprint { @Deprecated public class FingerprintManager { diff --git a/core/java/android/hardware/biometrics/BiometricPrompt.java b/core/java/android/hardware/biometrics/BiometricPrompt.java index d9d4305cc630..0208fed6040f 100644 --- a/core/java/android/hardware/biometrics/BiometricPrompt.java +++ b/core/java/android/hardware/biometrics/BiometricPrompt.java @@ -23,7 +23,6 @@ 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_CUSTOM_BIOMETRIC_PROMPT; -import static android.hardware.biometrics.Flags.FLAG_FACE_BACKGROUND_AUTHENTICATION; import static android.hardware.biometrics.Flags.FLAG_GET_OP_ID_CRYPTO_OBJECT; import static android.multiuser.Flags.FLAG_ENABLE_BIOMETRICS_TO_UNLOCK_PRIVATE_SPACE; @@ -1128,8 +1127,6 @@ public class BiometricPrompt implements BiometricAuthenticator, BiometricConstan * @hide */ @Override - @TestApi - @FlaggedApi(FLAG_FACE_BACKGROUND_AUTHENTICATION) public void onAuthenticationAcquired(int acquireInfo) {} /** diff --git a/core/java/android/hardware/biometrics/SensorProperties.java b/core/java/android/hardware/biometrics/SensorProperties.java index 16f71414c8c9..3b9cad49250f 100644 --- a/core/java/android/hardware/biometrics/SensorProperties.java +++ b/core/java/android/hardware/biometrics/SensorProperties.java @@ -16,9 +16,6 @@ package android.hardware.biometrics; -import static android.hardware.biometrics.Flags.FLAG_FACE_BACKGROUND_AUTHENTICATION; - -import android.annotation.FlaggedApi; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.TestApi; @@ -144,10 +141,8 @@ public class SensorProperties { /** * @hide */ - @TestApi - @FlaggedApi(FLAG_FACE_BACKGROUND_AUTHENTICATION) public SensorProperties(int sensorId, @Strength int sensorStrength, - @NonNull List<ComponentInfo> componentInfo) { + List<ComponentInfo> componentInfo) { mSensorId = sensorId; mSensorStrength = sensorStrength; mComponentInfo = componentInfo; diff --git a/core/java/android/hardware/face/FaceManager.java b/core/java/android/hardware/face/FaceManager.java index 1b0a485bdbda..066c45f03ec4 100644 --- a/core/java/android/hardware/face/FaceManager.java +++ b/core/java/android/hardware/face/FaceManager.java @@ -18,7 +18,6 @@ package android.hardware.face; import static android.Manifest.permission.INTERACT_ACROSS_USERS; import static android.Manifest.permission.MANAGE_BIOMETRIC; -import static android.Manifest.permission.TEST_BIOMETRIC; import static android.Manifest.permission.USE_BACKGROUND_FACE_AUTHENTICATION; import static android.Manifest.permission.USE_BIOMETRIC_INTERNAL; import static android.hardware.biometrics.BiometricConstants.BIOMETRIC_LOCKOUT_NONE; @@ -30,7 +29,6 @@ import android.annotation.Nullable; import android.annotation.RequiresPermission; import android.annotation.SystemApi; import android.annotation.SystemService; -import android.annotation.TestApi; import android.content.Context; import android.content.pm.PackageManager; import android.hardware.biometrics.BiometricAuthenticator; @@ -38,7 +36,6 @@ import android.hardware.biometrics.BiometricConstants; import android.hardware.biometrics.BiometricFaceConstants; import android.hardware.biometrics.BiometricPrompt; import android.hardware.biometrics.BiometricStateListener; -import android.hardware.biometrics.BiometricTestSession; import android.hardware.biometrics.CryptoObject; import android.hardware.biometrics.IBiometricServiceLockoutResetCallback; import android.os.Binder; @@ -72,7 +69,6 @@ import java.util.concurrent.Executor; */ @FlaggedApi(FLAG_FACE_BACKGROUND_AUTHENTICATION) @SystemApi -@TestApi @SystemService(Context.FACE_SERVICE) public class FaceManager implements BiometricAuthenticator, BiometricFaceConstants { @@ -784,8 +780,6 @@ public class FaceManager implements BiometricAuthenticator, BiometricFaceConstan * @hide */ @NonNull - @TestApi - @FlaggedApi(FLAG_FACE_BACKGROUND_AUTHENTICATION) public List<FaceSensorProperties> getSensorProperties() { final List<FaceSensorProperties> properties = new ArrayList<>(); final List<FaceSensorPropertiesInternal> internalProperties @@ -1634,23 +1628,4 @@ public class FaceManager implements BiometricAuthenticator, BiometricFaceConstan Slog.w(TAG, "Unknown enrollment acquired message: " + acquireInfo + ", " + vendorCode); return null; } - - /** - * Retrieves a test session for FaceManager. - * - * @hide - */ - @TestApi - @NonNull - @RequiresPermission(TEST_BIOMETRIC) - @FlaggedApi(FLAG_FACE_BACKGROUND_AUTHENTICATION) - public BiometricTestSession createTestSession(int sensorId) { - try { - return new BiometricTestSession(mContext, sensorId, - (context, sensorId1, callback) -> mService - .createTestSession(sensorId1, callback, context.getOpPackageName())); - } catch (RemoteException e) { - throw e.rethrowFromSystemServer(); - } - } -}
\ No newline at end of file +} diff --git a/core/java/android/hardware/face/FaceSensorProperties.java b/core/java/android/hardware/face/FaceSensorProperties.java index a1ddb0e3495b..f61312785919 100644 --- a/core/java/android/hardware/face/FaceSensorProperties.java +++ b/core/java/android/hardware/face/FaceSensorProperties.java @@ -16,12 +16,8 @@ package android.hardware.face; -import static android.hardware.biometrics.Flags.FLAG_FACE_BACKGROUND_AUTHENTICATION; - -import android.annotation.FlaggedApi; import android.annotation.IntDef; import android.annotation.NonNull; -import android.annotation.TestApi; import android.hardware.biometrics.ComponentInfoInternal; import android.hardware.biometrics.SensorProperties; @@ -34,8 +30,6 @@ import java.util.List; * Container for face sensor properties. * @hide */ -@TestApi -@FlaggedApi(FLAG_FACE_BACKGROUND_AUTHENTICATION) public class FaceSensorProperties extends SensorProperties { /** * @hide diff --git a/core/java/android/hardware/face/IFaceService.aidl b/core/java/android/hardware/face/IFaceService.aidl index 6515312e337c..b98c0cb41ac9 100644 --- a/core/java/android/hardware/face/IFaceService.aidl +++ b/core/java/android/hardware/face/IFaceService.aidl @@ -39,7 +39,7 @@ import android.view.Surface; interface IFaceService { // Creates a test session with the specified sensorId - @EnforcePermission("TEST_BIOMETRIC") + @EnforcePermission("USE_BIOMETRIC_INTERNAL") ITestSession createTestSession(int sensorId, ITestSessionCallback callback, String opPackageName); // Requests a proto dump of the specified sensor diff --git a/services/core/java/com/android/server/biometrics/sensors/face/FaceService.java b/services/core/java/com/android/server/biometrics/sensors/face/FaceService.java index 6b8586a2e483..68b4e3fb51ba 100644 --- a/services/core/java/com/android/server/biometrics/sensors/face/FaceService.java +++ b/services/core/java/com/android/server/biometrics/sensors/face/FaceService.java @@ -119,7 +119,7 @@ public class FaceService extends SystemService { * Receives the incoming binder calls from FaceManager. */ @VisibleForTesting final class FaceServiceWrapper extends IFaceService.Stub { - @android.annotation.EnforcePermission(android.Manifest.permission.TEST_BIOMETRIC) + @android.annotation.EnforcePermission(android.Manifest.permission.USE_BIOMETRIC_INTERNAL) @Override public ITestSession createTestSession(int sensorId, @NonNull ITestSessionCallback callback, @NonNull String opPackageName) { |