Loading core/java/android/hardware/biometrics/BiometricManager.java +18 −0 Original line number Diff line number Diff line Loading @@ -536,6 +536,24 @@ public class BiometricManager { } } /** * Listens for biometric prompt status, i.e., if it is being shown or idle. * @hide */ @RequiresPermission(USE_BIOMETRIC_INTERNAL) public void registerBiometricPromptStatusListener( IBiometricPromptStatusListener callback) { if (mService != null) { try { mService.registerBiometricPromptStatusListener(callback); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } else { Slog.w(TAG, "registerBiometricPromptOnKeyguardCallback(): Service not connected"); } } /** * Requests all {@link Authenticators.Types#BIOMETRIC_STRONG} sensors to have their * authenticatorId invalidated for the specified user. This happens when enrollments have been Loading core/java/android/hardware/biometrics/IAuthService.aidl +4 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.hardware.biometrics; import android.hardware.biometrics.IBiometricEnabledOnKeyguardCallback; import android.hardware.biometrics.IBiometricPromptStatusListener; import android.hardware.biometrics.IBiometricServiceReceiver; import android.hardware.biometrics.IInvalidationCallback; import android.hardware.biometrics.ITestSession; Loading Loading @@ -63,6 +64,9 @@ interface IAuthService { // Register callback for when keyguard biometric eligibility changes. void registerEnabledOnKeyguardCallback(IBiometricEnabledOnKeyguardCallback callback); // Register callback to check biometric prompt status. void registerBiometricPromptStatusListener(IBiometricPromptStatusListener callback); // Requests all BIOMETRIC_STRONG sensors to have their authenticatorId invalidated for the // specified user. This happens when enrollments have been added on devices with multiple // biometric sensors. Loading core/java/android/hardware/biometrics/IBiometricPromptStatusListener.aidl 0 → 100644 +27 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.hardware.biometrics; /** * Communication channel to propagate biometric prompt status. Implementation of this interface * should be registered in BiometricService#registerBiometricPromptStatusListener. * @hide */ oneway interface IBiometricPromptStatusListener { void onBiometricPromptShowing(); void onBiometricPromptIdle(); } No newline at end of file core/java/android/hardware/biometrics/IBiometricService.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.hardware.biometrics; import android.hardware.biometrics.IBiometricEnabledOnKeyguardCallback; import android.hardware.biometrics.IBiometricPromptStatusListener; import android.hardware.biometrics.IBiometricServiceReceiver; import android.hardware.biometrics.IBiometricAuthenticator; import android.hardware.biometrics.IInvalidationCallback; Loading Loading @@ -68,6 +69,10 @@ interface IBiometricService { @EnforcePermission("USE_BIOMETRIC_INTERNAL") void registerEnabledOnKeyguardCallback(IBiometricEnabledOnKeyguardCallback callback); // Register a callback for biometric prompt status on keyguard. @EnforcePermission("USE_BIOMETRIC_INTERNAL") void registerBiometricPromptStatusListener(IBiometricPromptStatusListener callback); // Notify BiometricService when <Biometric>Service is ready to start the prepared client. // Client lifecycle is still managed in <Biometric>Service. @EnforcePermission("USE_BIOMETRIC_INTERNAL") Loading services/core/java/com/android/server/biometrics/AuthService.java +13 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ import android.hardware.biometrics.BiometricManager; import android.hardware.biometrics.ComponentInfoInternal; import android.hardware.biometrics.IAuthService; import android.hardware.biometrics.IBiometricEnabledOnKeyguardCallback; import android.hardware.biometrics.IBiometricPromptStatusListener; import android.hardware.biometrics.IBiometricService; import android.hardware.biometrics.IBiometricServiceReceiver; import android.hardware.biometrics.IInvalidationCallback; Loading Loading @@ -356,6 +357,18 @@ public class AuthService extends SystemService { } } @Override public void registerBiometricPromptStatusListener( IBiometricPromptStatusListener listener) throws RemoteException { checkInternalPermission(); final long identity = Binder.clearCallingIdentity(); try { mBiometricService.registerBiometricPromptStatusListener(listener); } finally { Binder.restoreCallingIdentity(identity); } } @Override public void invalidateAuthenticatorIds(int userId, int fromSensorId, IInvalidationCallback callback) throws RemoteException { Loading Loading
core/java/android/hardware/biometrics/BiometricManager.java +18 −0 Original line number Diff line number Diff line Loading @@ -536,6 +536,24 @@ public class BiometricManager { } } /** * Listens for biometric prompt status, i.e., if it is being shown or idle. * @hide */ @RequiresPermission(USE_BIOMETRIC_INTERNAL) public void registerBiometricPromptStatusListener( IBiometricPromptStatusListener callback) { if (mService != null) { try { mService.registerBiometricPromptStatusListener(callback); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } else { Slog.w(TAG, "registerBiometricPromptOnKeyguardCallback(): Service not connected"); } } /** * Requests all {@link Authenticators.Types#BIOMETRIC_STRONG} sensors to have their * authenticatorId invalidated for the specified user. This happens when enrollments have been Loading
core/java/android/hardware/biometrics/IAuthService.aidl +4 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.hardware.biometrics; import android.hardware.biometrics.IBiometricEnabledOnKeyguardCallback; import android.hardware.biometrics.IBiometricPromptStatusListener; import android.hardware.biometrics.IBiometricServiceReceiver; import android.hardware.biometrics.IInvalidationCallback; import android.hardware.biometrics.ITestSession; Loading Loading @@ -63,6 +64,9 @@ interface IAuthService { // Register callback for when keyguard biometric eligibility changes. void registerEnabledOnKeyguardCallback(IBiometricEnabledOnKeyguardCallback callback); // Register callback to check biometric prompt status. void registerBiometricPromptStatusListener(IBiometricPromptStatusListener callback); // Requests all BIOMETRIC_STRONG sensors to have their authenticatorId invalidated for the // specified user. This happens when enrollments have been added on devices with multiple // biometric sensors. Loading
core/java/android/hardware/biometrics/IBiometricPromptStatusListener.aidl 0 → 100644 +27 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.hardware.biometrics; /** * Communication channel to propagate biometric prompt status. Implementation of this interface * should be registered in BiometricService#registerBiometricPromptStatusListener. * @hide */ oneway interface IBiometricPromptStatusListener { void onBiometricPromptShowing(); void onBiometricPromptIdle(); } No newline at end of file
core/java/android/hardware/biometrics/IBiometricService.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.hardware.biometrics; import android.hardware.biometrics.IBiometricEnabledOnKeyguardCallback; import android.hardware.biometrics.IBiometricPromptStatusListener; import android.hardware.biometrics.IBiometricServiceReceiver; import android.hardware.biometrics.IBiometricAuthenticator; import android.hardware.biometrics.IInvalidationCallback; Loading Loading @@ -68,6 +69,10 @@ interface IBiometricService { @EnforcePermission("USE_BIOMETRIC_INTERNAL") void registerEnabledOnKeyguardCallback(IBiometricEnabledOnKeyguardCallback callback); // Register a callback for biometric prompt status on keyguard. @EnforcePermission("USE_BIOMETRIC_INTERNAL") void registerBiometricPromptStatusListener(IBiometricPromptStatusListener callback); // Notify BiometricService when <Biometric>Service is ready to start the prepared client. // Client lifecycle is still managed in <Biometric>Service. @EnforcePermission("USE_BIOMETRIC_INTERNAL") Loading
services/core/java/com/android/server/biometrics/AuthService.java +13 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ import android.hardware.biometrics.BiometricManager; import android.hardware.biometrics.ComponentInfoInternal; import android.hardware.biometrics.IAuthService; import android.hardware.biometrics.IBiometricEnabledOnKeyguardCallback; import android.hardware.biometrics.IBiometricPromptStatusListener; import android.hardware.biometrics.IBiometricService; import android.hardware.biometrics.IBiometricServiceReceiver; import android.hardware.biometrics.IInvalidationCallback; Loading Loading @@ -356,6 +357,18 @@ public class AuthService extends SystemService { } } @Override public void registerBiometricPromptStatusListener( IBiometricPromptStatusListener listener) throws RemoteException { checkInternalPermission(); final long identity = Binder.clearCallingIdentity(); try { mBiometricService.registerBiometricPromptStatusListener(listener); } finally { Binder.restoreCallingIdentity(identity); } } @Override public void invalidateAuthenticatorIds(int userId, int fromSensorId, IInvalidationCallback callback) throws RemoteException { Loading