Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 687c3833 authored by Kevin Chyn's avatar Kevin Chyn
Browse files

Add null pointer check for addLockoutResetCallback

Fixes: 155988975

Test: Follow steps in comment#3, no system_server crash
Change-Id: Ie138286efe5c08ddc98cc74a034558ec43d5cf35
parent e6e7cdf1
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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)) {