Adding support to restore widgets even for jelly beans.
> Show 'widget-not-ready' until the widget app is installed
> Once the app is installed, bind a new widget id (not required on L if
id-remap was received).
**Remove the widget if bind failed
> If the widget has no configuration screen, show the widget, otherwise
show 'setup-widget'.
> Clicking 'setup-widget' shows the config screen, and updates the
widget on RESULT_OK.
issue: 10779035
Change-Id: I2f8b06d09dd6acbc498cdd93edc59c26e5ce17af
diff --git a/src/com/android/launcher3/ItemInfo.java b/src/com/android/launcher3/ItemInfo.java
index c726fb4..8f96f74 100644
--- a/src/com/android/launcher3/ItemInfo.java
+++ b/src/com/android/launcher3/ItemInfo.java
@@ -124,6 +124,12 @@
}
ItemInfo(ItemInfo info) {
+ copyFrom(info);
+ // tempdebug:
+ LauncherModel.checkItemInfo(this);
+ }
+
+ public void copyFrom(ItemInfo info) {
id = info.id;
cellX = info.cellX;
cellY = info.cellY;
@@ -134,8 +140,6 @@
container = info.container;
user = info.user;
contentDescription = info.contentDescription;
- // tempdebug:
- LauncherModel.checkItemInfo(this);
}
public Intent getIntent() {