Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16b68816 authored by Andrew Cole's avatar Andrew Cole
Browse files

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
parent ee5a46cf
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -170,6 +170,13 @@ flag {
  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 {
  name: "enable_add_app_widget_via_config_activity_v2"
  namespace: "launcher"
+0 −5
Original line number Diff line number Diff line
@@ -184,11 +184,6 @@ public final class FeatureFlags {
            "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
+2 −3
Original line number Diff line number Diff line
@@ -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 @@ public class LauncherIcons extends BaseIconFactory implements AutoCloseable {
    @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) {