summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authord34d <clark@cyngn.com>2015-06-17 22:29:52 (GMT)
committerd34d <clark@cyngn.com>2015-06-17 22:41:12 (GMT)
commit5b4a0806c8fe0414ef671ea8962e198fb08f3c82 (patch)
tree86361167f04d52d0235f8f9053373b97ed711952
parent2788cebadb3424cb8d47fc36a90d2542e78d32e5 (diff)
downloadandroid_packages_apps_Trebuchet-5b4a0806c8fe0414ef671ea8962e198fb08f3c82.zip
android_packages_apps_Trebuchet-5b4a0806c8fe0414ef671ea8962e198fb08f3c82.tar.gz
android_packages_apps_Trebuchet-5b4a0806c8fe0414ef671ea8962e198fb08f3c82.tar.bz2
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.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 bee0b0f..01f3017 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,