diff options
author | Joe Onorato <joeo@android.com> | 2010-09-01 12:13:25 -0700 |
---|---|---|
committer | Joe Onorato <joeo@android.com> | 2010-09-01 12:15:10 -0700 |
commit | 6b4adbc0558fcebbd44998bd00dcd334ddbee32d (patch) | |
tree | d043aca4884711e28b2183454d244e6989b7ded5 /src/com/android | |
parent | ddc9c1fb1ab426772add520d277ea9c2cd674094 (diff) | |
download | packages_apps_trebuchet-6b4adbc0558fcebbd44998bd00dcd334ddbee32d.zip packages_apps_trebuchet-6b4adbc0558fcebbd44998bd00dcd334ddbee32d.tar.gz packages_apps_trebuchet-6b4adbc0558fcebbd44998bd00dcd334ddbee32d.tar.bz2 |
DO NOT MERGE - Allow the workspace to swipe while it's loading.
You still can't modify the contents of the workspace while it's loading,
but this makes it appear a little bit more responsive. Launching apps
while the launcher is loading has always been possible.
Bug: 2748595
Change-Id: Iaf203c7358647a9b2211bb7386579ae75b82a698
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/launcher2/AllApps3D.java | 7 | ||||
-rw-r--r-- | src/com/android/launcher2/Workspace.java | 14 |
2 files changed, 9 insertions, 12 deletions
diff --git a/src/com/android/launcher2/AllApps3D.java b/src/com/android/launcher2/AllApps3D.java index 66d2540..d06624d 100644 --- a/src/com/android/launcher2/AllApps3D.java +++ b/src/com/android/launcher2/AllApps3D.java @@ -693,7 +693,12 @@ public class AllApps3D extends RSSurfaceView } public boolean onLongClick(View v) { - if (mLocks != 0 || !isVisible()) { + // We don't accept long click events in these cases + // - If the workspace isn't ready to accept a drop + // - If we're not done loading (because we might be confused about which item + // to pick up + // - If we're not visible + if (!isVisible() || mLauncher.isWorkspaceLocked() || mLocks != 0) { return true; } if (sRollo.checkClickOK() && mCurrentIconIndex == mDownIconIndex diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java index e482e49..ba45b48 100644 --- a/src/com/android/launcher2/Workspace.java +++ b/src/com/android/launcher2/Workspace.java @@ -660,9 +660,7 @@ public class Workspace extends ViewGroup public boolean requestChildRectangleOnScreen(View child, Rect rectangle, boolean immediate) { int screen = indexOfChild(child); if (screen != mCurrentScreen || !mScroller.isFinished()) { - if (!mLauncher.isWorkspaceLocked()) { - snapToScreen(screen); - } + snapToScreen(screen); return true; } return false; @@ -729,8 +727,7 @@ public class Workspace extends ViewGroup if (ev.getAction() == MotionEvent.ACTION_DOWN) { // (In XLarge mode, the workspace is shrunken below all apps, and responds to taps // ie when you click on a mini-screen, it zooms back to that screen) - if (mLauncher.isWorkspaceLocked() || - (!LauncherApplication.isScreenXLarge() && mLauncher.isAllAppsVisible())) { + if (!LauncherApplication.isScreenXLarge() && mLauncher.isAllAppsVisible()) { return false; } } @@ -753,12 +750,11 @@ public class Workspace extends ViewGroup @Override public boolean onInterceptTouchEvent(MotionEvent ev) { - final boolean workspaceLocked = mLauncher.isWorkspaceLocked(); final boolean allAppsVisible = mLauncher.isAllAppsVisible(); // (In XLarge mode, the workspace is shrunken below all apps, and responds to taps // ie when you click on a mini-screen, it zooms back to that screen) - if (workspaceLocked || (!LauncherApplication.isScreenXLarge() && allAppsVisible)) { + if (!LauncherApplication.isScreenXLarge() && allAppsVisible) { return false; // We don't want the events. Let them fall through to the all apps view. } @@ -961,10 +957,6 @@ public class Workspace extends ViewGroup @Override public boolean onTouchEvent(MotionEvent ev) { - - 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()) { |