Moving FORCE_MONOCHROME_APP_ICONS to New Flag System
In order to continue work on theming all app icons we are moving the developer flag over. This is cleanup work
Bug: 270396209
Test: None
Flag: ACONFIG FLAG_FORCE_MONOCHROME_APP_ICONS disabled
Change-Id: Ia290a6761aec68eadd2e78f64ac5dbd233af6033
diff --git a/aconfig/launcher.aconfig b/aconfig/launcher.aconfig
index 462d947..ec0953c 100644
--- a/aconfig/launcher.aconfig
+++ b/aconfig/launcher.aconfig
@@ -171,6 +171,13 @@
}
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 {
name: "enable_add_app_widget_via_config_activity_v2"
namespace: "launcher"
description: "When adding app widget through config activity, directly add it to workspace to reduce flicker"
diff --git a/src/com/android/launcher3/config/FeatureFlags.java b/src/com/android/launcher3/config/FeatureFlags.java
index e25e033..2d6fdc8 100644
--- a/src/com/android/launcher3/config/FeatureFlags.java
+++ b/src/com/android/launcher3/config/FeatureFlags.java
@@ -184,11 +184,6 @@
"SECONDARY_DRAG_N_DROP_TO_PIN", DISABLED,
"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 9): Clean up flags
diff --git a/src/com/android/launcher3/icons/LauncherIcons.java b/src/com/android/launcher3/icons/LauncherIcons.java
index a15348b..513377a 100644
--- a/src/com/android/launcher3/icons/LauncherIcons.java
+++ b/src/com/android/launcher3/icons/LauncherIcons.java
@@ -16,14 +16,13 @@
package com.android.launcher3.icons;
-import static com.android.launcher3.config.FeatureFlags.ENABLE_FORCED_MONO_ICON;
-
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.os.UserHandle;
import androidx.annotation.NonNull;
+import com.android.launcher3.Flags;
import com.android.launcher3.InvariantDeviceProfile;
import com.android.launcher3.graphics.IconShape;
import com.android.launcher3.graphics.LauncherPreviewRenderer;
@@ -103,7 +102,7 @@
@Override
protected Drawable getMonochromeDrawable(Drawable base) {
Drawable mono = super.getMonochromeDrawable(base);
- if (mono != null || !ENABLE_FORCED_MONO_ICON.get()) {
+ if (mono != null || !Flags.forceMonochromeAppIcons()) {
return mono;
}
if (mMonochromeIconFactory == null) {