diff options
| author | Samuel Fufa <sfufa@google.com> | 2020-02-12 17:56:21 -0800 |
|---|---|---|
| committer | Samuel Fufa <sfufa@google.com> | 2020-02-24 19:07:59 +0000 |
| commit | 1acbf7763b9019efcc956c8d70df75db9f8fce41 (patch) | |
| tree | bfa0cb2a4f9f6c7ffe96afc7850d0cf9f0426e73 /core/java/android/appwidget/AppWidgetManager.java | |
| parent | 27f83cdbcefd687632811996e25ece99f7e1ac69 (diff) | |
Fix widget restore flow
After restore, the app should set OPTION_APPWIDGET_RESTORE_COMPLETED to
true on its widgets followed by calling updateAppWidget to update views.
Bug:63667276
Test: Manual
Change-Id: Idb6fc63b0f894fca9e0470aaf335240fc124e2e9
Diffstat (limited to 'core/java/android/appwidget/AppWidgetManager.java')
| -rw-r--r-- | core/java/android/appwidget/AppWidgetManager.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/java/android/appwidget/AppWidgetManager.java b/core/java/android/appwidget/AppWidgetManager.java index 6dea1c69ce86..ccd8199b8373 100644 --- a/core/java/android/appwidget/AppWidgetManager.java +++ b/core/java/android/appwidget/AppWidgetManager.java @@ -182,6 +182,16 @@ public class AppWidgetManager { public static final String EXTRA_APPWIDGET_ID = "appWidgetId"; /** + * A bundle extra that contains whether or not an app has finished restoring a widget. + * <p> After restore, the app should set OPTION_APPWIDGET_RESTORE_COMPLETED to true on its + * widgets followed by calling {@link #updateAppWidget} to update the views. + * + * @see #updateAppWidgetOptions(int, Bundle) + */ + public static final String OPTION_APPWIDGET_RESTORE_COMPLETED = "appWidgetRestoreCompleted"; + + + /** * A bundle extra that contains the lower bound on the current width, in dips, of a widget instance. */ public static final String OPTION_APPWIDGET_MIN_WIDTH = "appWidgetMinWidth"; |
