mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
Make sure GRID_NAME is updated every time it changes.
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
This commit is contained in:
committed by
Sebastián Franco
parent
d0b6a849ad
commit
2b0cdbbc87
@@ -240,10 +240,7 @@ public class InvariantDeviceProfile implements SafeCloseable {
|
||||
@TargetApi(23)
|
||||
private InvariantDeviceProfile(Context context) {
|
||||
String gridName = getCurrentGridName(context);
|
||||
String newGridName = initGrid(context, gridName);
|
||||
if (!newGridName.equals(gridName)) {
|
||||
LauncherPrefs.get(context).put(GRID_NAME, newGridName);
|
||||
}
|
||||
initGrid(context, gridName);
|
||||
|
||||
DisplayController.INSTANCE.get(context).setPriorityListener(
|
||||
(displayContext, info, flags) -> {
|
||||
@@ -367,6 +364,11 @@ public class InvariantDeviceProfile implements SafeCloseable {
|
||||
? new ArrayList<>(allOptions)
|
||||
: new ArrayList<>(allOptionsFilteredByColCount),
|
||||
displayInfo.getDeviceType());
|
||||
|
||||
if (!displayOption.grid.name.equals(gridName)) {
|
||||
LauncherPrefs.get(context).put(GRID_NAME, displayOption.grid.name);
|
||||
}
|
||||
|
||||
initGrid(context, displayInfo, displayOption);
|
||||
return displayOption.grid.name;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user