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

Commit 3883563d authored by Kevin Chyn's avatar Kevin Chyn
Browse files

Listen for IFingerprintServiceLockoutResetCallback death

Fixes: 73106873

Test: adb shell pkill systemui, log shows up
Change-Id: I35af0ce0264b6a7ca5b31ec17b32350ef6c9a3b4
parent 9a7b7adc
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -915,7 +915,7 @@ public class FingerprintService extends SystemService implements IHwBinder.Death
        notifyLockoutResetMonitors();
    }

    private class FingerprintServiceLockoutResetMonitor {
    private class FingerprintServiceLockoutResetMonitor implements IBinder.DeathRecipient {

        private static final long WAKELOCK_TIMEOUT_MS = 2000;
        private final IFingerprintServiceLockoutResetCallback mCallback;
@@ -926,6 +926,11 @@ public class FingerprintService extends SystemService implements IHwBinder.Death
            mCallback = callback;
            mWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
                    "lockout reset callback");
            try {
                mCallback.asBinder().linkToDeath(FingerprintServiceLockoutResetMonitor.this, 0);
            } catch (RemoteException e) {
                Slog.w(TAG, "caught remote exception in linkToDeath", e);
            }
        }

        public void sendLockoutReset() {
@@ -959,6 +964,12 @@ public class FingerprintService extends SystemService implements IHwBinder.Death
                removeLockoutResetCallback(FingerprintServiceLockoutResetMonitor.this);
            }
        };

        @Override
        public void binderDied() {
            Slog.e(TAG, "Lockout reset callback binder died");
            mHandler.post(mRemoveCallbackRunnable);
        }
    }

    private IBiometricsFingerprintClientCallback mDaemonCallback =