diff options
author | Jim Miller <jaggies@google.com> | 2012-05-31 13:47:47 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-05-31 13:47:47 -0700 |
commit | 593b4446fd5cac974b86988cbd03f5a8c1a4862d (patch) | |
tree | 828eaea11c0099a296539c16bb5b2ae8885a932b /packages/SystemUI/src | |
parent | 4a3a9685d17cb29f70a7c56a3d33f2c8d5288e72 (diff) | |
parent | b490c3e64d4671133eb5e2c7a263f38879ef0ce3 (diff) | |
download | frameworks_base-593b4446fd5cac974b86988cbd03f5a8c1a4862d.zip frameworks_base-593b4446fd5cac974b86988cbd03f5a8c1a4862d.tar.gz frameworks_base-593b4446fd5cac974b86988cbd03f5a8c1a4862d.tar.bz2 |
Merge "Fix 6583164: Make navbar slippery when shade is open" into jb-dev
Diffstat (limited to 'packages/SystemUI/src')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index 3a50560..ecdaa39 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -484,14 +484,7 @@ public class PhoneStatusBar extends BaseStatusBar { @Override public void showSearchPanel() { - // XXX This is a bit of a hack. Since navbar is no longer slippery, we use the - // gesture to dismiss the expanded statusbar. - if (mExpanded) { - animateCollapse(); - return; - } else { - super.showSearchPanel(); - } + super.showSearchPanel(); WindowManager.LayoutParams lp = (android.view.WindowManager.LayoutParams) mNavigationBarView.getLayoutParams(); lp.flags &= ~WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL; @@ -1044,6 +1037,7 @@ public class PhoneStatusBar extends BaseStatusBar { mExpandedVisible = true; mNotificationPanel.setVisibility(View.VISIBLE); + makeSlippery(mNavigationBarView, true); updateExpandedViewPos(EXPANDED_LEAVE_ALONE); @@ -1059,6 +1053,16 @@ public class PhoneStatusBar extends BaseStatusBar { visibilityChanged(true); } + private static void makeSlippery(View view, boolean slippery) { + WindowManager.LayoutParams lp = (WindowManager.LayoutParams) view.getLayoutParams(); + if (slippery) { + lp.flags |= WindowManager.LayoutParams.FLAG_SLIPPERY; + } else { + lp.flags &= ~WindowManager.LayoutParams.FLAG_SLIPPERY; + } + WindowManagerImpl.getDefault().updateViewLayout(view, lp); + } + public void animateExpand() { if (SPEW) Slog.d(TAG, "Animate expand: expanded=" + mExpanded); if ((mDisabled & StatusBarManager.DISABLE_EXPAND) != 0) { @@ -1144,6 +1148,7 @@ public class PhoneStatusBar extends BaseStatusBar { mExpandedVisible = false; visibilityChanged(false); mNotificationPanel.setVisibility(View.INVISIBLE); + makeSlippery(mNavigationBarView, false); // Shrink the window to the size of the status bar only WindowManager.LayoutParams lp = (WindowManager.LayoutParams) mStatusBarWindow.getLayoutParams(); |