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:
1 parent
2a6553ff9e
commit
f0ec71d325
3 files changed
+15
-3
No files matched your search
@@ -96,6 +96,7 @@ public class DeviceProfile {
|
||||
};
|
||||
|
||||
public final InvariantDeviceProfile inv;
|
||||
private final DisplayOptionSpec mDisplayOptionSpec;
|
||||
private final Info mInfo;
|
||||
private final DisplayMetrics mMetrics;
|
||||
private final IconSizeSteps mIconSizeSteps;
|
||||
@@ -324,6 +325,7 @@ public class DeviceProfile {
|
||||
@VisibleForTesting
|
||||
public DeviceProfile() {
|
||||
inv = null;
|
||||
mDisplayOptionSpec = null;
|
||||
mInfo = null;
|
||||
mMetrics = null;
|
||||
mIconSizeSteps = null;
|
||||
@@ -406,6 +408,7 @@ public class DeviceProfile {
|
||||
windowY = windowBounds.bounds.top;
|
||||
this.rotationHint = windowBounds.rotationHint;
|
||||
mInsets.set(windowBounds.insets);
|
||||
this.mDisplayOptionSpec = displayOptionSpec;
|
||||
|
||||
// TODO(b/241386436): shouldn't change any launcher behaviour
|
||||
mIsResponsiveGrid = inv.workspaceSpecsId != INVALID_RESOURCE_HANDLE
|
||||
@@ -472,7 +475,7 @@ public class DeviceProfile {
|
||||
taskbarHeight = res.getDimensionPixelSize(R.dimen.taskbar_size);
|
||||
stashedTaskbarHeight = res.getDimensionPixelSize(R.dimen.taskbar_stashed_size);
|
||||
taskbarBottomMargin = 0;
|
||||
startAlignTaskbar = inv.startAlignTaskbar[mTypeIndex];
|
||||
startAlignTaskbar = displayOptionSpec.startAlignTaskbar;
|
||||
}
|
||||
|
||||
edgeMarginPx = res.getDimensionPixelSize(R.dimen.dynamic_grid_edge_margin);
|
||||
@@ -1072,7 +1075,8 @@ public class DeviceProfile {
|
||||
.setIsMultiDisplay(isMultiDisplay)
|
||||
.setMultiWindowMode(isMultiWindowMode)
|
||||
.setDotRendererCache(dotRendererCache)
|
||||
.setGestureMode(isGestureMode);
|
||||
.setGestureMode(isGestureMode)
|
||||
.setDisplayOptionSpec(mDisplayOptionSpec);
|
||||
}
|
||||
|
||||
public DeviceProfile copy(Context context) {
|
||||
@@ -2575,6 +2579,11 @@ public class DeviceProfile {
|
||||
return this;
|
||||
}
|
||||
|
||||
private Builder setDisplayOptionSpec(DisplayOptionSpec displayOptionSpec) {
|
||||
mDisplayOptionSpec = displayOptionSpec;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeviceProfile build() {
|
||||
if (mWindowBounds == null) {
|
||||
throw new IllegalArgumentException("Window bounds not set");
|
||||
|
||||
Reference in new issue
Block a user