diff options
author | John Spurlock <jspurlock@google.com> | 2013-12-04 13:47:36 -0500 |
---|---|---|
committer | John Spurlock <jspurlock@google.com> | 2013-12-04 13:47:36 -0500 |
commit | 414c1f0e861dead042689827aa1fbbd205f36d41 (patch) | |
tree | 8c5623239bee79e02a2a7b04f5407bb9c78d205d | |
parent | c3c4d36df01631883a79163da841ca222497c9d3 (diff) | |
download | frameworks_base-414c1f0e861dead042689827aa1fbbd205f36d41.zip frameworks_base-414c1f0e861dead042689827aa1fbbd205f36d41.tar.gz frameworks_base-414c1f0e861dead042689827aa1fbbd205f36d41.tar.bz2 |
Volume panel should not clear system ui flags.
Remove private WM flag (used only by the volume panel) to force
the clearable system UI flags clear.
Instead, always lay out the volume panel as if the bars are visible,
as we do for system dialogs - and don't clear the flags.
Reverts part of I25f29af5b6518aba695b64a75977ae240b742118
Bug:11986621
Change-Id: I842729d729d2a6eb2a687d0b930ddb160c6a1b57
-rw-r--r-- | core/java/android/view/VolumePanel.java | 1 | ||||
-rw-r--r-- | core/java/android/view/WindowManager.java | 7 | ||||
-rw-r--r-- | policy/src/com/android/internal/policy/impl/PhoneWindowManager.java | 16 |
3 files changed, 7 insertions, 17 deletions
diff --git a/core/java/android/view/VolumePanel.java b/core/java/android/view/VolumePanel.java index f0e6677..52f9c0b 100644 --- a/core/java/android/view/VolumePanel.java +++ b/core/java/android/view/VolumePanel.java @@ -311,7 +311,6 @@ public class VolumePanel extends Handler implements OnSeekBarChangeListener, Vie lp.type = LayoutParams.TYPE_VOLUME_OVERLAY; lp.width = LayoutParams.WRAP_CONTENT; lp.height = LayoutParams.WRAP_CONTENT; - lp.privateFlags |= LayoutParams.PRIVATE_FLAG_FORCE_SHOW_NAV_BAR; window.setAttributes(lp); window.addFlags(LayoutParams.FLAG_NOT_FOCUSABLE | LayoutParams.FLAG_NOT_TOUCH_MODAL | LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH); diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java index 0ce4da5..53a4c0d0 100644 --- a/core/java/android/view/WindowManager.java +++ b/core/java/android/view/WindowManager.java @@ -1063,13 +1063,6 @@ public interface WindowManager extends ViewManager { public static final int PRIVATE_FLAG_SHOW_FOR_ALL_USERS = 0x00000010; /** - * Special flag for the volume overlay: force the window manager out of "hide nav bar" - * mode while the window is on screen. - * - * {@hide} */ - public static final int PRIVATE_FLAG_FORCE_SHOW_NAV_BAR = 0x00000020; - - /** * Never animate position changes of the window. * * {@hide} */ diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java index 4d84984..8e83255 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -3260,8 +3260,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { + mRestrictedScreenWidth; pf.bottom = df.bottom = of.bottom = cf.bottom = mRestrictedScreenTop + mRestrictedScreenHeight; - } else if (attrs.type == TYPE_TOAST || attrs.type == TYPE_SYSTEM_ALERT) { - // Toasts are stable to interim decor changes. + } else if (attrs.type == TYPE_TOAST || attrs.type == TYPE_SYSTEM_ALERT + || attrs.type == TYPE_VOLUME_OVERLAY) { + // These dialogs are stable to interim decor changes. pf.left = df.left = of.left = cf.left = mStableLeft; pf.top = df.top = of.top = cf.top = mStableTop; pf.right = df.right = of.right = cf.right = mStableRight; @@ -3365,13 +3366,10 @@ public class PhoneWindowManager implements WindowManagerPolicy { WindowManager.LayoutParams attrs) { if (DEBUG_LAYOUT) Slog.i(TAG, "Win " + win + ": isVisibleOrBehindKeyguardLw=" + win.isVisibleOrBehindKeyguardLw()); - if (mTopFullscreenOpaqueWindowState == null && (win.getAttrs().privateFlags - &WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_SHOW_NAV_BAR) != 0 - || (win.isVisibleLw() && attrs.type == TYPE_INPUT_METHOD)) { - if (mForcingShowNavBarLayer < 0) { - mForcingShowNavBar = true; - mForcingShowNavBarLayer = win.getSurfaceLayer(); - } + if (mTopFullscreenOpaqueWindowState == null + && win.isVisibleLw() && attrs.type == TYPE_INPUT_METHOD) { + mForcingShowNavBar = true; + mForcingShowNavBarLayer = win.getSurfaceLayer(); } if (mTopFullscreenOpaqueWindowState == null && win.isVisibleOrBehindKeyguardLw() && !win.isGoneForLayoutLw()) { |