Merge "Fix inaccuracy in biometric timeout" am: 2f178de076 am: cf3c838d6d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1991781 Change-Id: I5b3291aba3ffbf4d842127fc6655dba81a2cab91
This commit is contained in:
@@ -262,7 +262,7 @@ public class LockSettingsStrongAuth {
|
|||||||
long nextAlarmTime = strongAuthTime + dpm.getRequiredStrongAuthTimeout(null, userId);
|
long nextAlarmTime = strongAuthTime + dpm.getRequiredStrongAuthTimeout(null, userId);
|
||||||
|
|
||||||
// schedule a new alarm listener for the user
|
// 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);
|
STRONG_AUTH_TIMEOUT_ALARM_TAG, alarm, mHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -303,7 +303,7 @@ public class LockSettingsStrongAuth {
|
|||||||
alarm = new NonStrongBiometricTimeoutAlarmListener(userId);
|
alarm = new NonStrongBiometricTimeoutAlarmListener(userId);
|
||||||
mNonStrongBiometricTimeoutAlarmListener.put(userId, alarm);
|
mNonStrongBiometricTimeoutAlarmListener.put(userId, alarm);
|
||||||
// schedule a new alarm listener for the user
|
// 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);
|
NON_STRONG_BIOMETRIC_TIMEOUT_ALARM_TAG, alarm, mHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -394,7 +394,7 @@ public class LockSettingsStrongAuth {
|
|||||||
}
|
}
|
||||||
// schedule a new alarm listener for the user
|
// schedule a new alarm listener for the user
|
||||||
if (DEBUG) Slog.d(TAG, "Schedule a new alarm for non-strong biometric idle timeout");
|
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);
|
NON_STRONG_BIOMETRIC_IDLE_TIMEOUT_ALARM_TAG, alarm, mHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -229,8 +229,8 @@ public class LockSettingsStrongAuthTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void verifyAlarm(long when, String tag, AlarmManager.OnAlarmListener alarm) {
|
private void verifyAlarm(long when, String tag, AlarmManager.OnAlarmListener alarm) {
|
||||||
verify(mAlarmManager).set(
|
verify(mAlarmManager).setExact(
|
||||||
eq(AlarmManager.ELAPSED_REALTIME),
|
eq(AlarmManager.ELAPSED_REALTIME_WAKEUP),
|
||||||
eq(when),
|
eq(when),
|
||||||
eq(tag),
|
eq(tag),
|
||||||
eq(alarm),
|
eq(alarm),
|
||||||
|
|||||||
Reference in New Issue
Block a user