Converting LauncherPrefs to dagger
Fixing ENABLE_TWOLINE_ALLAPPS_TOGGLE not properly tied to IDP: http://recall/-/ep7WJ8pKwCEklUN5J1mAkM Bug: 361850561 Flag: EXEMPT dagger-migration Test: atest LauncherPrefsTest FakeLauncherPrefsTest Change-Id: Iba63d060f4a8c2e31033fca2a4638c559c161338
This commit is contained in:
1 parent
bf5e7e867f
commit
e79d453bc8
16 files changed
+287
-407
No files matched your search
@@ -24,7 +24,6 @@ import static com.android.launcher3.InvariantDeviceProfile.INDEX_LANDSCAPE;
|
||||
import static com.android.launcher3.InvariantDeviceProfile.INDEX_TWO_PANEL_LANDSCAPE;
|
||||
import static com.android.launcher3.InvariantDeviceProfile.INDEX_TWO_PANEL_PORTRAIT;
|
||||
import static com.android.launcher3.Utilities.dpiFromPx;
|
||||
import static com.android.launcher3.Utilities.isEnglishLanguage;
|
||||
import static com.android.launcher3.Utilities.pxFromSp;
|
||||
import static com.android.launcher3.folder.ClippedFolderIconLayoutRule.ICON_OVERLAP_FACTOR;
|
||||
import static com.android.launcher3.icons.GraphicsUtils.getShapePath;
|
||||
@@ -1362,16 +1361,9 @@ public class DeviceProfile {
|
||||
if (isVerticalLayout && !mIsResponsiveGrid) {
|
||||
hideWorkspaceLabelsIfNotEnoughSpace();
|
||||
}
|
||||
if ((Flags.enableTwolineToggle()
|
||||
&& LauncherPrefs.ENABLE_TWOLINE_ALLAPPS_TOGGLE.get(context))) {
|
||||
if (!isEnglishLanguage(context)) {
|
||||
// Set toggle preference value to false if not english here as it's possible the
|
||||
// preference is stale after language change.
|
||||
LauncherPrefs.get(context).put(LauncherPrefs.ENABLE_TWOLINE_ALLAPPS_TOGGLE, false);
|
||||
} else {
|
||||
// Add extra textHeight to the existing allAppsCellHeight.
|
||||
allAppsCellHeightPx += Utilities.calculateTextHeight(allAppsIconTextSizePx);
|
||||
}
|
||||
if (inv.enableTwoLinesInAllApps) {
|
||||
// Add extra textHeight to the existing allAppsCellHeight.
|
||||
allAppsCellHeightPx += Utilities.calculateTextHeight(allAppsIconTextSizePx);
|
||||
}
|
||||
|
||||
updateHotseatSizes(iconSizePx);
|
||||
|
||||
Reference in new issue
Block a user