-The grid migration where we just copy the grid and move everything one row up should only occur in a B&R scenario, so now we add that restriction
-We should default to 4x5 in comet if migrating from a 4x4 grid if the device we're migrating from does not have any other grids saved
-if we have other grids saved, then we'll try using the saved grid if possible. If not possible, we use the default grid for the new device
Bug: 360462379
Test: GridSizeMigrationUtilTest
Flag: EXEMPT bugfix
Change-Id: Ia905081046431c08dc058bd61b2b4ab42dee0506
- refactor FirstScreenBroadcast.java into FirstScreenBroadcastHelper.kt
- send Extras to include installed/archived items on first screen
- send Extras to include installed/archived widgets on all screens.
- truncate items to limit Broadcast size
Bug: 322314760
Test: unit testing and E2E test of B&R
Flag: launcher_broadcast_installed_apps
Change-Id: I214149ac0c63f177d3d1ca0b6d0cb11be37f4ae0
> Making SafeCloseable implementation mandatory, to prevent leaks during test and preview
> Removing getNoCreate method and defining executeIfCreated to avoid null pointer exceptions
> Fixing sandbox value leaking into main, by Checking sandbox against App context
> Converting sanbox to an interface instead a class
Bug: 335280439
Test: Presubmit
Flag: None
Change-Id: I951dcde871898e745ff6490a1c4f8fd1512888f5
We also check if the new default is bigger than or equal to the
previous one.
Flag: ACONFIG enable_grid_migration_fix enabled
Flag: ACONFIG enable_narrow_grid_restore enabled
Bug: 325286145
Bug: 325285743
Test: BackupAndRestoreDBSelectionTest.kt
Test: GridMigrationTest.kt
Change-Id: I98315a4e4c112ca96a74200dd76016803dfaf820
When restoring from a tablet because phones don't have
the same table some issues can ocure because we setup a
non valid grid, the correct thing is to setup a default.
Bug: 325285743
Fix: 332964986
Flag: ACONFIG narrow_grid_restore enabled
Test: BackupAndRestoreDBSelectionTest
Change-Id: I28bf02e83dddf5ae84818d879a5e21600eddf67e
To prevent the error I introduce the method restorePreviousState().
This reverts commit 1234090589.
Reason for revert: Fixing presubmit breaks
Bug: 325285743
Flag: ACONFIG narrow_grid_restore disabled
Test: BackupAndRestoreDBSelectionTest
Change-Id: I63666c29eb91dada4243af019ab0538c40bc0f78
Adding test to make sure this is the case.
Bug: 325285743
Flag: ACONFIG narrow_grid_restore disabled
Test: BackupAndRestoreDBSelectionTest
Change-Id: I84c3a92f40598137d5c5c52d34af7583b384122c
This removes duplicate logic for widget inflation.
Since the widget inflation can now happen during loader,
the restore logging can also be moved completely to the loader
Bug: 318539160
Test: atest TaplBinderTests
Flag: None
Change-Id: If9f336e7bf49ee7df121d7d9852b674d98124895
This is necessary because the value of the read-write flag will not be updated in time for backup/restore.
Bug: 307527314
Test: compiles
Flag: ACONFIG ENABLE_LAUNCHER_BR_METRICS_FIXED TEAMFOOD
Change-Id: I67a1a820734d8881b3ed5be4a1f2f1556e6e4704
This is necessary because the aconfig flag requires reboot to enable, however backup/restore happens on the first load so the flag will not be ready.
Flag: LEGACY ENABLE_LAUNCHER_BR_METRICS TEAMFOOD
Test: compilation / presubmit
Bug: 305984208
Change-Id: Ida90b1bd485fb037ebf3dde7ad17bf4e462661e6
- Adds flag for indicating when we are loading after a restore, separate from the pending restore flag
- Adds many success/failure scenario metrics when loading and binding items
Flag: ACONFIG enable_launcher_br_metrics DEVELOPMENT
Test: locally verified
Bug: 307527314
Change-Id: I9d2660f6d9d7cd5813072201e96b1a64aec4ea4b
- Makes slight adjustments (no behavior changes) to RestoreDbTask and its tests for proper separation
Test: ran unit tests
Bug: 294386159
Flag: none
Change-Id: I3d882f5edcb6a0161a203ef46a5258e9c4ffe18e
See tearDown method in RestoreDbTaskTest for fix.
This reverts commit 2d86f3337a.
Reason for revert: fixing the issues for revert b/298077774
Test: running presubmit and affected test suite on CL
Change-Id: I94c643f38259c4e920869c231f706229390c7c2a
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
ENABLE_DATABASE_RESTORE feature is already removed
Also migrating some tests from BackupRestoreTest to RestoreDbTaskTest
Bug: 270392706
Test: Presubmit
Flag: N/A
Change-Id: I71822bbc2232008b3d2b4b9fbed0db5d889591e4
when using AutoInstalls or when restoring, and when work telephony is
enabled.
Test: atest RestoreDbTaskTest
Bug: 258631628
Change-Id: I3e699e5c34c09daf60e29724eda04282493673e7
LauncherPrefs will contain Launcher's shared preference functionality.
It controls optimizations and classifications such as restorable vs
non-restorable data, bootaware vs non-bootaware data, and configurations
such as default values so the calling code doesn't need to and our code
base can have a single source of truth for items that are used in
multiple places.
The old APIs remain in place, but are deprecated and will be removed
after all Shared Preference usage has been gated by LauncherPrefs in
future CLs.
Bug: 261635315
Test: Manually tested themed icon, Workspace configuration, and app
install functionality.
Change-Id: I29fd516468bc93fda393062e95be26b6d55c816e
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