Merge "DO NOT MERGE - Disabled swiping in Grid-based Recents." into nyc-mr2-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
b9606a5d09
@@ -168,7 +168,7 @@ class TaskStackViewTouchHandler implements SwipeHelper.Callback {
|
||||
/** Touch preprocessing for handling below */
|
||||
public boolean onInterceptTouchEvent(MotionEvent ev) {
|
||||
// Pass through to swipe helper if we are swiping
|
||||
mInterceptedBySwipeHelper = mSwipeHelper.onInterceptTouchEvent(ev);
|
||||
mInterceptedBySwipeHelper = isSwipingEnabled() && mSwipeHelper.onInterceptTouchEvent(ev);
|
||||
if (mInterceptedBySwipeHelper) {
|
||||
return true;
|
||||
}
|
||||
@@ -680,4 +680,11 @@ class TaskStackViewTouchHandler implements SwipeHelper.Callback {
|
||||
public float getScaledDismissSize() {
|
||||
return 1.5f * Math.max(mSv.getWidth(), mSv.getHeight());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether swiping is enabled.
|
||||
*/
|
||||
private boolean isSwipingEnabled() {
|
||||
return !mSv.useGridLayout();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user