From 713f8e5b0007985dbc91ef278c03f5a6d52afaf3 Mon Sep 17 00:00:00 2001 From: d34d Date: Wed, 17 Jun 2015 15:29:52 -0700 Subject: 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) --- src/com/android/launcher3/Launcher.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/com') 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, -- cgit v1.2.3