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:
@@ -978,6 +978,10 @@ public abstract class BiometricServiceBase extends SystemService
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void addLockoutResetCallback(IBiometricServiceLockoutResetCallback callback) {
|
protected void addLockoutResetCallback(IBiometricServiceLockoutResetCallback callback) {
|
||||||
|
if (callback == null) {
|
||||||
|
Slog.w(getTag(), "Null LockoutResetCallback");
|
||||||
|
return;
|
||||||
|
}
|
||||||
mHandler.post(() -> {
|
mHandler.post(() -> {
|
||||||
final LockoutResetMonitor monitor = new LockoutResetMonitor(callback);
|
final LockoutResetMonitor monitor = new LockoutResetMonitor(callback);
|
||||||
if (!mLockoutMonitors.contains(monitor)) {
|
if (!mLockoutMonitors.contains(monitor)) {
|
||||||
|
|||||||
@@ -330,6 +330,7 @@ public class FingerprintService extends BiometricServiceBase {
|
|||||||
@Override
|
@Override
|
||||||
public void addLockoutResetCallback(final IBiometricServiceLockoutResetCallback callback)
|
public void addLockoutResetCallback(final IBiometricServiceLockoutResetCallback callback)
|
||||||
throws RemoteException {
|
throws RemoteException {
|
||||||
|
checkPermission(USE_BIOMETRIC_INTERNAL);
|
||||||
FingerprintService.super.addLockoutResetCallback(callback);
|
FingerprintService.super.addLockoutResetCallback(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user