Merge "Add feature flag to control two panel home in portrait" into sc-v2-dev am: 543bf45c9b

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15659589

Change-Id: I809ab423d78ea5d333e74bc9b1664905aef18253
This commit is contained in:
Android Build Prod User
2021-08-25 20:16:58 +00:00
committed by Automerger Merge Worker
2 changed files with 6 additions and 1 deletions
+2 -1
View File
@@ -248,7 +248,8 @@ public class DeviceProfile {
// Tablet UI does not support emulated landscape.
isTablet = allowRotation && info.isTablet(windowBounds);
isPhone = !isTablet;
isTwoPanels = isTablet && useTwoPanels;
isTwoPanels = isTablet && useTwoPanels
&& (isLandscape || FeatureFlags.ENABLE_TWO_PANEL_HOME_IN_PORTRAIT.get());
aspectRatio = ((float) Math.max(widthPx, heightPx)) / Math.min(widthPx, heightPx);
boolean isTallDevice = Float.compare(aspectRatio, TALL_DEVICE_ASPECT_RATIO_THRESHOLD) >= 0;
@@ -230,6 +230,10 @@ public final class FeatureFlags {
"ENABLE_TWO_PANEL_HOME", true,
"Uses two panel on home screen. Only applicable on large screen devices.");
public static final BooleanFlag ENABLE_TWO_PANEL_HOME_IN_PORTRAIT = getDebugFlag(
"ENABLE_TWO_PANEL_HOME_IN_PORTRAIT", true,
"Uses two panel on home screen in portrait if ENABLE_TWO_PANEL_HOME is enabled.");
public static final BooleanFlag ENABLE_SCRIM_FOR_APP_LAUNCH = getDebugFlag(
"ENABLE_SCRIM_FOR_APP_LAUNCH", false,
"Enables scrim during app launch animation.");