diff options
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. |
