Skip to content

Commit 4b71686

Browse files
SGA-Daniel-HanssonKenneth Andersson
authored andcommitted
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
1 parent 3754899 commit 4b71686

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

policy/src/com/android/internal/policy/impl/KeyguardViewMediator.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ public class KeyguardViewMediator implements KeyguardViewCallback,
230230

231231
private KeyguardUpdateMonitor mUpdateMonitor;
232232

233-
private boolean mScreenOn = false;
233+
private boolean mScreenOn;
234234

235235
// last known state of the cellular connection
236236
private String mPhoneState = TelephonyManager.EXTRA_STATE_IDLE;
@@ -318,6 +318,8 @@ public KeyguardViewMediator(Context context, PhoneWindowManager callback,
318318
final ContentResolver cr = mContext.getContentResolver();
319319
mShowLockIcon = (Settings.System.getInt(cr, "show_status_bar_lock", 0) == 1);
320320

321+
mScreenOn = mPM.isScreenOn();
322+
321323
mLockSounds = new SoundPool(1, AudioManager.STREAM_SYSTEM, 0);
322324
String soundPath = Settings.System.getString(cr, Settings.System.LOCK_SOUND);
323325
if (soundPath != null) {

0 commit comments

Comments
 (0)