I will use the newly created LauncherAppWidgetProviderInfoTest in a follow-up CL to add tests for the newly added widget sizing APIs.
Test: Automatic: Ran all robolectric tests in launcher3,
Manual: Added a widget, edited the widget, removed the widget
Bug: 179807199
Change-Id: I540b2dbe284c6eb5aa2466a1d13a9581ee59425b
After SuW the favorite table is copied into backup table, but the widget
id in the backup table hasn't been migrated. This introduces general
unstabality and can sometimes leads to the disappearance of widgets
after a restore.
Bug: 171774227
Test: run Backup Restore flows and verified database status with arbitrary
logging
Change-Id: If275a6b5395504d6de90e26c3998f759e797f6e1
Bug: 171774227
Test: manual testing
1. randomly add/remove widgets to workspace
2. create a backup (Settings > System > Backup)
3. reset the device
4. restore from the backup
5. verify all of the widgets are restored properly
Change-Id: Id65e474dd9349aca715d7e6b88f8d58bc63066ae
> Changing the lifecycle to follow other static objects in Launcher
> Removing compat interface and inlining everything to helpers
Bug: 141376165
Change-Id: I82bd5db1969101de9a7eac77f32728d70195bb35
* Platform bug causes work profile widgets to be restored with main profile
provider.
* If we skip restore the widgets under the work profile during restore, then
launcher will re-create the widget but with the correct profile provider.
* Needs to be fixed in platform, but this launcher side change will work for
now.
Bug: 135926478
Change-Id: I80300c83e82cea9da84fdcdf7ad03188769b6cac
Previously, it was possible for AppWidgetsRestoredReceiver to
start the restore process before work profile has finished restoring which
resulted in the work profile items being removed from the workspace.
Bug: 131315856
Change-Id: I2f295a1ca91f1996522bcc8052aa139979526e3b
Ignoring thw broadcast if its not for the main widget host, or if
the Launcher DB is already in use. Launcher already handles missing
widget-Id map broadcast, by binding a new widgetId at runtime.
Bug: 63389280
Change-Id: Iaa9774d6d7adde3711cba9615328020e2b2e66aa
Instead of maintaining 3 different states, each tied to a subset of data,
maintaing a single state that represents all the data. Individual subset
data is invalidated in rare cases and these invalidates are tightly tied
to the UI. This also allows us to add new data to the model, without worring
about classifying the data into a subset.
Bug: 34112546
Change-Id: Id9cb273de35b79e84a2ef8d6556fcf1e72fb4b75
> We are making the DB call (IO) on the UI thread which is costlier than
the AppWidgetHost call.
> The process can get killed after the broadcast receiver returns, which
can prevent these ids from getting deleted.
Change-Id: I47746cf03d0eae573b6baa25cde9e573fd1f1a60
> 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
When the app is restored, it displays placeholders for all pending widgets.
These placeholders can be moved and removed similar to a widget (size is fixed
to what defined in backup). Once the system notifies the launcher of the new
widget ids, the place holders are replaced with actual widgets.
issue: 10779035
Change-Id: I68cbe4da01e9ca2978cb4471a7c645d2aa592055