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

Commit 823889cc authored by Lucas Dupin's avatar Lucas Dupin
Browse files

Monet feature flag

Feature flag to disable/enable system colors based on the wallpaper.

Bug: 174676673
Test: adb shell setprop persist.sysui.monet 0
Test: adb shell setprop persist.sysui.monet 1
Change-Id: I3e8035d772a007f6d3e3c36cfd656144e558b9e5
parent 475acd3f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ package com.android.systemui.theme;

import android.content.om.OverlayInfo;
import android.content.om.OverlayManager;
import android.os.SystemProperties;
import android.os.UserHandle;
import android.util.ArrayMap;
import android.util.Log;
@@ -49,6 +50,8 @@ import java.util.stream.Collectors;
public class ThemeOverlayApplier implements Dumpable {
    private static final String TAG = "ThemeOverlayApplier";
    private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
    private static final boolean MONET_ENABLED = SystemProperties
            .getBoolean("persist.sysui.monet", false);

    @VisibleForTesting
    static final String MONET_ACCENT_COLOR_PACKAGE = "com.android.theme.accentcolor.color";
@@ -178,6 +181,9 @@ public class ThemeOverlayApplier implements Dumpable {
    }

    private void collectMonetSystemOverlays() {
        if (!MONET_ENABLED) {
            return;
        }
        List<OverlayInfo> androidOverlays = mOverlayManager
                .getOverlayInfosForTarget(ANDROID_PACKAGE, UserHandle.SYSTEM);
        for (OverlayInfo overlayInfo : androidOverlays) {