Adding a feature flag to disable icon overrides

Bug: 226388663
Test: Verified locally by disabling the feature
Change-Id: Icfbe790046209b15dbdc0e44dcf1a14f1f50de62
This commit is contained in:
Sunny Goyal
2022-03-23 15:30:38 -07:00
parent 8d06bb8991
commit eeca859bc9
2 changed files with 7 additions and 1 deletions
@@ -261,6 +261,10 @@ public final class FeatureFlags {
public static final BooleanFlag ENABLE_ONE_SEARCH_MOTION = new DeviceFlag(
"ENABLE_ONE_SEARCH_MOTION", false, "Enables animations in OneSearch.");
public static final BooleanFlag USE_LOCAL_ICON_OVERRIDES = getDebugFlag(
"USE_LOCAL_ICON_OVERRIDES", true,
"Use inbuilt monochrome icons if app doesn't provide one");
public static void initialize(Context context) {
synchronized (sDebugFlags) {
for (DebugFlag flag : sDebugFlags) {
@@ -23,6 +23,7 @@ import android.util.ArrayMap;
import android.util.Log;
import com.android.launcher3.R;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.util.Themes;
import org.xmlpull.v1.XmlPullParser;
@@ -55,7 +56,8 @@ public class LauncherIconProvider extends IconProvider {
*/
public void setIconThemeSupported(boolean isSupported) {
mSupportsIconTheme = isSupported;
mThemedIconMap = isSupported ? null : DISABLED_MAP;
mThemedIconMap = isSupported && FeatureFlags.USE_LOCAL_ICON_OVERRIDES.get()
? null : DISABLED_MAP;
}
@Override