diff options
author | d34d <clark@cyngn.com> | 2015-06-17 15:29:52 -0700 |
---|---|---|
committer | d34d <clark@cyngn.com> | 2015-06-17 15:41:12 -0700 |
commit | 5b4a0806c8fe0414ef671ea8962e198fb08f3c82 (patch) | |
tree | 86361167f04d52d0235f8f9053373b97ed711952 | |
parent | 2788cebadb3424cb8d47fc36a90d2542e78d32e5 (diff) | |
download | android_packages_apps_Trebuchet-5b4a0806c8fe0414ef671ea8962e198fb08f3c82.tar.gz android_packages_apps_Trebuchet-5b4a0806c8fe0414ef671ea8962e198fb08f3c82.tar.bz2 android_packages_apps_Trebuchet-5b4a0806c8fe0414ef671ea8962e198fb08f3c82.zip |
Complete widget drop without extra screen animation
When calling Workspace.removeExtraEmptyScreenDelayed() and
Launcher.isWorkspaceLoading is true, the onComplete runnable will
not be called which will prevent the widget from being added to
the workspace.
Change-Id: I753488e7f389a86edf056f934021634391a8fb84
-rw-r--r-- | src/com/android/launcher3/Launcher.java | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index bee0b0fd1..01f3017ed 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -958,14 +958,9 @@ public class Launcher extends Activity final CellLayout dropLayout = mWorkspace.getScreenWithId(mPendingAddInfo.screenId); dropLayout.setDropPending(true); - final Runnable onComplete = new Runnable() { - @Override - public void run() { - completeTwoStageWidgetDrop(resultCode, appWidgetId); - dropLayout.setDropPending(false); - } - }; - mWorkspace.removeExtraEmptyScreenDelayed(true, onComplete, + completeTwoStageWidgetDrop(resultCode, appWidgetId); + dropLayout.setDropPending(false); + mWorkspace.removeExtraEmptyScreenDelayed(true, null, ON_ACTIVITY_RESULT_ANIMATION_DELAY, false); } else { PendingAddArguments args = preparePendingAddArgs(requestCode, data, appWidgetId, |