DO NOT MERGE - Disabled swiping in Grid-based Recents.

am: 620aebabb2

Change-Id: I24914bfe923ec251adff8c931c32398c013ac581
This commit is contained in:
Jiaquan He
2016-12-21 18:18:34 +00:00
committed by android-build-merger

View File

@@ -168,7 +168,7 @@ class TaskStackViewTouchHandler implements SwipeHelper.Callback {
/** Touch preprocessing for handling below */ /** Touch preprocessing for handling below */
public boolean onInterceptTouchEvent(MotionEvent ev) { public boolean onInterceptTouchEvent(MotionEvent ev) {
// Pass through to swipe helper if we are swiping // Pass through to swipe helper if we are swiping
mInterceptedBySwipeHelper = mSwipeHelper.onInterceptTouchEvent(ev); mInterceptedBySwipeHelper = isSwipingEnabled() && mSwipeHelper.onInterceptTouchEvent(ev);
if (mInterceptedBySwipeHelper) { if (mInterceptedBySwipeHelper) {
return true; return true;
} }
@@ -680,4 +680,11 @@ class TaskStackViewTouchHandler implements SwipeHelper.Callback {
public float getScaledDismissSize() { public float getScaledDismissSize() {
return 1.5f * Math.max(mSv.getWidth(), mSv.getHeight()); return 1.5f * Math.max(mSv.getWidth(), mSv.getHeight());
} }
/**
* Returns whether swiping is enabled.
*/
private boolean isSwipingEnabled() {
return !mSv.useGridLayout();
}
} }