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

Commit 2f178de0 authored by Rubin Xu's avatar Rubin Xu Committed by Gerrit Code Review
Browse files

Merge "Fix inaccuracy in biometric timeout"

parents 8e7b0f1a d99e713e
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -262,7 +262,7 @@ public class LockSettingsStrongAuth {
        long nextAlarmTime = strongAuthTime + dpm.getRequiredStrongAuthTimeout(null, userId);

        // schedule a new alarm listener for the user
        mAlarmManager.set(AlarmManager.ELAPSED_REALTIME, nextAlarmTime,
        mAlarmManager.setExact(AlarmManager.ELAPSED_REALTIME_WAKEUP, nextAlarmTime,
                STRONG_AUTH_TIMEOUT_ALARM_TAG, alarm, mHandler);
    }

@@ -303,7 +303,7 @@ public class LockSettingsStrongAuth {
            alarm = new NonStrongBiometricTimeoutAlarmListener(userId);
            mNonStrongBiometricTimeoutAlarmListener.put(userId, alarm);
            // schedule a new alarm listener for the user
            mAlarmManager.set(AlarmManager.ELAPSED_REALTIME, nextAlarmTime,
            mAlarmManager.setExact(AlarmManager.ELAPSED_REALTIME_WAKEUP, nextAlarmTime,
                    NON_STRONG_BIOMETRIC_TIMEOUT_ALARM_TAG, alarm, mHandler);
        }

@@ -394,7 +394,7 @@ public class LockSettingsStrongAuth {
        }
        // schedule a new alarm listener for the user
        if (DEBUG) Slog.d(TAG, "Schedule a new alarm for non-strong biometric idle timeout");
        mAlarmManager.set(AlarmManager.ELAPSED_REALTIME, nextAlarmTime,
        mAlarmManager.setExact(AlarmManager.ELAPSED_REALTIME_WAKEUP, nextAlarmTime,
                NON_STRONG_BIOMETRIC_IDLE_TIMEOUT_ALARM_TAG, alarm, mHandler);
    }

+2 −2
Original line number Diff line number Diff line
@@ -229,8 +229,8 @@ public class LockSettingsStrongAuthTest {
    }

    private void verifyAlarm(long when, String tag, AlarmManager.OnAlarmListener alarm) {
        verify(mAlarmManager).set(
                eq(AlarmManager.ELAPSED_REALTIME),
        verify(mAlarmManager).setExact(
                eq(AlarmManager.ELAPSED_REALTIME_WAKEUP),
                eq(when),
                eq(tag),
                eq(alarm),