summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authord34d <clark@cyngn.com>2015-06-17 15:29:52 -0700
committerClark Scheff <clark@cyngn.com>2015-06-17 22:57:07 +0000
commit713f8e5b0007985dbc91ef278c03f5a6d52afaf3 (patch)
tree685a51f846d4a65c11fc8fd2b5b23e35a9777a0a
parentdc157cb8ebb6e874e1880bb96bbb407be573baf4 (diff)
downloadandroid_packages_apps_Trebuchet-713f8e5b0007985dbc91ef278c03f5a6d52afaf3.tar.gz
android_packages_apps_Trebuchet-713f8e5b0007985dbc91ef278c03f5a6d52afaf3.tar.bz2
android_packages_apps_Trebuchet-713f8e5b0007985dbc91ef278c03f5a6d52afaf3.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 (cherry picked from commit 5b4a0806c8fe0414ef671ea8962e198fb08f3c82)
-rw-r--r--src/com/android/launcher3/Launcher.java11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index af4022fb4..05cfb405f 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -927,14 +927,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,