Use the number of shown hotseat icons instead of database items to store into the DB
It seems this issue was originated from ag/14129534 and we should no
longer use numDatabaseHotseatIcons form IDP and use numShownHotseatIcons
from the DP.
Fix: 305119735
Flag: NA
Test: manuall testing, we don't have this test for landscape
Change-Id: Ie530748f9b77d89ac3298c187ae767643d505cb3
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index dd03035..7e4edd1 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -769,10 +769,10 @@
if (FOLDABLE_SINGLE_PAGE.get() && mDeviceProfile.isTwoPanels) {
mCellPosMapper = new TwoPanelCellPosMapper(mDeviceProfile.inv.numColumns);
} else {
- mCellPosMapper = CellPosMapper.DEFAULT;
+ mCellPosMapper = new CellPosMapper(mDeviceProfile.isVerticalBarLayout(),
+ mDeviceProfile.numShownHotseatIcons);
}
- mModelWriter = mModel.getWriter(getDeviceProfile().isVerticalBarLayout(), true,
- mCellPosMapper, this);
+ mModelWriter = mModel.getWriter(true, mCellPosMapper, this);
return true;
}