Revert "Make numFolderRows/numFolderColumns accept more values"
Revert submission 25438456-5x5_folder
Reason for revert: http://b/313567919
Reverted changes: /q/submissionid:25438456-5x5_folder
Revert "Use DeviceProfile numFolderRows and numFolderColumns"
Revert submission 25313018-numFolder
Reason for revert: http://b/313567919
Reverted changes: /q/submissionid:25313018-numFolder
Change-Id: I4890016e310c0a2122861f36fcdbf33e98e727c0
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index 8d84c90..20e7089 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -164,19 +164,7 @@
<!-- numFolderRows & numFolderColumns defaults to numRows & numColumns, if not specified -->
<attr name="numFolderRows" format="integer" />
- <!-- defaults to numFolderRows, if not specified -->
- <attr name="numFolderRowsLandscape" format="integer" />
- <!-- defaults to numFolderRows, if not specified -->
- <attr name="numFolderRowsTwoPanelLandscape" format="integer" />
- <!-- defaults to numFolderRows, if not specified -->
- <attr name="numFolderRowsTwoPanelPortrait" format="integer" />
<attr name="numFolderColumns" format="integer" />
- <!-- defaults to numFolderColumns, if not specified -->
- <attr name="numFolderColumnsLandscape" format="integer" />
- <!-- defaults to numFolderColumns, if not specified -->
- <attr name="numFolderColumnsTwoPanelLandscape" format="integer" />
- <!-- defaults to numFolderColumns, if not specified -->
- <attr name="numFolderColumnsTwoPanelPortrait" format="integer" />
<!-- Support attributes in FolderStyle -->
<attr name="folderStyle" format="reference" />
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index bb94d4a..1451b98 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -182,8 +182,6 @@
public int cellYPaddingPx = -1;
// Folder
- public final int numFolderRows;
- public final int numFolderColumns;
public final float folderLabelTextScale;
public int folderLabelTextSizePx;
public int folderFooterHeightPx;
@@ -441,8 +439,6 @@
}
folderLabelTextScale = res.getFloat(R.dimen.folder_label_text_scale);
- numFolderRows = inv.numFolderRows[mTypeIndex];
- numFolderColumns = inv.numFolderColumns[mTypeIndex];
if (mIsScalableGrid && inv.folderStyle != INVALID_RESOURCE_HANDLE) {
TypedArray folderStyle = context.obtainStyledAttributes(inv.folderStyle,
@@ -649,11 +645,11 @@
isTwoPanels ? inv.folderSpecsTwoPanelId : inv.folderSpecsId),
ResponsiveSpecType.Folder);
mResponsiveFolderWidthSpec = folderSpecs.getCalculatedSpec(responsiveAspectRatio,
- DimensionType.WIDTH, numFolderColumns,
+ DimensionType.WIDTH, inv.numFolderColumns,
mResponsiveWorkspaceWidthSpec.getAvailableSpace(),
mResponsiveWorkspaceWidthSpec);
mResponsiveFolderHeightSpec = folderSpecs.getCalculatedSpec(responsiveAspectRatio,
- DimensionType.HEIGHT, numFolderRows,
+ DimensionType.HEIGHT, inv.numFolderRows,
mResponsiveWorkspaceHeightSpec.getAvailableSpace(),
mResponsiveWorkspaceHeightSpec);
@@ -1410,16 +1406,16 @@
Point totalWorkspacePadding = getTotalWorkspacePadding();
// Check if the folder fit within the available height.
- float contentUsedHeight = folderCellHeightPx * numFolderRows
- + ((numFolderRows - 1) * folderCellLayoutBorderSpacePx.y)
+ float contentUsedHeight = folderCellHeightPx * inv.numFolderRows
+ + ((inv.numFolderRows - 1) * folderCellLayoutBorderSpacePx.y)
+ folderFooterHeightPx
+ folderContentPaddingTop;
int contentMaxHeight = availableHeightPx - totalWorkspacePadding.y;
float scaleY = contentMaxHeight / contentUsedHeight;
// Check if the folder fit within the available width.
- float contentUsedWidth = folderCellWidthPx * numFolderColumns
- + ((numFolderColumns - 1) * folderCellLayoutBorderSpacePx.x)
+ float contentUsedWidth = folderCellWidthPx * inv.numFolderColumns
+ + ((inv.numFolderColumns - 1) * folderCellLayoutBorderSpacePx.x)
+ folderContentPaddingLeftRight * 2;
int contentMaxWidth = availableWidthPx - totalWorkspacePadding.x;
float scaleX = contentMaxWidth / contentUsedWidth;
@@ -2049,8 +2045,8 @@
writer.println(prefix + pxToDpStr("iconTextSizePx", iconTextSizePx));
writer.println(prefix + pxToDpStr("iconDrawablePaddingPx", iconDrawablePaddingPx));
- writer.println(prefix + "\tnumFolderRows: " + numFolderRows);
- writer.println(prefix + "\tnumFolderColumns: " + numFolderColumns);
+ writer.println(prefix + "\tinv.numFolderRows: " + inv.numFolderRows);
+ writer.println(prefix + "\tinv.numFolderColumns: " + inv.numFolderColumns);
writer.println(prefix + pxToDpStr("folderCellWidthPx", folderCellWidthPx));
writer.println(prefix + pxToDpStr("folderCellHeightPx", folderCellHeightPx));
writer.println(prefix + pxToDpStr("folderChildIconSizePx", folderChildIconSizePx));
diff --git a/src/com/android/launcher3/InvariantDeviceProfile.java b/src/com/android/launcher3/InvariantDeviceProfile.java
index dfbbcaa..567d0c5 100644
--- a/src/com/android/launcher3/InvariantDeviceProfile.java
+++ b/src/com/android/launcher3/InvariantDeviceProfile.java
@@ -122,8 +122,8 @@
/**
* Number of icons per row and column in the folder.
*/
- public int[] numFolderRows;
- public int[] numFolderColumns;
+ public int numFolderRows;
+ public int numFolderColumns;
public float[] iconSize;
public float[] iconTextSize;
public int iconBitmapSize;
@@ -810,8 +810,8 @@
public final int numSearchContainerColumns;
public final int deviceCategory;
- private final int[] numFolderRows = new int[COUNT_SIZES];
- private final int[] numFolderColumns = new int[COUNT_SIZES];
+ private final int numFolderRows;
+ private final int numFolderColumns;
private final @StyleRes int folderStyle;
private final @StyleRes int cellStyle;
@@ -888,39 +888,11 @@
a.getResourceId(R.styleable.GridDisplayOption_inlineNavButtonsEndSpacing,
R.dimen.taskbar_button_margin_default);
- numFolderRows[INDEX_DEFAULT] = a.getInt(
+ numFolderRows = a.getInt(
R.styleable.GridDisplayOption_numFolderRows, numRows);
- numFolderColumns[INDEX_DEFAULT] = a.getInt(
+ numFolderColumns = a.getInt(
R.styleable.GridDisplayOption_numFolderColumns, numColumns);
- if (FeatureFlags.enableResponsiveWorkspace()) {
- numFolderRows[INDEX_LANDSCAPE] = a.getInt(
- R.styleable.GridDisplayOption_numFolderRowsLandscape,
- numFolderRows[INDEX_DEFAULT]);
- numFolderColumns[INDEX_LANDSCAPE] = a.getInt(
- R.styleable.GridDisplayOption_numFolderColumnsLandscape,
- numFolderColumns[INDEX_DEFAULT]);
- numFolderRows[INDEX_TWO_PANEL_PORTRAIT] = a.getInt(
- R.styleable.GridDisplayOption_numFolderRowsTwoPanelPortrait,
- numFolderRows[INDEX_DEFAULT]);
- numFolderColumns[INDEX_TWO_PANEL_PORTRAIT] = a.getInt(
- R.styleable.GridDisplayOption_numFolderColumnsTwoPanelPortrait,
- numFolderColumns[INDEX_DEFAULT]);
- numFolderRows[INDEX_TWO_PANEL_LANDSCAPE] = a.getInt(
- R.styleable.GridDisplayOption_numFolderRowsTwoPanelLandscape,
- numFolderRows[INDEX_DEFAULT]);
- numFolderColumns[INDEX_TWO_PANEL_LANDSCAPE] = a.getInt(
- R.styleable.GridDisplayOption_numFolderColumnsTwoPanelLandscape,
- numFolderColumns[INDEX_DEFAULT]);
- } else {
- numFolderRows[INDEX_LANDSCAPE] = numFolderRows[INDEX_DEFAULT];
- numFolderColumns[INDEX_LANDSCAPE] = numFolderColumns[INDEX_DEFAULT];
- numFolderRows[INDEX_TWO_PANEL_PORTRAIT] = numFolderRows[INDEX_DEFAULT];
- numFolderColumns[INDEX_TWO_PANEL_PORTRAIT] = numFolderColumns[INDEX_DEFAULT];
- numFolderRows[INDEX_TWO_PANEL_LANDSCAPE] = numFolderRows[INDEX_DEFAULT];
- numFolderColumns[INDEX_TWO_PANEL_LANDSCAPE] = numFolderColumns[INDEX_DEFAULT];
- }
-
folderStyle = a.getResourceId(R.styleable.GridDisplayOption_folderStyle,
INVALID_RESOURCE_HANDLE);
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index fe33965..98e9403 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -804,7 +804,7 @@
if (info.container >= 0) {
View folderIcon = getWorkspace().getHomescreenIconByItemId(info.container);
if (folderIcon instanceof FolderIcon && folderIcon.getTag() instanceof FolderInfo) {
- if (new FolderGridOrganizer(getDeviceProfile())
+ if (new FolderGridOrganizer(getDeviceProfile().inv)
.setFolderInfo((FolderInfo) folderIcon.getTag())
.isItemInPreview(info.rank)) {
folderIcon.invalidate();
@@ -2661,7 +2661,7 @@
// Cache one page worth of icons
getViewCache().setCacheSize(R.layout.folder_application,
- mDeviceProfile.numFolderColumns * mDeviceProfile.numFolderRows);
+ mDeviceProfile.inv.numFolderColumns * mDeviceProfile.inv.numFolderRows);
getViewCache().setCacheSize(R.layout.folder_page, 2);
TraceHelper.INSTANCE.endSection();
diff --git a/src/com/android/launcher3/folder/Folder.java b/src/com/android/launcher3/folder/Folder.java
index e7a559e..8bf7ec2 100644
--- a/src/com/android/launcher3/folder/Folder.java
+++ b/src/com/android/launcher3/folder/Folder.java
@@ -1082,7 +1082,7 @@
private void updateItemLocationsInDatabaseBatch(boolean isBind) {
FolderGridOrganizer verifier = new FolderGridOrganizer(
- mActivityContext.getDeviceProfile()).setFolderInfo(mInfo);
+ mActivityContext.getDeviceProfile().inv).setFolderInfo(mInfo);
ArrayList<ItemInfo> items = new ArrayList<>();
int total = mInfo.contents.size();
@@ -1381,7 +1381,7 @@
@Override
public void onAdd(WorkspaceItemInfo item, int rank) {
FolderGridOrganizer verifier = new FolderGridOrganizer(
- mActivityContext.getDeviceProfile()).setFolderInfo(mInfo);
+ mActivityContext.getDeviceProfile().inv).setFolderInfo(mInfo);
verifier.updateRankAndPos(item, rank);
mLauncherDelegate.getModelWriter().addOrMoveItemInDatabase(item, mInfo.id, 0, item.cellX,
item.cellY);
diff --git a/src/com/android/launcher3/folder/FolderAnimationManager.java b/src/com/android/launcher3/folder/FolderAnimationManager.java
index a91373b..9e2e2bf 100644
--- a/src/com/android/launcher3/folder/FolderAnimationManager.java
+++ b/src/com/android/launcher3/folder/FolderAnimationManager.java
@@ -96,7 +96,7 @@
mContext = folder.getContext();
mDeviceProfile = folder.mActivityContext.getDeviceProfile();
- mPreviewVerifier = new FolderGridOrganizer(mDeviceProfile);
+ mPreviewVerifier = new FolderGridOrganizer(mDeviceProfile.inv);
mIsOpening = isOpening;
diff --git a/src/com/android/launcher3/folder/FolderGridOrganizer.java b/src/com/android/launcher3/folder/FolderGridOrganizer.java
index 0436011..4be82ed 100644
--- a/src/com/android/launcher3/folder/FolderGridOrganizer.java
+++ b/src/com/android/launcher3/folder/FolderGridOrganizer.java
@@ -20,7 +20,7 @@
import android.graphics.Point;
-import com.android.launcher3.DeviceProfile;
+import com.android.launcher3.InvariantDeviceProfile;
import com.android.launcher3.model.data.FolderInfo;
import com.android.launcher3.model.data.ItemInfo;
@@ -41,33 +41,16 @@
private int mCountX;
private int mCountY;
private boolean mDisplayingUpperLeftQuadrant = false;
- private static final int PREVIEW_MAX_ROWS = 2;
- private static final int PREVIEW_MAX_COLUMNS = 2;
/**
* Note: must call {@link #setFolderInfo(FolderInfo)} manually for verifier to work.
*/
- public FolderGridOrganizer(DeviceProfile profile) {
+ public FolderGridOrganizer(InvariantDeviceProfile profile) {
mMaxCountX = profile.numFolderColumns;
mMaxCountY = profile.numFolderRows;
mMaxItemsPerPage = mMaxCountX * mMaxCountY;
}
- private FolderGridOrganizer(int maxCountX, int maxCountY) {
- mMaxCountX = maxCountX;
- mMaxCountY = maxCountY;
- mMaxItemsPerPage = mMaxCountX * mMaxCountY;
- }
-
- /**
- * Returns a FolderGridOrganizer that should only be used to verify if the folder icon is
- * showing in the preview. Max number of rows is {@link #PREVIEW_MAX_ROWS} and columns is
- * {@link #PREVIEW_MAX_COLUMNS}.
- */
- public static FolderGridOrganizer getPreviewIconVerifier() {
- return new FolderGridOrganizer(PREVIEW_MAX_ROWS, PREVIEW_MAX_COLUMNS);
- }
-
/**
* Updates the organizer with the provided folder info
*/
@@ -144,7 +127,6 @@
/**
* Updates the item's cellX, cellY and rank corresponding to the provided rank.
- *
* @return true if there was any change
*/
public boolean updateRankAndPos(ItemInfo item, int rank) {
@@ -207,7 +189,7 @@
if (page > 0 || mDisplayingUpperLeftQuadrant) {
int col = rank % mCountX;
int row = rank / mCountX;
- return col < PREVIEW_MAX_COLUMNS && row < PREVIEW_MAX_ROWS;
+ return col < 2 && row < 2;
}
return rank < MAX_NUM_ITEMS_IN_PREVIEW;
}
diff --git a/src/com/android/launcher3/folder/FolderIcon.java b/src/com/android/launcher3/folder/FolderIcon.java
index c80fb8c..cb1dc4f 100644
--- a/src/com/android/launcher3/folder/FolderIcon.java
+++ b/src/com/android/launcher3/folder/FolderIcon.java
@@ -221,7 +221,7 @@
icon.setAccessibilityDelegate(activity.getAccessibilityDelegate());
- icon.mPreviewVerifier = new FolderGridOrganizer(activity.getDeviceProfile());
+ icon.mPreviewVerifier = new FolderGridOrganizer(activity.getDeviceProfile().inv);
icon.mPreviewVerifier.setFolderInfo(folderInfo);
icon.updatePreviewItems(false);
diff --git a/src/com/android/launcher3/folder/FolderPagedView.java b/src/com/android/launcher3/folder/FolderPagedView.java
index f2bed92..36e5e1b 100644
--- a/src/com/android/launcher3/folder/FolderPagedView.java
+++ b/src/com/android/launcher3/folder/FolderPagedView.java
@@ -37,6 +37,8 @@
import com.android.launcher3.BubbleTextView;
import com.android.launcher3.CellLayout;
import com.android.launcher3.DeviceProfile;
+import com.android.launcher3.InvariantDeviceProfile;
+import com.android.launcher3.LauncherAppState;
import com.android.launcher3.PagedView;
import com.android.launcher3.R;
import com.android.launcher3.ShortcutAndWidgetContainer;
@@ -99,15 +101,14 @@
public FolderPagedView(Context context, AttributeSet attrs) {
super(context, attrs);
- ActivityContext activityContext = ActivityContext.lookupContext(context);
- DeviceProfile profile = activityContext.getDeviceProfile();
+ InvariantDeviceProfile profile = LauncherAppState.getIDP(context);
mOrganizer = new FolderGridOrganizer(profile);
mIsRtl = Utilities.isRtl(getResources());
setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_YES);
mFocusIndicatorHelper = new ViewGroupFocusHelper(this);
- mViewCache = activityContext.getViewCache();
+ mViewCache = ActivityContext.lookupContext(context).getViewCache();
}
public void setFolder(Folder folder) {
diff --git a/src/com/android/launcher3/model/LoaderTask.java b/src/com/android/launcher3/model/LoaderTask.java
index d9f43ef..f4ce360 100644
--- a/src/com/android/launcher3/model/LoaderTask.java
+++ b/src/com/android/launcher3/model/LoaderTask.java
@@ -481,7 +481,8 @@
mItemsDeleted = c.commitDeleted();
// Sort the folder items, update ranks, and make sure all preview items are high res.
- FolderGridOrganizer verifier = FolderGridOrganizer.getPreviewIconVerifier();
+ FolderGridOrganizer verifier =
+ new FolderGridOrganizer(mApp.getInvariantDeviceProfile());
for (FolderInfo folder : mBgDataModel.folders) {
Collections.sort(folder.contents, Folder.ITEM_POS_COMPARATOR);
verifier.setFolderInfo(folder);
diff --git a/tests/assets/dumpTests/DeviceProfileDumpTest/phonePortrait.txt b/tests/assets/dumpTests/DeviceProfileDumpTest/phonePortrait.txt
index 18752e9..5f5cf5e 100644
--- a/tests/assets/dumpTests/DeviceProfileDumpTest/phonePortrait.txt
+++ b/tests/assets/dumpTests/DeviceProfileDumpTest/phonePortrait.txt
@@ -38,8 +38,8 @@
iconSizePx: 147.0px (56.0dp)
iconTextSizePx: 38.0px (14.476191dp)
iconDrawablePaddingPx: 12.0px (4.571429dp)
- numFolderRows: 4
- numFolderColumns: 4
+ inv.numFolderRows: 4
+ inv.numFolderColumns: 4
folderCellWidthPx: 195.0px (74.28571dp)
folderCellHeightPx: 230.0px (87.61905dp)
folderChildIconSizePx: 147.0px (56.0dp)
diff --git a/tests/assets/dumpTests/DeviceProfileDumpTest/phonePortrait3Button.txt b/tests/assets/dumpTests/DeviceProfileDumpTest/phonePortrait3Button.txt
index c0de8d8..02bab0e 100644
--- a/tests/assets/dumpTests/DeviceProfileDumpTest/phonePortrait3Button.txt
+++ b/tests/assets/dumpTests/DeviceProfileDumpTest/phonePortrait3Button.txt
@@ -38,8 +38,8 @@
iconSizePx: 147.0px (56.0dp)
iconTextSizePx: 38.0px (14.476191dp)
iconDrawablePaddingPx: 12.0px (4.571429dp)
- numFolderRows: 4
- numFolderColumns: 4
+ inv.numFolderRows: 4
+ inv.numFolderColumns: 4
folderCellWidthPx: 195.0px (74.28571dp)
folderCellHeightPx: 230.0px (87.61905dp)
folderChildIconSizePx: 147.0px (56.0dp)
diff --git a/tests/assets/dumpTests/DeviceProfileDumpTest/phoneVerticalBar.txt b/tests/assets/dumpTests/DeviceProfileDumpTest/phoneVerticalBar.txt
index 920ba6f..1ade779 100644
--- a/tests/assets/dumpTests/DeviceProfileDumpTest/phoneVerticalBar.txt
+++ b/tests/assets/dumpTests/DeviceProfileDumpTest/phoneVerticalBar.txt
@@ -38,8 +38,8 @@
iconSizePx: 147.0px (56.0dp)
iconTextSizePx: 0.0px (0.0dp)
iconDrawablePaddingPx: 0.0px (0.0dp)
- numFolderRows: 4
- numFolderColumns: 4
+ inv.numFolderRows: 4
+ inv.numFolderColumns: 4
folderCellWidthPx: 163.0px (62.095238dp)
folderCellHeightPx: 192.0px (73.14286dp)
folderChildIconSizePx: 123.0px (46.857143dp)
diff --git a/tests/assets/dumpTests/DeviceProfileDumpTest/phoneVerticalBar3Button.txt b/tests/assets/dumpTests/DeviceProfileDumpTest/phoneVerticalBar3Button.txt
index 65460ec..b0b745d 100644
--- a/tests/assets/dumpTests/DeviceProfileDumpTest/phoneVerticalBar3Button.txt
+++ b/tests/assets/dumpTests/DeviceProfileDumpTest/phoneVerticalBar3Button.txt
@@ -38,8 +38,8 @@
iconSizePx: 147.0px (56.0dp)
iconTextSizePx: 0.0px (0.0dp)
iconDrawablePaddingPx: 0.0px (0.0dp)
- numFolderRows: 4
- numFolderColumns: 4
+ inv.numFolderRows: 4
+ inv.numFolderColumns: 4
folderCellWidthPx: 173.0px (65.90476dp)
folderCellHeightPx: 205.0px (78.09524dp)
folderChildIconSizePx: 131.0px (49.904762dp)
diff --git a/tests/assets/dumpTests/DeviceProfileDumpTest/tabletLandscape.txt b/tests/assets/dumpTests/DeviceProfileDumpTest/tabletLandscape.txt
index 1781673..d7f3c1a 100644
--- a/tests/assets/dumpTests/DeviceProfileDumpTest/tabletLandscape.txt
+++ b/tests/assets/dumpTests/DeviceProfileDumpTest/tabletLandscape.txt
@@ -38,8 +38,8 @@
iconSizePx: 120.0px (60.0dp)
iconTextSizePx: 28.0px (14.0dp)
iconDrawablePaddingPx: 9.0px (4.5dp)
- numFolderRows: 3
- numFolderColumns: 3
+ inv.numFolderRows: 3
+ inv.numFolderColumns: 3
folderCellWidthPx: 240.0px (120.0dp)
folderCellHeightPx: 208.0px (104.0dp)
folderChildIconSizePx: 120.0px (60.0dp)
diff --git a/tests/assets/dumpTests/DeviceProfileDumpTest/tabletLandscape3Button.txt b/tests/assets/dumpTests/DeviceProfileDumpTest/tabletLandscape3Button.txt
index bd9e267..20a2a99 100644
--- a/tests/assets/dumpTests/DeviceProfileDumpTest/tabletLandscape3Button.txt
+++ b/tests/assets/dumpTests/DeviceProfileDumpTest/tabletLandscape3Button.txt
@@ -38,8 +38,8 @@
iconSizePx: 120.0px (60.0dp)
iconTextSizePx: 28.0px (14.0dp)
iconDrawablePaddingPx: 9.0px (4.5dp)
- numFolderRows: 3
- numFolderColumns: 3
+ inv.numFolderRows: 3
+ inv.numFolderColumns: 3
folderCellWidthPx: 240.0px (120.0dp)
folderCellHeightPx: 208.0px (104.0dp)
folderChildIconSizePx: 120.0px (60.0dp)
diff --git a/tests/assets/dumpTests/DeviceProfileDumpTest/tabletPortrait.txt b/tests/assets/dumpTests/DeviceProfileDumpTest/tabletPortrait.txt
index e983ef7..94022e4 100644
--- a/tests/assets/dumpTests/DeviceProfileDumpTest/tabletPortrait.txt
+++ b/tests/assets/dumpTests/DeviceProfileDumpTest/tabletPortrait.txt
@@ -38,8 +38,8 @@
iconSizePx: 120.0px (60.0dp)
iconTextSizePx: 28.0px (14.0dp)
iconDrawablePaddingPx: 9.0px (4.5dp)
- numFolderRows: 3
- numFolderColumns: 3
+ inv.numFolderRows: 3
+ inv.numFolderColumns: 3
folderCellWidthPx: 204.0px (102.0dp)
folderCellHeightPx: 240.0px (120.0dp)
folderChildIconSizePx: 120.0px (60.0dp)
diff --git a/tests/assets/dumpTests/DeviceProfileDumpTest/tabletPortrait3Button.txt b/tests/assets/dumpTests/DeviceProfileDumpTest/tabletPortrait3Button.txt
index aa92838..7977204 100644
--- a/tests/assets/dumpTests/DeviceProfileDumpTest/tabletPortrait3Button.txt
+++ b/tests/assets/dumpTests/DeviceProfileDumpTest/tabletPortrait3Button.txt
@@ -38,8 +38,8 @@
iconSizePx: 120.0px (60.0dp)
iconTextSizePx: 28.0px (14.0dp)
iconDrawablePaddingPx: 9.0px (4.5dp)
- numFolderRows: 3
- numFolderColumns: 3
+ inv.numFolderRows: 3
+ inv.numFolderColumns: 3
folderCellWidthPx: 204.0px (102.0dp)
folderCellHeightPx: 240.0px (120.0dp)
folderChildIconSizePx: 120.0px (60.0dp)
diff --git a/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelLandscape.txt b/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelLandscape.txt
index 43e4a60..0b17996 100644
--- a/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelLandscape.txt
+++ b/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelLandscape.txt
@@ -38,8 +38,8 @@
iconSizePx: 141.0px (53.714287dp)
iconTextSizePx: 34.0px (12.952381dp)
iconDrawablePaddingPx: 13.0px (4.952381dp)
- numFolderRows: 3
- numFolderColumns: 4
+ inv.numFolderRows: 3
+ inv.numFolderColumns: 4
folderCellWidthPx: 189.0px (72.0dp)
folderCellHeightPx: 219.0px (83.42857dp)
folderChildIconSizePx: 141.0px (53.714287dp)
diff --git a/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelLandscape3Button.txt b/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelLandscape3Button.txt
index e7ea839..71fffe8 100644
--- a/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelLandscape3Button.txt
+++ b/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelLandscape3Button.txt
@@ -38,8 +38,8 @@
iconSizePx: 141.0px (53.714287dp)
iconTextSizePx: 34.0px (12.952381dp)
iconDrawablePaddingPx: 13.0px (4.952381dp)
- numFolderRows: 3
- numFolderColumns: 4
+ inv.numFolderRows: 3
+ inv.numFolderColumns: 4
folderCellWidthPx: 189.0px (72.0dp)
folderCellHeightPx: 219.0px (83.42857dp)
folderChildIconSizePx: 141.0px (53.714287dp)
diff --git a/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelPortrait.txt b/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelPortrait.txt
index 043380c..5da4ed0 100644
--- a/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelPortrait.txt
+++ b/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelPortrait.txt
@@ -38,8 +38,8 @@
iconSizePx: 141.0px (53.714287dp)
iconTextSizePx: 34.0px (12.952381dp)
iconDrawablePaddingPx: 13.0px (4.952381dp)
- numFolderRows: 3
- numFolderColumns: 4
+ inv.numFolderRows: 3
+ inv.numFolderColumns: 4
folderCellWidthPx: 189.0px (72.0dp)
folderCellHeightPx: 219.0px (83.42857dp)
folderChildIconSizePx: 141.0px (53.714287dp)
diff --git a/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelPortrait3Button.txt b/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelPortrait3Button.txt
index a1b3e95..359e530 100644
--- a/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelPortrait3Button.txt
+++ b/tests/assets/dumpTests/DeviceProfileDumpTest/twoPanelPortrait3Button.txt
@@ -38,8 +38,8 @@
iconSizePx: 141.0px (53.714287dp)
iconTextSizePx: 34.0px (12.952381dp)
iconDrawablePaddingPx: 13.0px (4.952381dp)
- numFolderRows: 3
- numFolderColumns: 4
+ inv.numFolderRows: 3
+ inv.numFolderColumns: 4
folderCellWidthPx: 189.0px (72.0dp)
folderCellHeightPx: 219.0px (83.42857dp)
folderChildIconSizePx: 141.0px (53.714287dp)
diff --git a/tests/src/com/android/launcher3/FakeInvariantDeviceProfileTest.kt b/tests/src/com/android/launcher3/FakeInvariantDeviceProfileTest.kt
index 30b5663..a421006 100644
--- a/tests/src/com/android/launcher3/FakeInvariantDeviceProfileTest.kt
+++ b/tests/src/com/android/launcher3/FakeInvariantDeviceProfileTest.kt
@@ -121,8 +121,8 @@
listOf(PointF(16f, 16f), PointF(16f, 16f), PointF(16f, 16f), PointF(16f, 16f))
.toTypedArray()
- numFolderRows = intArrayOf(3, 3, 3, 3)
- numFolderColumns = intArrayOf(3, 3, 3, 3)
+ numFolderRows = 3
+ numFolderColumns = 3
folderStyle = R.style.FolderStyleDefault
inlineNavButtonsEndSpacing = R.dimen.taskbar_button_margin_split
@@ -204,8 +204,8 @@
listOf(PointF(16f, 64f), PointF(64f, 16f), PointF(16f, 64f), PointF(16f, 64f))
.toTypedArray()
- numFolderRows = intArrayOf(3, 3, 3, 3)
- numFolderColumns = intArrayOf(3, 3, 3, 3)
+ numFolderRows = 3
+ numFolderColumns = 3
folderStyle = R.style.FolderStyleDefault
inlineNavButtonsEndSpacing = R.dimen.taskbar_button_margin_6_5
@@ -288,8 +288,8 @@
listOf(PointF(16f, 16f), PointF(16f, 16f), PointF(16f, 20f), PointF(20f, 20f))
.toTypedArray()
- numFolderRows = intArrayOf(3, 3, 3, 3)
- numFolderColumns = intArrayOf(3, 3, 3, 3)
+ numFolderRows = 3
+ numFolderColumns = 3
folderStyle = R.style.FolderStyleDefault
inlineNavButtonsEndSpacing = R.dimen.taskbar_button_margin_split