Fixing preloaded widget not getting used for animation
> The preloaded widget was being set in a different instance of
PendingAddWidgetInfo and was never getting used for animation.
bug: 20699153
Change-Id: Iaec13640e49c66993b4695e4a52dc3a3a2133fb2
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 2ff6adc..9756727 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -2370,6 +2370,9 @@
if (hostView != null) {
appWidgetId = hostView.getAppWidgetId();
addAppWidgetImpl(appWidgetId, info, hostView, info.info);
+
+ // Clear the boundWidget so that it doesn't get destroyed.
+ info.boundWidget = null;
} else {
// In this case, we either need to start an activity to get permission to bind
// the widget, or we need to start an activity to configure the widget, or both.