diff options
| author | 2012-10-10 20:37:48 -0700 | |
|---|---|---|
| committer | 2012-10-15 13:45:17 -0700 | |
| commit | a3f4bf531f64c49b6a792368b3e5628fe7cc0e5c (patch) | |
| tree | 0229d0c2f28bbb66f3305c705301762aae643206 | |
| parent | 33387b1bee6813ea2f5cf82c7244dc90453a7c2c (diff) | |
Always layout Keyguard on config change.
Add Keyguard to list of windows that can't be hidden by keyguard.
Don't assign Configuration to window until layout has had a chance
to compare it to window's existing Configuration.
Bug: 7094175
Change-Id: I99a9fd4af9a31871fe130db7b6bdf49bd51a6092
| -rwxr-xr-x | policy/src/com/android/internal/policy/impl/PhoneWindowManager.java | 18 | ||||
| -rwxr-xr-x | services/java/com/android/server/wm/WindowManagerService.java | 17 |
2 files changed, 18 insertions, 17 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java index e8af0a567f4e..91d5eaa792ef 100755 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -1473,16 +1473,24 @@ public class PhoneWindowManager implements WindowManagerPolicy { return getNonDecorDisplayHeight(fullWidth, fullHeight, rotation); } + @Override public boolean doesForceHide(WindowState win, WindowManager.LayoutParams attrs) { return attrs.type == WindowManager.LayoutParams.TYPE_KEYGUARD; } + @Override public boolean canBeForceHidden(WindowState win, WindowManager.LayoutParams attrs) { - return attrs.type != WindowManager.LayoutParams.TYPE_STATUS_BAR - && attrs.type != WindowManager.LayoutParams.TYPE_NAVIGATION_BAR - && attrs.type != WindowManager.LayoutParams.TYPE_WALLPAPER - && attrs.type != WindowManager.LayoutParams.TYPE_DREAM - && attrs.type != WindowManager.LayoutParams.TYPE_UNIVERSE_BACKGROUND; + switch (attrs.type) { + case TYPE_STATUS_BAR: + case TYPE_NAVIGATION_BAR: + case TYPE_WALLPAPER: + case TYPE_DREAM: + case TYPE_UNIVERSE_BACKGROUND: + case TYPE_KEYGUARD: + return false; + default: + return true; + } } /** {@inheritDoc} */ diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java index 77d815b31fe0..c3418727e338 100755 --- a/services/java/com/android/server/wm/WindowManagerService.java +++ b/services/java/com/android/server/wm/WindowManagerService.java @@ -2823,16 +2823,9 @@ public class WindowManagerService extends IWindowManager.Stub "Relayout window turning screen on: " + win); win.mTurnOnScreen = true; } - int diff = 0; - if (win.mConfiguration != mCurConfiguration - && (win.mConfiguration == null - || (diff=mCurConfiguration.diff(win.mConfiguration)) != 0)) { - win.mConfiguration = mCurConfiguration; - if (DEBUG_CONFIGURATION) { - Slog.i(TAG, "Window " + win + " visible with new config: " - + win.mConfiguration + " / 0x" - + Integer.toHexString(diff)); - } + if (win.isConfigChanged()) { + if (DEBUG_CONFIGURATION) Slog.i(TAG, "Window " + win + + " visible with new config: " + win.mConfiguration); outConfig.setTo(mCurConfiguration); } } @@ -8260,7 +8253,7 @@ public class WindowManagerService extends IWindowManager.Stub Slog.v(TAG, "1ST PASS " + win + ": gone=" + gone + " mHaveFrame=" + win.mHaveFrame + " mLayoutAttached=" + win.mLayoutAttached - + " screen changed=" + win.isConfigDiff(ActivityInfo.CONFIG_SCREEN_SIZE)); + + " screen changed=" + win.isConfigChanged()); final AppWindowToken atoken = win.mAppToken; if (gone) Slog.v(TAG, " GONE: mViewVisibility=" + win.mViewVisibility + " mRelayoutCalled=" @@ -8282,7 +8275,7 @@ public class WindowManagerService extends IWindowManager.Stub // windows, since that means "perform layout as normal, // just don't display"). if (!gone || !win.mHaveFrame || win.mLayoutNeeded - || win.isConfigDiff(ActivityInfo.CONFIG_SCREEN_SIZE) + || win.isConfigChanged() || win.mAttrs.type == TYPE_UNIVERSE_BACKGROUND) { if (!win.mLayoutAttached) { if (initial) { |