Moving various runnables in LauncherModel to individual tasks
> Adding tests for some of the runnable
Change-Id: I1a315d38878857df3371f0e69d622a41fc3b081a
diff --git a/src/com/android/launcher3/LauncherAppWidgetInfo.java b/src/com/android/launcher3/LauncherAppWidgetInfo.java
index 66d8957..78f5b8e 100644
--- a/src/com/android/launcher3/LauncherAppWidgetInfo.java
+++ b/src/com/android/launcher3/LauncherAppWidgetInfo.java
@@ -84,12 +84,12 @@
/**
* Indicates the restore status of the widget.
*/
- int restoreStatus;
+ public int restoreStatus;
/**
* Indicates the installation progress of the widget provider
*/
- int installProgress = -1;
+ public int installProgress = -1;
/**
* Optional extras sent during widget bind. See {@link #FLAG_DIRECT_CONFIG}.
@@ -98,7 +98,7 @@
private boolean mHasNotifiedInitialWidgetSizeChanged;
- LauncherAppWidgetInfo(int appWidgetId, ComponentName providerName) {
+ public LauncherAppWidgetInfo(int appWidgetId, ComponentName providerName) {
if (appWidgetId == CUSTOM_WIDGET_ID) {
itemType = LauncherSettings.Favorites.ITEM_TYPE_CUSTOM_APPWIDGET;
} else {
@@ -117,6 +117,11 @@
restoreStatus = RESTORE_COMPLETED;
}
+ /** Used for testing **/
+ public LauncherAppWidgetInfo() {
+ itemType = LauncherSettings.Favorites.ITEM_TYPE_APPWIDGET;
+ }
+
public boolean isCustomWidget() {
return appWidgetId == CUSTOM_WIDGET_ID;
}