Disable two line text legacy flag.

Will now repurpose the twolinetoggle flag to be the flag that will
make twoline text enabled/disabled.

bug: 316027081
Test: presubmit
manually: https://screenshot.googleplex.com/BsZGCm7DrTZLwG4
Flag: com.android.launcher3.enable_twoline_toggle Staging
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:68c18236adb5d49d5ba3c5a19187759af63a53b4)
Merged-In: Idef427bad6551ae56b13e35393e076b8e000af5a
Change-Id: Idef427bad6551ae56b13e35393e076b8e000af5a
This commit is contained in:
Brandon Dayauon
2024-03-07 10:14:44 -08:00
committed by Android Build Coastguard Worker
parent a72f546582
commit 00bd00fd4e
7 changed files with 147 additions and 197 deletions
@@ -138,9 +138,9 @@ public class PredictionRowView<T extends Context & ActivityContext>
int totalHeight = iconHeight + iconPadding + textHeight + mVerticalPadding * 2;
// Prediction row height will be 4dp bigger than the regular apps in A-Z list when two line
// is not enabled. Otherwise, the extra height will increase by just the textHeight.
int extraHeight = (FeatureFlags.enableTwolineAllapps() && (!Flags.enableTwolineToggle()
|| (Flags.enableTwolineToggle() && LauncherPrefs.ENABLE_TWOLINE_ALLAPPS_TOGGLE.get(
getContext())))) ? textHeight : mTopRowExtraHeight;
int extraHeight = (Flags.enableTwolineToggle() &&
LauncherPrefs.ENABLE_TWOLINE_ALLAPPS_TOGGLE.get(getContext()))
? textHeight : mTopRowExtraHeight;
totalHeight += extraHeight;
return getVisibility() == GONE ? 0 : totalHeight + getPaddingTop() + getPaddingBottom();
}