Merge changes from topic "lockoutreset" into rvc-dev

* changes:
  Add missing permission check for addLockoutResetCallback
  Add null pointer check for addLockoutResetCallback
This commit is contained in:
Kevin Chyn
2020-05-15 22:12:00 +00:00
committed by Android (Google) Code Review
2 changed files with 5 additions and 0 deletions

View File

@@ -978,6 +978,10 @@ public abstract class BiometricServiceBase extends SystemService
}
protected void addLockoutResetCallback(IBiometricServiceLockoutResetCallback callback) {
if (callback == null) {
Slog.w(getTag(), "Null LockoutResetCallback");
return;
}
mHandler.post(() -> {
final LockoutResetMonitor monitor = new LockoutResetMonitor(callback);
if (!mLockoutMonitors.contains(monitor)) {

View File

@@ -330,6 +330,7 @@ public class FingerprintService extends BiometricServiceBase {
@Override
public void addLockoutResetCallback(final IBiometricServiceLockoutResetCallback callback)
throws RemoteException {
checkPermission(USE_BIOMETRIC_INTERNAL);
FingerprintService.super.addLockoutResetCallback(callback);
}