Merge "Use Settings.System.getIntForUser instead of getInt to make sure user specific settings are used" into rvc-dev am: d198f5165c am: 886d492c8c am: f37a92b8c8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23475765 Change-Id: I2dbddc0c7bc0f8d0bf95f19bd9f07a46cae96232 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -1134,9 +1134,9 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable,
|
|||||||
final ContentResolver cr = mContext.getContentResolver();
|
final ContentResolver cr = mContext.getContentResolver();
|
||||||
|
|
||||||
// From SecuritySettings
|
// From SecuritySettings
|
||||||
final long lockAfterTimeout = Settings.Secure.getInt(cr,
|
final long lockAfterTimeout = Settings.Secure.getIntForUser(cr,
|
||||||
Settings.Secure.LOCK_SCREEN_LOCK_AFTER_TIMEOUT,
|
Settings.Secure.LOCK_SCREEN_LOCK_AFTER_TIMEOUT,
|
||||||
KEYGUARD_LOCK_AFTER_DELAY_DEFAULT);
|
KEYGUARD_LOCK_AFTER_DELAY_DEFAULT, userId);
|
||||||
|
|
||||||
// From DevicePolicyAdmin
|
// From DevicePolicyAdmin
|
||||||
final long policyTimeout = mLockPatternUtils.getDevicePolicyManager()
|
final long policyTimeout = mLockPatternUtils.getDevicePolicyManager()
|
||||||
@@ -1148,8 +1148,8 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable,
|
|||||||
timeout = lockAfterTimeout;
|
timeout = lockAfterTimeout;
|
||||||
} else {
|
} else {
|
||||||
// From DisplaySettings
|
// From DisplaySettings
|
||||||
long displayTimeout = Settings.System.getInt(cr, SCREEN_OFF_TIMEOUT,
|
long displayTimeout = Settings.System.getIntForUser(cr, SCREEN_OFF_TIMEOUT,
|
||||||
KEYGUARD_DISPLAY_TIMEOUT_DELAY_DEFAULT);
|
KEYGUARD_DISPLAY_TIMEOUT_DELAY_DEFAULT, userId);
|
||||||
|
|
||||||
// policy in effect. Make sure we don't go beyond policy limit.
|
// policy in effect. Make sure we don't go beyond policy limit.
|
||||||
displayTimeout = Math.max(displayTimeout, 0); // ignore negative values
|
displayTimeout = Math.max(displayTimeout, 0); // ignore negative values
|
||||||
@@ -2012,7 +2012,10 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable,
|
|||||||
private void playSound(int soundId) {
|
private void playSound(int soundId) {
|
||||||
if (soundId == 0) return;
|
if (soundId == 0) return;
|
||||||
final ContentResolver cr = mContext.getContentResolver();
|
final ContentResolver cr = mContext.getContentResolver();
|
||||||
if (Settings.System.getInt(cr, Settings.System.LOCKSCREEN_SOUNDS_ENABLED, 1) == 1) {
|
int lockscreenSoundsEnabled = Settings.System.getIntForUser(cr,
|
||||||
|
Settings.System.LOCKSCREEN_SOUNDS_ENABLED, 1,
|
||||||
|
KeyguardUpdateMonitor.getCurrentUser());
|
||||||
|
if (lockscreenSoundsEnabled == 1) {
|
||||||
|
|
||||||
mLockSounds.stop(mLockSoundStreamId);
|
mLockSounds.stop(mLockSoundStreamId);
|
||||||
// Init mAudioManager
|
// Init mAudioManager
|
||||||
|
|||||||
Reference in New Issue
Block a user