Use DeviceProfile numFolderRows and numFolderColumns
Invariant hold values that are not related to current DP in use. This is a change needed for IDP to hold more values in the future akin to iconSize.
Bug: 309800141
Change-Id: Iefb388a5f6590d7da3452d2c388c02bd5e9d32bb
Flag: N/A
Test: NexusLauncherTests
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index a351947..0eebdc6 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -792,7 +792,7 @@
if (info.container >= 0) {
View folderIcon = getWorkspace().getHomescreenIconByItemId(info.container);
if (folderIcon instanceof FolderIcon && folderIcon.getTag() instanceof FolderInfo) {
- if (new FolderGridOrganizer(getDeviceProfile().inv)
+ if (new FolderGridOrganizer(getDeviceProfile())
.setFolderInfo((FolderInfo) folderIcon.getTag())
.isItemInPreview(info.rank)) {
folderIcon.invalidate();
@@ -2646,7 +2646,7 @@
// Cache one page worth of icons
getViewCache().setCacheSize(R.layout.folder_application,
- mDeviceProfile.inv.numFolderColumns * mDeviceProfile.inv.numFolderRows);
+ mDeviceProfile.numFolderColumns * mDeviceProfile.numFolderRows);
getViewCache().setCacheSize(R.layout.folder_page, 2);
TraceHelper.INSTANCE.endSection();