From d70bc2f662b315e09a2afbb0e2331c9de0f7fecd Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Tue, 6 Oct 2009 23:25:51 -0700 Subject: [PATCH] Fix #2163209: alarm clock rings but is hidden behind lock screen The lock screen's flag to force the status bar on was sometimes interfering with the flag of the alarm behind to hide the lock screen. Change-Id: I91368c56d09d35b03db548530aa1eb59197206bd --- .../internal/policy/impl/PhoneWindowManager.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/policy/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/com/android/internal/policy/impl/PhoneWindowManager.java index 12821e98af0b3..cec41f79ddfd6 100755 --- a/policy/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/com/android/internal/policy/impl/PhoneWindowManager.java @@ -1366,7 +1366,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { if (win.isVisibleLw()) { if ((attrs.flags & FLAG_FORCE_NOT_FULLSCREEN) != 0) { mForceStatusBar = true; - } else if (mTopFullscreenOpaqueWindowState == null + } + if (mTopFullscreenOpaqueWindowState == null && attrs.type >= FIRST_APPLICATION_WINDOW && attrs.type <= LAST_APPLICATION_WINDOW && win.fillsScreenLw(mW, mH, false, false)) { @@ -1407,8 +1408,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { int changes = 0; boolean hiding = false; if (mStatusBar != null) { - //Log.i(TAG, "force=" + mForceStatusBar - // + " top=" + mTopFullscreenOpaqueWindowState); + if (localLOGV) Log.i(TAG, "force=" + mForceStatusBar + + " top=" + mTopFullscreenOpaqueWindowState); if (mForceStatusBar) { if (DEBUG_LAYOUT) Log.v(TAG, "Showing status bar"); if (mStatusBar.showLw(true)) changes |= FINISH_LAYOUT_REDO_LAYOUT; @@ -1435,7 +1436,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { if (mKeyguard != null) { if (localLOGV) Log.v(TAG, "finishLayoutLw::mHideKeyguard="+mHideLockScreen); if (mDismissKeyguard && !mKeyguardMediator.isSecure()) { - if (mKeyguard.hideLw(true)) { + if (mKeyguard.hideLw(false)) { changes |= FINISH_LAYOUT_REDO_LAYOUT | FINISH_LAYOUT_REDO_CONFIG | FINISH_LAYOUT_REDO_WALLPAPER; @@ -1448,7 +1449,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { }); } } else if (mHideLockScreen) { - if (mKeyguard.hideLw(true)) { + if (mKeyguard.hideLw(false)) { changes |= FINISH_LAYOUT_REDO_LAYOUT | FINISH_LAYOUT_REDO_CONFIG | FINISH_LAYOUT_REDO_WALLPAPER;