Content Provider is no longer the 1st entry point for an app.
Moving it to a custom application class instead
Bug: 301442482
Test: Verified that the startup code gets called
Flag: N/A
Change-Id: Ibedcc7bfb0294acd9252e1d6a2a1294df32524e9
Also fixing a race condition in model when an item update/delete task
gets queued and executed after the model has reloaded (making the old
data obsolete)
Bug: 277345535
Bug: 263079498
Test: Presubmit
Flag: N/A
Change-Id: Ibd4bdbb3eece05b38b73a22a4be5f368df3754f0
This reverts commit 9ef41413e0.
Reason for revert: This was the only launcher CL during the time b/280669657 and 280680602 occurred
Change-Id: Id7107f0935f84908ca87e1ae4c62ab05efe41a24
Migrating some of the class to use the controller directly, will
update the remaining calls in follow up cls
Bug: 277345535
Test: Presubmit
Change-Id: I8edc7c43665f94702ac64bd92932d6c94cb544a4
This allows support for easily setting up default layouts
Bug: 277345535
Test: Presubmit
Flag: N/A
Change-Id: I1c089d60ac3f8add8d7e1060d343e04d30afe094
This would make it easier to move the controller to LauncherModel
Bug: 277345535
Test: Presubmit
Flag: N/A
Change-Id: I4d044cf41361f400968ef65e18de5d3976fcdec7
In some cases, the test was long pressing on a recommendation for
google chrome and not a regular chrome icon and the events didn't
match. I don't think is good to relly on chrome getting recommended
so I'm making sure there is always a chrome app icon on the hotseat
Fix: 269163620
Test: atest TaplTestsLauncher3:testWorkspace (run on pixel 7 pro)
Change-Id: Ic8ee744a9af18d60de9bbedd42043f5abbbd7356
Fix: 235358918
Test: Manual
1. Rebooted the device and verified that widgets are still updating properly
2. Changed the theme from dark to daylight, then from daylight back to dark and verified that widgets are working
3. Kept the device on for several days and verified that widgets are still updating
4. Turn on auto-rotate for the launcher, open any app then exit, verified that widgets will not vanish and reappear
5. Add & remove widgets from the screen, added widgets are still updating
Change-Id: I98ee902f7d16b47bd77626201a4fefc897ba17a0
As observed in b/248291728, widgets are disappeared after OTA update,
this CL includes additional logging to reveal more information.
Bug: 248291728
Test: manual
Change-Id: I5cf968efc358c3315e5e6ecc4861d5bc888569f1
- Moved debug logs under DEBUG flag which defaults to false
- Moved info+ logs to permanent log tags
Fix: 198965093
Test: manual
Change-Id: Iea99f053da08e921542a8f532a9837997e10de5e
- Added TAPL objects to support TAPL tests for taskbar features
- Added tests for major taskbar features: hiding/showing the taskbar, opening all apps, lauching apps and app deep shortcuts from the taskbar/all apps page, launching apps and app deep shortcuts in splitscreen
- These tests should only run for large devices
Design: go/taskbar-tapl-tests
Test: ran tests locally with invalid configurations and remotely
Bug: 215218813
Change-Id: I3c28c339707467414aa47fa633f87fa0c1fdee57
- IDP can get re-initializeed during grid migration task, causing src/dest dbFile to be the same when prepareForMigration, which fails the migration and causes a wipe
- The fix is to cache IDP state as DeviceGridState, and use DeviceGridState to determine migration, trigger migration and save configuration after migration
- This should avoid migration failure in b/198965093 that causes homescreen wipe. Homescreen icon may still be messed up by the migration, but won't completely disappear
Bug: 198965093
Fix: 223579388
Test: manually trigger grid migration
Change-Id: I9890a6d5d530ff87aed8f601ec7d35a672b7cd46
- Allow icons to be added to first row where search container does not occupy
- On upgrade, clean up first row of screen 0 which may have junk data, as we used to assume first forw of screen 0 is always occupied
Bug: 210127246
Test: manual
Change-Id: I835a321964984e02632c8a70474a6551b5e360f7
Remove maxScreenId from LauncherProvider and whenever we need
a new screenId, query the database to calculate a new screenId.
Also converted and refactored AddWorkspaceItemsTaskTest
and added some extra test cases.
Test: manual & AddWorkspaceItemsTaskTest.kt
Bug: 199160559
Change-Id: I185f6823fed171d778af0130497f5ffaf89c0a70
- In RestoreDbTask.sanitizeDb, add extra step to fill all screenIds gaps so that no empty pages are left in between
e.g. [0, 3, 4, 6, 7] -> [0, 1, 2, 3, 4]
Fix: 201085524
Test: RestoreDbTaskTest
Change-Id: If0b577bf789347cc490ada0b22f2cd39ee1a33bb
- This ensure hotseat to be populated with default items, so it won't result in an empty taskbar which get stashed in apps
- Workspace needs to be cleared because shortcut / widget dragging won't always work if there are items in workspace. It only happens in test due to the way we drag items.
Fix: 202546679
Test: NexusLauncherTests:com.android.launcher3.ui.widget.RequestPinItemTest
Change-Id: Ib3ded6a685eaa1b169b75fd179c9e29ca4be1e72
Upgrade launcher DB version and remove items with
widget panel IDs from the database.
Test: follow test instructions (in CL comment)
Bug: 198254728
Change-Id: I077a5f70ee93b7eca738b38f6b0e788d49f7ce70
Test: manual
(1) Upgrading to new DB version is successful (no errors thrown in logcat)
(2) Widgets that were added with the old DB version have CONTAINER_UNKNOWN as their source container
(3) Widgets that are added with the new DB version still log source container after reboot
Bug: 185778648
Change-Id: Iaa38f0be6bc4cb0d29842f9a2ea0d08de000c930
Split InvariantDeviceProfile#numHotseatIcons into two variables:
numDatabaseHotseatIcons and numShownHotseatIcons. These are generally
the same, but different DisplayOptions within the same GridOption
can choose to show different numbers of hotseat icons while sharing
the same database.
numDatabaseHotseatIcons is used for all reading/writing/migrating
purposes, while numShownHotseatIcons determines how many Hotseat
icons to show in the UI.
Test: Existing tests pass, added two new migration tests
Bug: 184789479
Bug: 171917176
Change-Id: I54583504f61a47a4444b6a637ebb7e3ab31528b7
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
Launcher overwrites user's favorites table (icons in WorkSpace) upon new
install session from Play Store with install reason being restore. The
overwrite was introduced in the attempt to mitigate failed restore
session due to asynchronous nature of user profile restore, but it has
been causing general instability in backup and restore. Going forward
Launcher should be moving away from table overwrite approach, this will
be implemented in b/148284747.
Bug: 171774227
Test: manual
Change-Id: I91221544dbaeb42224ce9f595906b6d9f0e4aa89
already-closed DB.
Since the DB is already closed, if we can't end the
transaction, it should not put the code in a bad state.
Bug: 173162852
Test: manually tested backup and restore flow and existing tests
Change-Id: I2692d98f0a8efc8aeb6bfd826fe738e4436c6ee4
When loading the workspace, Launcher pins/unpins shortcuts in comply
with the loaded workspace. Since minimal device mode creates a mostly
empty workspace, existing shortcuts are getting unpinned as a result.
To mitigate the issue this CL compares the db name and only invoke
sanitizeData when it matches the one defined in InvariantDeviceProfile.
Bug: 170611866
Test: manual
1. add some deep shortcut in workspace (e.g. long tap on chrome, drag
"incognito tab" to workspace)
2. opt-in to sunshine fishfood (g/sunshine-teamfood)
3. enable bedtime mode with minimal device in Settings -> Digital
Wellbeing -> Show Your Data -> Bedtime mode -> Customize -> minimal
device
4. toggle bedtime mode, wait for apps in minimal device to show, then
toggle off bedtime mode
5. verify the deep shortcut still exist
Change-Id: Ie18216ecb288e7481aa2404c4cb3ea418aee85cb
(cherry picked from commit 702ed27886)
Introduces a separate database for minimal device mode.
When minimal device mode is enabled/disabled:
1. WellbeingModel receives onChange event from ContentObserver
2. WellbeingModel called DWB's ContentProvider for latest state in
minimal device mode
3. Based on the state, WellbeingModel calls LauncherProvider to put
launcher into normal/minimal mode.
4. When going from normal -> minimal, Launcher switches to a different
database, namely minimal.db, then proceed to database initialization.
5. If the database hasn't been initialized yet, Launcher will call
ContentResolver#openInputStream with following uri:
content://com.google.android.apps.wellbeing.api/launcher_layout
to get the default layout xml.
6. The default layout is then saved in database, and the database is
considered initialized and doesn't need to go through step 5 again in
the future.
7. In case of minimal -> normal, Launcher switches back to its original
database (e.g. launcher.db if the grid size is 5x5), then reload launcher.
Bug: 161462256
Change-Id: I6bafa66440da23281f63454b698ea56b15960022
- Creates a backup table `hybrid_hotseat_restore` and copies current workspace layout before hotseat migration
- restores to back up when user turns off suggestions and launcher receives empty predicted items
- deletes hybrid_hotseat_restore table if there's a layout change
Test: Manual
Bug: 157688471
Change-Id: Iaf7ddb33799493d36dbcd12408b57224162221d9