Improving widget transitions:
-> When a widget has no configuration activity, we bind
and inflate it when the user picks it up. This allows
us to smoothly transition between it's preview and
some actual state of the widget when it is dropped.
-> When a widget has a configuration activity, we delay
the above process until the configuration activity
has been run at which time we transition between
the preview and the actual widget.
Change-Id: I5265cd98400d70e5e75c3dcd21e322ed0b352d7b
diff --git a/src/com/android/launcher2/PendingAddItemInfo.java b/src/com/android/launcher2/PendingAddItemInfo.java
index 9c52ecf..851dddb 100644
--- a/src/com/android/launcher2/PendingAddItemInfo.java
+++ b/src/com/android/launcher2/PendingAddItemInfo.java
@@ -16,6 +16,7 @@
package com.android.launcher2;
+import android.appwidget.AppWidgetHostView;
import android.appwidget.AppWidgetProviderInfo;
import android.content.ComponentName;
import android.os.Parcelable;
@@ -35,6 +36,8 @@
int minHeight;
int previewImage;
int icon;
+ AppWidgetProviderInfo info;
+ AppWidgetHostView boundWidget;
// Any configuration data that we want to pass to a configuration activity when
// starting up a widget
@@ -43,6 +46,7 @@
public PendingAddWidgetInfo(AppWidgetProviderInfo i, String dataMimeType, Parcelable data) {
itemType = LauncherSettings.Favorites.ITEM_TYPE_APPWIDGET;
+ this.info = i;
componentName = i.provider;
minWidth = i.minWidth;
minHeight = i.minHeight;