When upgrading from non one grid to one grid, we should do the row
shift migration type, here we are logging data to make sure that is what
happens on upgrade
Flag: EXEMPT logging
Test: n/a
Bug: 393175684
Change-Id: Id09257094bc9bc44da757c73a4f63bf15987772c
We flag guard the code that modifies IDP as that's not needed with one
grid, and we don't want to modify idp outside of it
Bug: 332974074
Flag: com.android.launcher3.one_grid_specs
Test: verified manually with b&r
Change-Id: Ica2ffa79638fa693cde421adb13feebb0d09cbc4
The order of initialization for IconShape is closely tied to ThemeManager
which makes it difficult for change listeners to work. Merging these keeps
all the theming information at one place
Bug: 381897614
Test: Updated tests
Flag: EXEMPT refactor
Change-Id: Ie29efa20c3308a24be3e284c1c93ed7444b68d58
Unless explicitly annotated, parameters in java are by
default nullable. There are a few cases where a null context
may be passed to the unregisterReceiverSafely function
of SimpleBroadcastReceiver.
To mitigate misuses or incorrect contexts being passed for
register vs unregister, keep the context as a strong reference
in the constructor.
Also added NonNull annotations for any public callsites to
enforce behavior.
Bug: 395019017, 395966395
Flag: NONE - bug fixed
Test: manual - presubmit
Change-Id: Ie371fa45cadceaf51cf184b446df9123ef27c337
XL and large grid icons were showing up with the flag off
Bug: 395139926
Test: ValidGridOptionsTest
Flag: com.android.launcher3.one_grid_specs
Change-Id: If6b077ce854341563d8c2fbefd741b598b77a7a8
.toList() was only introduced to android in api level 34, which is newer than
this module's min_sdk_version. Replace it with .collect().
This was found while updating android lint.
Flag: EXEMPT refactor
Bug: 394096385
Test: Presubmits
Change-Id: Id8d1de1531b67a7daf448e45592b7ef78f685fc2
IPD#reset() was resetting the internal IDP dbFile to the factory default instead of current grid/db
This lead to LoaderTask and grid migration creating an empty DB for the wrong grid size, while the restored DB remained unused. Leading to an empty home screen because an empty DB file was used.
Bug: 377510898
Flag: EXEMPT bugfix
Test: manually testing backup & restore with various grid sizes
Change-Id: I709201e484afb8f12a4fde21198d2c5793d89ca1
Bore it was only updated when the device was innitialized,
but other changes to the IDP would not udpate the GRID_NAME pref.
Fix: 380954618
Test: NA
Flag: com.android.launcher3.one_grid_specs
Change-Id: I4fa73a4b838c0d0c7c1c88ea91c62ac8ae6676b7
-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
> 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
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
In some situations, DeviceProfile is recreated with an invalid InvariantDeviceProfile leading to a crash, because it tries to use an non existent responsive grid spec. To prevent the crash, we are update the responsive grid two panel specs to use the default spec when two panel spec is not defined.
Bug: 317993862
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: NexusLauncherImageTests
Test: DeviceProfileDumpTest
Test: DeviceProfileAlternativeDisplaysDumpTest
Change-Id: I8b8095745787ad47b006892452a54942f981713e
Refactoring the cellSize spec of responsive grid to divide the remainder space in code instead of dividing by cols/rows in the spec definition. For example, instead of using 0.2 in the spec for 5x5 grid (1 / number of rows), it is going to use 1 (100% of the remainder space) and divide the percentage by the number of cols or rows in code.
Fix: 313621277
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Test: NexusLauncherImageTests
Test: CalculatedWorkspaceSpecTest
Test: DeviceProfileDumpTest
Test: DeviceProfileAlternativeDisplaysDumpTest
Change-Id: Ifaec838ac9751562ecedc1fe39b966ee3d092de3
Changes:
- For tablet, always center All Apps without applying additional
insets for things like cutouts.
- For tablet, allow the panel to span the full height of the
screen (minus system bars), rather than 5.5 app rows. This also
ensures the panel fully closes even if there are cutouts.
- Remove additional padding for vertical bar mode (landscape on
phones). This was double counting the cutout insets, but only
for some views, so things were not aligned. Now the apps line
up with the search bar, and the scroll bar still makes room for
any side insets.
Before and after examples:
https://drive.google.com/drive/folders/1k0vSzisf4ZuGyp-qR-IF0QwM-IcHBFrZ?resourcekey=0-uxjzuVQ1KA3WwOQ4v6Dh2w&usp=drive_link
Bug: 299923399
Bug: 259617884
Fix: 300761324
Test: Manual
Flag: NA
Change-Id: I136d516260a1343b1198693c73fa389fe0e11cc9