Merge "Adding a feature flag to disable icon overrides" into tm-dev
This commit is contained in:
@@ -261,6 +261,10 @@ public final class FeatureFlags {
|
||||
public static final BooleanFlag ENABLE_ONE_SEARCH_MOTION = new DeviceFlag(
|
||||
"ENABLE_ONE_SEARCH_MOTION", true, "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
|
||||
|
||||
Reference in New Issue
Block a user