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.
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 @@
@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.
}