Add GridDimensionSpecs to fixed landscape and make grid dimension generalized so we can use it to determine row count or col count

Bug: 364711064
Flag: com.android.launcher3.one_grid_specs
Test: HomeScreenImageTest
Change-Id: If1dafedc710ebc483fc7b6b5cd6cae6f70dc3cfc
This commit is contained in:
fbaron authored and Federico Baron committed 2024-12-03 02:43:13 +00:00
1 parent 7614088dc5
commit d1cd8c2ea6
7 files changed
+77 -86

No files matched your search

+5 -5
View File
@@ -865,7 +865,7 @@ public class DeviceProfile {
canQsbInline = canQsbInline && hotseatQsbHeight > 0;
return (mIsScalableGrid && inv.inlineQsb[mTypeIndex] && canQsbInline)
|| inv.isFixedLandscapeMode;
|| inv.isFixedLandscape;
}
private static DotRenderer createDotRenderer(
@@ -1834,7 +1834,7 @@ public class DeviceProfile {
}
int paddingTop = workspaceTopPadding + (mIsScalableGrid ? 0 : edgeMarginPx);
// On isFixedLandscapeMode on phones we already have padding because of the camera hole
int paddingSide = inv.isFixedLandscapeMode ? 0 : desiredWorkspaceHorizontalMarginPx;
int paddingSide = inv.isFixedLandscape ? 0 : desiredWorkspaceHorizontalMarginPx;
padding.set(paddingSide, paddingTop, paddingSide, paddingBottom);
}
@@ -1934,7 +1934,7 @@ public class DeviceProfile {
hotseatBarPadding.set(mHotseatBarWorkspaceSpacePx, paddingTop,
mInsets.right + mHotseatBarEdgePaddingPx, paddingBottom);
}
} else if (isTaskbarPresent || inv.isFixedLandscapeMode) {
} else if (isTaskbarPresent || inv.isFixedLandscape) {
// Center the QSB vertically with hotseat
int hotseatBarBottomPadding = getHotseatBarBottomPadding();
int hotseatBarTopPadding =
@@ -1953,7 +1953,7 @@ public class DeviceProfile {
}
startSpacing += getAdditionalQsbSpace();
if (inv.isFixedLandscapeMode) {
if (inv.isFixedLandscape) {
endSpacing += mInsets.right;
startSpacing += mInsets.left;
}
@@ -2568,7 +2568,7 @@ public class DeviceProfile {
}
if (mTransposeLayoutWithOrientation == null) {
mTransposeLayoutWithOrientation =
!(mInfo.isTablet(mWindowBounds) || mInv.isFixedLandscapeMode);
!(mInfo.isTablet(mWindowBounds) || mInv.isFixedLandscape);
}
if (mIsGestureMode == null) {
mIsGestureMode = mInfo.getNavigationMode().hasGestures;