diff options
| author | Kevin Chyn <kchyn@google.com> | 2021-07-26 18:28:43 +0000 |
|---|---|---|
| committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-07-26 18:28:43 +0000 |
| commit | e26e9b4773c54173aaf4ed6bcb8affeee07f8ebc (patch) | |
| tree | 789cd481b0c0a2877043b0768ff50e4bef9ef9ff /core/java | |
| parent | 9c909b2261c243026c81d1cc2d21694c5037a682 (diff) | |
| parent | 88a506aad4a5190e2f518f3353aebf392ad10469 (diff) | |
Merge changes from topic "facemanager-bypassflag" into sc-dev am: 88a506aad4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15377220
Change-Id: Ifce5e0039d2bb565c7e251ae71070ffac46a8f52
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/hardware/face/FaceManager.java | 31 | ||||
| -rw-r--r-- | core/java/android/hardware/face/IFaceService.aidl | 2 |
2 files changed, 5 insertions, 28 deletions
diff --git a/core/java/android/hardware/face/FaceManager.java b/core/java/android/hardware/face/FaceManager.java index c2a2c4c0678c..3c3ba595f3fb 100644 --- a/core/java/android/hardware/face/FaceManager.java +++ b/core/java/android/hardware/face/FaceManager.java @@ -169,31 +169,6 @@ public class FaceManager implements BiometricAuthenticator, BiometricFaceConstan } /** - * Request authentication of a crypto object. This call operates the face recognition hardware - * and starts capturing images. It terminates when - * {@link AuthenticationCallback#onAuthenticationError(int, CharSequence)} or - * {@link AuthenticationCallback#onAuthenticationSucceeded(AuthenticationResult)} is called, at - * which point the object is no longer valid. The operation can be canceled by using the - * provided cancel object. - * - * @param crypto object associated with the call or null if none required. - * @param cancel an object that can be used to cancel authentication - * @param callback an object to receive authentication events - * @param handler an optional handler to handle callback events - * @throws IllegalArgumentException if the crypto operation is not supported or is not backed - * by - * <a href="{@docRoot}training/articles/keystore.html">Android - * Keystore facility</a>. - * @throws IllegalStateException if the crypto primitive is not initialized. - * @hide - */ - @RequiresPermission(USE_BIOMETRIC_INTERNAL) - public void authenticate(@Nullable CryptoObject crypto, @Nullable CancellationSignal cancel, - @NonNull AuthenticationCallback callback, @Nullable Handler handler) { - authenticate(crypto, cancel, callback, handler, mContext.getUserId()); - } - - /** * Use the provided handler thread for events. */ private void useHandler(Handler handler) { @@ -224,8 +199,10 @@ public class FaceManager implements BiometricAuthenticator, BiometricFaceConstan * @throws IllegalStateException if the crypto primitive is not initialized. * @hide */ + @RequiresPermission(USE_BIOMETRIC_INTERNAL) public void authenticate(@Nullable CryptoObject crypto, @Nullable CancellationSignal cancel, - @NonNull AuthenticationCallback callback, @Nullable Handler handler, int userId) { + @NonNull AuthenticationCallback callback, @Nullable Handler handler, int userId, + boolean isKeyguardBypassEnabled) { if (callback == null) { throw new IllegalArgumentException("Must supply an authentication callback"); } @@ -247,7 +224,7 @@ public class FaceManager implements BiometricAuthenticator, BiometricFaceConstan final long operationId = crypto != null ? crypto.getOpId() : 0; Trace.beginSection("FaceManager#authenticate"); mService.authenticate(mToken, operationId, userId, mServiceReceiver, - mContext.getOpPackageName()); + mContext.getOpPackageName(), isKeyguardBypassEnabled); } catch (RemoteException e) { Slog.w(TAG, "Remote exception while authenticating: ", e); if (callback != null) { diff --git a/core/java/android/hardware/face/IFaceService.aidl b/core/java/android/hardware/face/IFaceService.aidl index b9a49c6ced09..db02a0ef2a10 100644 --- a/core/java/android/hardware/face/IFaceService.aidl +++ b/core/java/android/hardware/face/IFaceService.aidl @@ -46,7 +46,7 @@ interface IFaceService { // Authenticate the given sessionId with a face void authenticate(IBinder token, long operationId, int userId, IFaceServiceReceiver receiver, - String opPackageName); + String opPackageName, boolean isKeyguardBypassEnabled); // Uses the face hardware to detect for the presence of a face, without giving details // about accept/reject/lockout. |
