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.
This commit is contained in:
Joe Onorato
2009-10-01 14:08:30 -07:00
parent e52a1b5909
commit 2bc6b7c2b8

View File

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