diff options
author | Joe Onorato <joeo@android.com> | 2009-10-01 14:08:30 -0700 |
---|---|---|
committer | Joe Onorato <joeo@android.com> | 2009-10-01 14:08:30 -0700 |
commit | 2bc6b7c2b8b651dde0a65c64c127f5b85c1290d2 (patch) | |
tree | b979ec53d9c266ff641dcf33a2ab8c7a3679ac1f | |
parent | e52a1b5909bbae99cd1830cc5375fc02eaf5a747 (diff) | |
download | packages_apps_trebuchet-2bc6b7c2b8b651dde0a65c64c127f5b85c1290d2.zip packages_apps_trebuchet-2bc6b7c2b8b651dde0a65c64c127f5b85c1290d2.tar.gz packages_apps_trebuchet-2bc6b7c2b8b651dde0a65c64c127f5b85c1290d2.tar.bz2 |
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.
-rw-r--r-- | src/com/android/launcher2/Workspace.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java index 788915e..b2f0a4d 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. } |