Skip to content

Commit c1fc0f0

Browse files
Jim MillerAndroid (Google) Code Review
authored andcommitted
Merge "Fix 6398209: Improve responsiveness of swipe up to search" into jb-dev
2 parents f103758 + d99e7fd commit c1fc0f0

File tree

3 files changed

+14
-16
lines changed

3 files changed

+14
-16
lines changed

packages/SystemUI/src/com/android/systemui/SearchPanelView.java

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public boolean isInContentArea(int x, int y) {
146146
}
147147
}
148148

149-
public void show(boolean show, boolean animate) {
149+
public void show(final boolean show, boolean animate) {
150150
if (animate) {
151151
if (mShowing != show) {
152152
mShowing = show;
@@ -156,21 +156,24 @@ public void show(boolean show, boolean animate) {
156156
mShowing = show;
157157
onAnimationEnd(null);
158158
}
159-
setVisibility(show ? View.VISIBLE : View.GONE);
160-
if (show) {
161-
setFocusable(true);
162-
setFocusableInTouchMode(true);
163-
requestFocus();
164-
}
159+
postDelayed(new Runnable() {
160+
public void run() {
161+
setVisibility(show ? View.VISIBLE : View.INVISIBLE);
162+
if (show) {
163+
setFocusable(true);
164+
setFocusableInTouchMode(true);
165+
requestFocus();
166+
}
167+
}
168+
}, show ? 0 : 100);
165169
}
166170

167171
public void hide(boolean animate) {
168-
if (!animate) {
169-
setVisibility(View.GONE);
170-
}
171172
if (mBar != null) {
172173
// This will indirectly cause show(false, ...) to get called
173174
mBar.animateCollapse();
175+
} else {
176+
setVisibility(View.INVISIBLE);
174177
}
175178
}
176179

packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,6 @@ public void showSearchPanel() {
482482
WindowManager.LayoutParams lp =
483483
(android.view.WindowManager.LayoutParams) mNavigationBarView.getLayoutParams();
484484
lp.flags &= ~WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
485-
lp.flags &= ~WindowManager.LayoutParams.FLAG_SLIPPERY;
486485
WindowManagerImpl.getDefault().updateViewLayout(mNavigationBarView, lp);
487486
}
488487

@@ -492,7 +491,6 @@ public void hideSearchPanel() {
492491
WindowManager.LayoutParams lp =
493492
(android.view.WindowManager.LayoutParams) mNavigationBarView.getLayoutParams();
494493
lp.flags |= WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
495-
lp.flags |= WindowManager.LayoutParams.FLAG_SLIPPERY;
496494
WindowManagerImpl.getDefault().updateViewLayout(mNavigationBarView, lp);
497495
}
498496

@@ -573,8 +571,7 @@ private WindowManager.LayoutParams getNavigationBarLayoutParams() {
573571
| WindowManager.LayoutParams.FLAG_TOUCHABLE_WHEN_WAKING
574572
| WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
575573
| WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
576-
| WindowManager.LayoutParams.FLAG_SPLIT_TOUCH
577-
| WindowManager.LayoutParams.FLAG_SLIPPERY,
574+
| WindowManager.LayoutParams.FLAG_SPLIT_TOUCH,
578575
PixelFormat.OPAQUE);
579576
// this will allow the navbar to run in an overlay on devices that support this
580577
if (ActivityManager.isHighEndGfx(mDisplay)) {

packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,6 @@ public void showSearchPanel() {
704704
WindowManager.LayoutParams lp =
705705
(android.view.WindowManager.LayoutParams) mStatusBarView.getLayoutParams();
706706
lp.flags &= ~WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
707-
lp.flags &= ~WindowManager.LayoutParams.FLAG_SLIPPERY;
708707
WindowManagerImpl.getDefault().updateViewLayout(mStatusBarView, lp);
709708
}
710709

@@ -714,7 +713,6 @@ public void hideSearchPanel() {
714713
WindowManager.LayoutParams lp =
715714
(android.view.WindowManager.LayoutParams) mStatusBarView.getLayoutParams();
716715
lp.flags |= WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
717-
lp.flags |= WindowManager.LayoutParams.FLAG_SLIPPERY;
718716
WindowManagerImpl.getDefault().updateViewLayout(mStatusBarView, lp);
719717
}
720718

0 commit comments

Comments
 (0)