From 8b3fa14ef9fc8bc8e0ec3953887c2993c73a82cd Mon Sep 17 00:00:00 2001 From: Jordan Silva Date: Mon, 13 Nov 2023 21:31:38 +0000 Subject: [PATCH] Fix wrong number of columns for AllApps calculation Fix: 310657769 Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD Test: DeviceProfileDumpTest Test: DeviceProfileResponsiveDumpTest Change-Id: Id46c9e4529176b68f6d92d31a71016ed4f8134d1 --- src/com/android/launcher3/DeviceProfile.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java index fed031bc31..28c7a37bde 100644 --- a/src/com/android/launcher3/DeviceProfile.java +++ b/src/com/android/launcher3/DeviceProfile.java @@ -592,7 +592,6 @@ public class DeviceProfile { int availableResponsiveWidth = availableWidthPx - (isVerticalBarLayout() ? hotseatBarSizePx : 0); int numWorkspaceColumns = getPanelCount() * inv.numColumns; - int numAllAppsColumns = getPanelCount() * inv.numAllAppsColumns; // don't use availableHeightPx because it subtracts mInsets.bottom int availableResponsiveHeight = heightPx - mInsets.top - (isVerticalBarLayout() ? 0 : hotseatBarSizePx); @@ -612,7 +611,7 @@ public class DeviceProfile { isTwoPanels ? inv.allAppsSpecsTwoPanelId : inv.allAppsSpecsId), ResponsiveSpecType.AllApps); mResponsiveAllAppsWidthSpec = allAppsSpecs.getCalculatedSpec(responsiveAspectRatio, - DimensionType.WIDTH, numAllAppsColumns, availableWidthPx, + DimensionType.WIDTH, numShownAllAppsColumns, availableWidthPx, mResponsiveWorkspaceWidthSpec); mResponsiveAllAppsHeightSpec = allAppsSpecs.getCalculatedSpec(responsiveAspectRatio, DimensionType.HEIGHT, inv.numRows, heightPx - mInsets.top,