Merge "Fix 6398209: Improve responsiveness of swipe up to search" into jb-dev
This commit is contained in:
@@ -146,7 +146,7 @@ public class SearchPanelView extends FrameLayout implements
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void show(boolean show, boolean animate) {
|
public void show(final boolean show, boolean animate) {
|
||||||
if (animate) {
|
if (animate) {
|
||||||
if (mShowing != show) {
|
if (mShowing != show) {
|
||||||
mShowing = show;
|
mShowing = show;
|
||||||
@@ -156,21 +156,24 @@ public class SearchPanelView extends FrameLayout implements
|
|||||||
mShowing = show;
|
mShowing = show;
|
||||||
onAnimationEnd(null);
|
onAnimationEnd(null);
|
||||||
}
|
}
|
||||||
setVisibility(show ? View.VISIBLE : View.GONE);
|
postDelayed(new Runnable() {
|
||||||
if (show) {
|
public void run() {
|
||||||
setFocusable(true);
|
setVisibility(show ? View.VISIBLE : View.INVISIBLE);
|
||||||
setFocusableInTouchMode(true);
|
if (show) {
|
||||||
requestFocus();
|
setFocusable(true);
|
||||||
}
|
setFocusableInTouchMode(true);
|
||||||
|
requestFocus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, show ? 0 : 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void hide(boolean animate) {
|
public void hide(boolean animate) {
|
||||||
if (!animate) {
|
|
||||||
setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
if (mBar != null) {
|
if (mBar != null) {
|
||||||
// This will indirectly cause show(false, ...) to get called
|
// This will indirectly cause show(false, ...) to get called
|
||||||
mBar.animateCollapse();
|
mBar.animateCollapse();
|
||||||
|
} else {
|
||||||
|
setVisibility(View.INVISIBLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -482,7 +482,6 @@ public class PhoneStatusBar extends BaseStatusBar {
|
|||||||
WindowManager.LayoutParams lp =
|
WindowManager.LayoutParams lp =
|
||||||
(android.view.WindowManager.LayoutParams) mNavigationBarView.getLayoutParams();
|
(android.view.WindowManager.LayoutParams) mNavigationBarView.getLayoutParams();
|
||||||
lp.flags &= ~WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
|
lp.flags &= ~WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
|
||||||
lp.flags &= ~WindowManager.LayoutParams.FLAG_SLIPPERY;
|
|
||||||
WindowManagerImpl.getDefault().updateViewLayout(mNavigationBarView, lp);
|
WindowManagerImpl.getDefault().updateViewLayout(mNavigationBarView, lp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -492,7 +491,6 @@ public class PhoneStatusBar extends BaseStatusBar {
|
|||||||
WindowManager.LayoutParams lp =
|
WindowManager.LayoutParams lp =
|
||||||
(android.view.WindowManager.LayoutParams) mNavigationBarView.getLayoutParams();
|
(android.view.WindowManager.LayoutParams) mNavigationBarView.getLayoutParams();
|
||||||
lp.flags |= WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
|
lp.flags |= WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
|
||||||
lp.flags |= WindowManager.LayoutParams.FLAG_SLIPPERY;
|
|
||||||
WindowManagerImpl.getDefault().updateViewLayout(mNavigationBarView, lp);
|
WindowManagerImpl.getDefault().updateViewLayout(mNavigationBarView, lp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -573,8 +571,7 @@ public class PhoneStatusBar extends BaseStatusBar {
|
|||||||
| WindowManager.LayoutParams.FLAG_TOUCHABLE_WHEN_WAKING
|
| WindowManager.LayoutParams.FLAG_TOUCHABLE_WHEN_WAKING
|
||||||
| WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
|
| WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
|
||||||
| WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
|
| WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
|
||||||
| WindowManager.LayoutParams.FLAG_SPLIT_TOUCH
|
| WindowManager.LayoutParams.FLAG_SPLIT_TOUCH,
|
||||||
| WindowManager.LayoutParams.FLAG_SLIPPERY,
|
|
||||||
PixelFormat.OPAQUE);
|
PixelFormat.OPAQUE);
|
||||||
// this will allow the navbar to run in an overlay on devices that support this
|
// this will allow the navbar to run in an overlay on devices that support this
|
||||||
if (ActivityManager.isHighEndGfx(mDisplay)) {
|
if (ActivityManager.isHighEndGfx(mDisplay)) {
|
||||||
|
|||||||
@@ -704,7 +704,6 @@ public class TabletStatusBar extends BaseStatusBar implements
|
|||||||
WindowManager.LayoutParams lp =
|
WindowManager.LayoutParams lp =
|
||||||
(android.view.WindowManager.LayoutParams) mStatusBarView.getLayoutParams();
|
(android.view.WindowManager.LayoutParams) mStatusBarView.getLayoutParams();
|
||||||
lp.flags &= ~WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
|
lp.flags &= ~WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
|
||||||
lp.flags &= ~WindowManager.LayoutParams.FLAG_SLIPPERY;
|
|
||||||
WindowManagerImpl.getDefault().updateViewLayout(mStatusBarView, lp);
|
WindowManagerImpl.getDefault().updateViewLayout(mStatusBarView, lp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -714,7 +713,6 @@ public class TabletStatusBar extends BaseStatusBar implements
|
|||||||
WindowManager.LayoutParams lp =
|
WindowManager.LayoutParams lp =
|
||||||
(android.view.WindowManager.LayoutParams) mStatusBarView.getLayoutParams();
|
(android.view.WindowManager.LayoutParams) mStatusBarView.getLayoutParams();
|
||||||
lp.flags |= WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
|
lp.flags |= WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
|
||||||
lp.flags |= WindowManager.LayoutParams.FLAG_SLIPPERY;
|
|
||||||
WindowManagerImpl.getDefault().updateViewLayout(mStatusBarView, lp);
|
WindowManagerImpl.getDefault().updateViewLayout(mStatusBarView, lp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user