Fixing some touch / interaction problems

-> Weird reorder/scroll mode hybrid (issue 10550801)
-> Entering overview mode when we shouldn't (issue 10855389)

Change-Id: Ic936ead8deb3a5d4e00f265d09329528a1517063
This commit is contained in:
Adam Cohen committed 2013-09-26 13:53:23 -07:00
1 parent 98928dbed8
commit 93c9756e7a
3 files changed
+17 -7

No files matched your search

+5 -2
View File
@@ -1316,13 +1316,13 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
*/
if (mActivePointerId != INVALID_POINTER) {
determineScrollingStart(ev);
break;
}
// if mActivePointerId is INVALID_POINTER, then we must have missed an ACTION_DOWN
// event. in that case, treat the first occurence of a move event as a ACTION_DOWN
// i.e. fall through to the next case (don't break)
// (We sometimes miss ACTION_DOWN events in Workspace because it ignores all events
// while it's small- this was causing a crash before we checked for INVALID_POINTER)
break;
}
case MotionEvent.ACTION_DOWN: {
@@ -2373,7 +2373,10 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
}
public boolean startReordering(View v) {
int dragViewIndex = indexOfChild(v);//getPageNearestToCenterOfScreen();
int dragViewIndex = indexOfChild(v);
if (mTouchState != TOUCH_STATE_REST) return false;
mTempVisiblePagesRange[0] = 0;
mTempVisiblePagesRange[1] = getPageCount() - 1;
getOverviewModePages(mTempVisiblePagesRange);