From 2bc6b7c2b8b651dde0a65c64c127f5b85c1290d2 Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Thu, 1 Oct 2009 14:08:30 -0700 Subject: [PATCH] Fix the bug where you can grab the workspace while all apps is animating. You can still grab it, but now once all apps is up, it returns to where it belongs. --- src/com/android/launcher2/Workspace.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java index 788915e130..b2f0a4de05 100644 --- a/src/com/android/launcher2/Workspace.java +++ b/src/com/android/launcher2/Workspace.java @@ -769,7 +769,15 @@ public class Workspace extends ViewGroup implements DropTarget, DragSource, Drag @Override public boolean onTouchEvent(MotionEvent ev) { - if (mLauncher.isWorkspaceLocked() || mLauncher.isAllAppsVisible()) { + if (mLauncher.isWorkspaceLocked()) { + return false; // We don't want the events. Let them fall through to the all apps view. + } + if (mLauncher.isAllAppsVisible()) { + // Cancel any scrolling that is in progress. + if (!mScroller.isFinished()) { + mScroller.abortAnimation(); + } + snapToScreen(mCurrentScreen); return false; // We don't want the events. Let them fall through to the all apps view. }