Loading aconfig/launcher.aconfig +7 −0 Original line number Original line Diff line number Diff line Loading @@ -173,6 +173,13 @@ flag { bug: "318410881" bug: "318410881" } } flag { name: "force_monochrome_app_icons" namespace: "launcher" description: "Enable the ability to generate monochromatic icons, if it is not provided by the app" bug: "270396209" } flag { flag { name: "enable_add_app_widget_via_config_activity_v2" name: "enable_add_app_widget_via_config_activity_v2" namespace: "launcher" namespace: "launcher" Loading src/com/android/launcher3/config/FeatureFlags.java +0 −5 Original line number Original line Diff line number Diff line Loading @@ -184,11 +184,6 @@ public final class FeatureFlags { "SECONDARY_DRAG_N_DROP_TO_PIN", DISABLED, "SECONDARY_DRAG_N_DROP_TO_PIN", DISABLED, "Enable dragging and dropping to pin apps within secondary display"); "Enable dragging and dropping to pin apps within secondary display"); // TODO(Block 7): Clean up flags public static final BooleanFlag ENABLE_FORCED_MONO_ICON = getDebugFlag(270396209, "ENABLE_FORCED_MONO_ICON", DISABLED, "Enable the ability to generate monochromatic icons, if it is not provided by the app"); // TODO(Block 8): Clean up flags // TODO(Block 8): Clean up flags // TODO(Block 9): Clean up flags // TODO(Block 9): Clean up flags Loading src/com/android/launcher3/icons/LauncherIcons.java +2 −3 Original line number Original line Diff line number Diff line Loading @@ -16,14 +16,13 @@ package com.android.launcher3.icons; package com.android.launcher3.icons; import static com.android.launcher3.config.FeatureFlags.ENABLE_FORCED_MONO_ICON; import android.content.Context; import android.content.Context; import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable; import android.os.UserHandle; import android.os.UserHandle; import androidx.annotation.NonNull; import androidx.annotation.NonNull; import com.android.launcher3.Flags; import com.android.launcher3.InvariantDeviceProfile; import com.android.launcher3.InvariantDeviceProfile; import com.android.launcher3.graphics.IconShape; import com.android.launcher3.graphics.IconShape; import com.android.launcher3.graphics.LauncherPreviewRenderer; import com.android.launcher3.graphics.LauncherPreviewRenderer; Loading Loading @@ -103,7 +102,7 @@ public class LauncherIcons extends BaseIconFactory implements AutoCloseable { @Override @Override protected Drawable getMonochromeDrawable(Drawable base) { protected Drawable getMonochromeDrawable(Drawable base) { Drawable mono = super.getMonochromeDrawable(base); Drawable mono = super.getMonochromeDrawable(base); if (mono != null || !ENABLE_FORCED_MONO_ICON.get()) { if (mono != null || !Flags.forceMonochromeAppIcons()) { return mono; return mono; } } if (mMonochromeIconFactory == null) { if (mMonochromeIconFactory == null) { Loading Loading
aconfig/launcher.aconfig +7 −0 Original line number Original line Diff line number Diff line Loading @@ -173,6 +173,13 @@ flag { bug: "318410881" bug: "318410881" } } flag { name: "force_monochrome_app_icons" namespace: "launcher" description: "Enable the ability to generate monochromatic icons, if it is not provided by the app" bug: "270396209" } flag { flag { name: "enable_add_app_widget_via_config_activity_v2" name: "enable_add_app_widget_via_config_activity_v2" namespace: "launcher" namespace: "launcher" Loading
src/com/android/launcher3/config/FeatureFlags.java +0 −5 Original line number Original line Diff line number Diff line Loading @@ -184,11 +184,6 @@ public final class FeatureFlags { "SECONDARY_DRAG_N_DROP_TO_PIN", DISABLED, "SECONDARY_DRAG_N_DROP_TO_PIN", DISABLED, "Enable dragging and dropping to pin apps within secondary display"); "Enable dragging and dropping to pin apps within secondary display"); // TODO(Block 7): Clean up flags public static final BooleanFlag ENABLE_FORCED_MONO_ICON = getDebugFlag(270396209, "ENABLE_FORCED_MONO_ICON", DISABLED, "Enable the ability to generate monochromatic icons, if it is not provided by the app"); // TODO(Block 8): Clean up flags // TODO(Block 8): Clean up flags // TODO(Block 9): Clean up flags // TODO(Block 9): Clean up flags Loading
src/com/android/launcher3/icons/LauncherIcons.java +2 −3 Original line number Original line Diff line number Diff line Loading @@ -16,14 +16,13 @@ package com.android.launcher3.icons; package com.android.launcher3.icons; import static com.android.launcher3.config.FeatureFlags.ENABLE_FORCED_MONO_ICON; import android.content.Context; import android.content.Context; import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable; import android.os.UserHandle; import android.os.UserHandle; import androidx.annotation.NonNull; import androidx.annotation.NonNull; import com.android.launcher3.Flags; import com.android.launcher3.InvariantDeviceProfile; import com.android.launcher3.InvariantDeviceProfile; import com.android.launcher3.graphics.IconShape; import com.android.launcher3.graphics.IconShape; import com.android.launcher3.graphics.LauncherPreviewRenderer; import com.android.launcher3.graphics.LauncherPreviewRenderer; Loading Loading @@ -103,7 +102,7 @@ public class LauncherIcons extends BaseIconFactory implements AutoCloseable { @Override @Override protected Drawable getMonochromeDrawable(Drawable base) { protected Drawable getMonochromeDrawable(Drawable base) { Drawable mono = super.getMonochromeDrawable(base); Drawable mono = super.getMonochromeDrawable(base); if (mono != null || !ENABLE_FORCED_MONO_ICON.get()) { if (mono != null || !Flags.forceMonochromeAppIcons()) { return mono; return mono; } } if (mMonochromeIconFactory == null) { if (mMonochromeIconFactory == null) { Loading