diff options
author | Daniel Hansson <daniel.hansson@sonymobile.com> | 2012-03-29 11:02:05 +0200 |
---|---|---|
committer | Kenneth Andersson <kenneth.andersson@sonymobile.com> | 2012-08-14 13:42:36 +0200 |
commit | 4b71686d09ef0e13e729338e3a549f2f63f80db1 (patch) | |
tree | 191b13f2a8875a3dd5d5464f5a92f25167d4d8fb | |
parent | 37548994e69292932e9e2fafb7cba6c53e3a2bcd (diff) | |
download | frameworks_base-4b71686d09ef0e13e729338e3a549f2f63f80db1.zip frameworks_base-4b71686d09ef0e13e729338e3a549f2f63f80db1.tar.gz frameworks_base-4b71686d09ef0e13e729338e3a549f2f63f80db1.tar.bz2 |
Keep keyguard from starting after finished call when screen is on
Previously keyguard would start after a call ended, even though
the screen was on, if the screen had not been turned off since
phone startup.
Change-Id: I03c18a0bb2a58760614645871f4703afb9a0677d
-rw-r--r-- | policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java b/policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java index 02eeedf..5fa6dbf 100644 --- a/policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java +++ b/policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java @@ -230,7 +230,7 @@ public class KeyguardViewMediator implements KeyguardViewCallback, private KeyguardUpdateMonitor mUpdateMonitor; - private boolean mScreenOn = false; + private boolean mScreenOn; // last known state of the cellular connection private String mPhoneState = TelephonyManager.EXTRA_STATE_IDLE; @@ -318,6 +318,8 @@ public class KeyguardViewMediator implements KeyguardViewCallback, final ContentResolver cr = mContext.getContentResolver(); mShowLockIcon = (Settings.System.getInt(cr, "show_status_bar_lock", 0) == 1); + mScreenOn = mPM.isScreenOn(); + mLockSounds = new SoundPool(1, AudioManager.STREAM_SYSTEM, 0); String soundPath = Settings.System.getString(cr, Settings.System.LOCK_SOUND); if (soundPath != null) { |