Store startAlignTaskbar in DisplayInfoSpec

- CD grids should override startAlignTaskbar.
- The DP.toBuilder method should carry forward DisplayInfoSpec instead
  of always recalculating.

Fix: 416276424
Test: m
Flag: EXEMPT updating recently added logic
Change-Id: I7b1cb8eab5fedc09b29e96a765d1341655474e8a
This commit is contained in:
Ajinkya Chalke
2025-05-08 17:00:22 +00:00
parent 2a6553ff9e
commit f0ec71d325
3 changed files with 15 additions and 3 deletions
@@ -957,6 +957,7 @@ public class InvariantDeviceProfile {
@XmlRes public final int allAppsSpecsId;
@XmlRes public final int folderSpecsId;
@XmlRes public final int allAppsCellSpecsId;
public final boolean startAlignTaskbar;
DisplayOptionSpec(DisplayOption displayOption, boolean isLandscape) {
typeIndex = isLandscape ? INDEX_LANDSCAPE : INDEX_DEFAULT;
@@ -968,6 +969,7 @@ public class InvariantDeviceProfile {
allAppsSpecsId = displayOption.grid.mAllAppsSpecsId;
folderSpecsId = displayOption.grid.mFolderSpecsId;
allAppsCellSpecsId = displayOption.grid.mAllAppsCellSpecsId;
startAlignTaskbar = displayOption.startAlignTaskbar[typeIndex];
}
DisplayOptionSpec(InvariantDeviceProfile inv, boolean isTwoPanels, boolean isLandscape) {
@@ -995,6 +997,7 @@ public class InvariantDeviceProfile {
folderSpecsId = isTwoPanels ? inv.folderSpecsTwoPanelId : inv.folderSpecsId;
allAppsCellSpecsId =
isTwoPanels ? inv.allAppsCellSpecsTwoPanelId : inv.allAppsCellSpecsId;
startAlignTaskbar = inv.startAlignTaskbar[typeIndex];
}
}