Loading Android.bp +5 −26 Original line number Diff line number Diff line Loading @@ -167,13 +167,14 @@ android_library { // // Build rule for Launcher3 dependencies lib. // java_defaults { name: "Launcher3CommonDepsDefault", android_library { name: "Launcher3CommonDepsLib", srcs: ["src_build_config/**/*.java"], static_libs: [ "Launcher3ResLib", "launcher-testing-shared", "animationlib" "animationlib", "com_android_launcher3_flags_lib", ], sdk_version: "current", min_sdk_version: min_launcher3_sdk_version, Loading @@ -183,28 +184,6 @@ java_defaults { }, } // // Build rule for Launcher3 dependencies lib. // android_library { name: "Launcher3CommonDepsLib", defaults: ["Launcher3CommonDepsDefault"], static_libs: [ "com_android_launcher3_flags_lib", ], } // // Build rule for Launcher3 dependencies lib for test and debug. // android_library { name: "Launcher3CommonDepsLibDebug", defaults: ["Launcher3CommonDepsDefault"], static_libs: [ "com_android_launcher3_flags_lib_debug", ], } // // Build rule for Launcher3 app. // Loading @@ -212,7 +191,7 @@ android_app { name: "Launcher3", static_libs: [ "Launcher3CommonDepsLibDebug", "Launcher3CommonDepsLib", ], srcs: [ ":launcher-src", Loading aconfig/Android.bp +0 −6 Original line number Diff line number Diff line Loading @@ -27,9 +27,3 @@ java_aconfig_library { name: "com_android_launcher3_flags_lib", aconfig_declarations: "com_android_launcher3_flags", } java_aconfig_library { name: "com_android_launcher3_flags_lib_debug", aconfig_declarations: "com_android_launcher3_flags", test: true } aconfig/launcher.aconfig +7 −0 Original line number Diff line number Diff line Loading @@ -6,3 +6,10 @@ flag { description: "Expand and collapse pause work button while scrolling." bug: "270390779" } flag { name: "enable_twoline_allapps" namespace: "launcher" description: "Enables two line label inside all apps." bug: "270390937" } src/com/android/launcher3/BubbleTextView.java +3 −2 Original line number Diff line number Diff line Loading @@ -272,7 +272,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver, mDotParams.scale = 0f; mForceHideDot = false; setBackground(null); if (FeatureFlags.ENABLE_TWOLINE_ALLAPPS.get() if (Flags.enableTwolineAllapps() || FeatureFlags.ENABLE_TWOLINE_ALLAPPS.get() || FeatureFlags.ENABLE_TWOLINE_DEVICESEARCH.get()) { setMaxLines(1); } Loading Loading @@ -405,7 +405,8 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver, * Only if actual text can be displayed in two line, the {@code true} value will be effective. */ protected boolean shouldUseTwoLine() { return (FeatureFlags.ENABLE_TWOLINE_ALLAPPS.get() && mDisplay == DISPLAY_ALL_APPS) return ((Flags.enableTwolineAllapps() || FeatureFlags.ENABLE_TWOLINE_ALLAPPS.get()) && mDisplay == DISPLAY_ALL_APPS) || (FeatureFlags.ENABLE_TWOLINE_DEVICESEARCH.get() && mDisplay == DISPLAY_SEARCH_RESULT); } Loading src/com/android/launcher3/allapps/BaseAllAppsAdapter.java +6 −3 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.widget.TextView; import androidx.recyclerview.widget.RecyclerView; import com.android.launcher3.BubbleTextView; import com.android.launcher3.Flags; import com.android.launcher3.R; import com.android.launcher3.Utilities; import com.android.launcher3.allapps.search.SearchAdapterProvider; Loading Loading @@ -176,7 +177,9 @@ public abstract class BaseAllAppsAdapter<T extends Context & ActivityContext> ex public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { switch (viewType) { case VIEW_TYPE_ICON: int layout = !FeatureFlags.ENABLE_TWOLINE_ALLAPPS.get() ? R.layout.all_apps_icon int layout = !(Flags.enableTwolineAllapps() || FeatureFlags.ENABLE_TWOLINE_ALLAPPS.get()) ? R.layout.all_apps_icon : R.layout.all_apps_icon_twoline; BubbleTextView icon = (BubbleTextView) mLayoutInflater.inflate( layout, parent, false); Loading @@ -187,7 +190,7 @@ public abstract class BaseAllAppsAdapter<T extends Context & ActivityContext> ex // Ensure the all apps icon height matches the workspace icons in portrait mode. icon.getLayoutParams().height = mActivityContext.getDeviceProfile().allAppsCellHeightPx; if (FeatureFlags.ENABLE_TWOLINE_ALLAPPS.get()) { if (Flags.enableTwolineAllapps() || FeatureFlags.ENABLE_TWOLINE_ALLAPPS.get()) { icon.getLayoutParams().height += mExtraTextHeight; } return new ViewHolder(icon); Loading Loading
Android.bp +5 −26 Original line number Diff line number Diff line Loading @@ -167,13 +167,14 @@ android_library { // // Build rule for Launcher3 dependencies lib. // java_defaults { name: "Launcher3CommonDepsDefault", android_library { name: "Launcher3CommonDepsLib", srcs: ["src_build_config/**/*.java"], static_libs: [ "Launcher3ResLib", "launcher-testing-shared", "animationlib" "animationlib", "com_android_launcher3_flags_lib", ], sdk_version: "current", min_sdk_version: min_launcher3_sdk_version, Loading @@ -183,28 +184,6 @@ java_defaults { }, } // // Build rule for Launcher3 dependencies lib. // android_library { name: "Launcher3CommonDepsLib", defaults: ["Launcher3CommonDepsDefault"], static_libs: [ "com_android_launcher3_flags_lib", ], } // // Build rule for Launcher3 dependencies lib for test and debug. // android_library { name: "Launcher3CommonDepsLibDebug", defaults: ["Launcher3CommonDepsDefault"], static_libs: [ "com_android_launcher3_flags_lib_debug", ], } // // Build rule for Launcher3 app. // Loading @@ -212,7 +191,7 @@ android_app { name: "Launcher3", static_libs: [ "Launcher3CommonDepsLibDebug", "Launcher3CommonDepsLib", ], srcs: [ ":launcher-src", Loading
aconfig/Android.bp +0 −6 Original line number Diff line number Diff line Loading @@ -27,9 +27,3 @@ java_aconfig_library { name: "com_android_launcher3_flags_lib", aconfig_declarations: "com_android_launcher3_flags", } java_aconfig_library { name: "com_android_launcher3_flags_lib_debug", aconfig_declarations: "com_android_launcher3_flags", test: true }
aconfig/launcher.aconfig +7 −0 Original line number Diff line number Diff line Loading @@ -6,3 +6,10 @@ flag { description: "Expand and collapse pause work button while scrolling." bug: "270390779" } flag { name: "enable_twoline_allapps" namespace: "launcher" description: "Enables two line label inside all apps." bug: "270390937" }
src/com/android/launcher3/BubbleTextView.java +3 −2 Original line number Diff line number Diff line Loading @@ -272,7 +272,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver, mDotParams.scale = 0f; mForceHideDot = false; setBackground(null); if (FeatureFlags.ENABLE_TWOLINE_ALLAPPS.get() if (Flags.enableTwolineAllapps() || FeatureFlags.ENABLE_TWOLINE_ALLAPPS.get() || FeatureFlags.ENABLE_TWOLINE_DEVICESEARCH.get()) { setMaxLines(1); } Loading Loading @@ -405,7 +405,8 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver, * Only if actual text can be displayed in two line, the {@code true} value will be effective. */ protected boolean shouldUseTwoLine() { return (FeatureFlags.ENABLE_TWOLINE_ALLAPPS.get() && mDisplay == DISPLAY_ALL_APPS) return ((Flags.enableTwolineAllapps() || FeatureFlags.ENABLE_TWOLINE_ALLAPPS.get()) && mDisplay == DISPLAY_ALL_APPS) || (FeatureFlags.ENABLE_TWOLINE_DEVICESEARCH.get() && mDisplay == DISPLAY_SEARCH_RESULT); } Loading
src/com/android/launcher3/allapps/BaseAllAppsAdapter.java +6 −3 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.widget.TextView; import androidx.recyclerview.widget.RecyclerView; import com.android.launcher3.BubbleTextView; import com.android.launcher3.Flags; import com.android.launcher3.R; import com.android.launcher3.Utilities; import com.android.launcher3.allapps.search.SearchAdapterProvider; Loading Loading @@ -176,7 +177,9 @@ public abstract class BaseAllAppsAdapter<T extends Context & ActivityContext> ex public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { switch (viewType) { case VIEW_TYPE_ICON: int layout = !FeatureFlags.ENABLE_TWOLINE_ALLAPPS.get() ? R.layout.all_apps_icon int layout = !(Flags.enableTwolineAllapps() || FeatureFlags.ENABLE_TWOLINE_ALLAPPS.get()) ? R.layout.all_apps_icon : R.layout.all_apps_icon_twoline; BubbleTextView icon = (BubbleTextView) mLayoutInflater.inflate( layout, parent, false); Loading @@ -187,7 +190,7 @@ public abstract class BaseAllAppsAdapter<T extends Context & ActivityContext> ex // Ensure the all apps icon height matches the workspace icons in portrait mode. icon.getLayoutParams().height = mActivityContext.getDeviceProfile().allAppsCellHeightPx; if (FeatureFlags.ENABLE_TWOLINE_ALLAPPS.get()) { if (Flags.enableTwolineAllapps() || FeatureFlags.ENABLE_TWOLINE_ALLAPPS.get()) { icon.getLayoutParams().height += mExtraTextHeight; } return new ViewHolder(icon); Loading