Loading packages/SystemUI/customization/src/com/android/systemui/shared/customization/data/content/CustomizationProviderContract.kt +3 −0 Original line number Diff line number Diff line Loading @@ -181,6 +181,9 @@ object CustomizationProviderContract { /** Flag denoting whether the Wallpaper preview should use the full screen UI. */ const val FLAG_NAME_WALLPAPER_FULLSCREEN_PREVIEW = "wallpaper_fullscreen_preview" /** Flag denoting whether the Monochromatic Theme is enabled. */ const val FLAG_NAME_MONOCHROMATIC_THEME = "is_monochromatic_theme_enabled" object Columns { /** String. Unique ID for the flag. */ const val NAME = "name" Loading packages/SystemUI/src/com/android/systemui/flags/Flags.kt +1 −3 Original line number Diff line number Diff line Loading @@ -309,9 +309,7 @@ object Flags { val SCREEN_CONTENTS_TRANSLATION = unreleasedFlag(803, "screen_contents_translation") // 804 - monochromatic themes @JvmField val MONOCHROMATIC_THEMES = sysPropBooleanFlag(804, "persist.sysui.monochromatic", default = false) @JvmField val MONOCHROMATIC_THEME = releasedFlag(804, "monochromatic") // 900 - media // TODO(b/254512697): Tracking Bug Loading packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardQuickAffordanceInteractor.kt +14 −2 Original line number Diff line number Diff line Loading @@ -154,7 +154,11 @@ constructor( val slots = repository.get().getSlotPickerRepresentations() val slot = slots.find { it.id == slotId } ?: return false val selections = repository.get().getCurrentSelections().getOrDefault(slotId, emptyList()).toMutableList() repository .get() .getCurrentSelections() .getOrDefault(slotId, emptyList()) .toMutableList() val alreadySelected = selections.remove(affordanceId) if (!alreadySelected) { while (selections.size > 0 && selections.size >= slot.maxSelectedAffordances) { Loading Loading @@ -203,7 +207,11 @@ constructor( } val selections = repository.get().getCurrentSelections().getOrDefault(slotId, emptyList()).toMutableList() repository .get() .getCurrentSelections() .getOrDefault(slotId, emptyList()) .toMutableList() return if (selections.remove(affordanceId)) { repository .get() Loading Loading @@ -367,6 +375,10 @@ constructor( name = Contract.FlagsTable.FLAG_NAME_WALLPAPER_FULLSCREEN_PREVIEW, value = featureFlags.isEnabled(Flags.WALLPAPER_FULLSCREEN_PREVIEW), ), KeyguardPickerFlag( name = Contract.FlagsTable.FLAG_NAME_MONOCHROMATIC_THEME, value = featureFlags.isEnabled(Flags.MONOCHROMATIC_THEME) ) ) } Loading packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java +2 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,7 @@ public class ThemeOverlayController implements CoreStartable, Dumpable { private final SecureSettings mSecureSettings; private final Executor mMainExecutor; private final Handler mBgHandler; private final boolean mIsMonochromaticEnabled; private final Context mContext; private final boolean mIsMonetEnabled; private final UserTracker mUserTracker; Loading Loading @@ -373,6 +374,7 @@ public class ThemeOverlayController implements CoreStartable, Dumpable { @Main Resources resources, WakefulnessLifecycle wakefulnessLifecycle) { mContext = context; mIsMonochromaticEnabled = featureFlags.isEnabled(Flags.MONOCHROMATIC_THEME); mIsMonetEnabled = featureFlags.isEnabled(Flags.MONET); mDeviceProvisionedController = deviceProvisionedController; mBroadcastDispatcher = broadcastDispatcher; Loading Loading
packages/SystemUI/customization/src/com/android/systemui/shared/customization/data/content/CustomizationProviderContract.kt +3 −0 Original line number Diff line number Diff line Loading @@ -181,6 +181,9 @@ object CustomizationProviderContract { /** Flag denoting whether the Wallpaper preview should use the full screen UI. */ const val FLAG_NAME_WALLPAPER_FULLSCREEN_PREVIEW = "wallpaper_fullscreen_preview" /** Flag denoting whether the Monochromatic Theme is enabled. */ const val FLAG_NAME_MONOCHROMATIC_THEME = "is_monochromatic_theme_enabled" object Columns { /** String. Unique ID for the flag. */ const val NAME = "name" Loading
packages/SystemUI/src/com/android/systemui/flags/Flags.kt +1 −3 Original line number Diff line number Diff line Loading @@ -309,9 +309,7 @@ object Flags { val SCREEN_CONTENTS_TRANSLATION = unreleasedFlag(803, "screen_contents_translation") // 804 - monochromatic themes @JvmField val MONOCHROMATIC_THEMES = sysPropBooleanFlag(804, "persist.sysui.monochromatic", default = false) @JvmField val MONOCHROMATIC_THEME = releasedFlag(804, "monochromatic") // 900 - media // TODO(b/254512697): Tracking Bug Loading
packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardQuickAffordanceInteractor.kt +14 −2 Original line number Diff line number Diff line Loading @@ -154,7 +154,11 @@ constructor( val slots = repository.get().getSlotPickerRepresentations() val slot = slots.find { it.id == slotId } ?: return false val selections = repository.get().getCurrentSelections().getOrDefault(slotId, emptyList()).toMutableList() repository .get() .getCurrentSelections() .getOrDefault(slotId, emptyList()) .toMutableList() val alreadySelected = selections.remove(affordanceId) if (!alreadySelected) { while (selections.size > 0 && selections.size >= slot.maxSelectedAffordances) { Loading Loading @@ -203,7 +207,11 @@ constructor( } val selections = repository.get().getCurrentSelections().getOrDefault(slotId, emptyList()).toMutableList() repository .get() .getCurrentSelections() .getOrDefault(slotId, emptyList()) .toMutableList() return if (selections.remove(affordanceId)) { repository .get() Loading Loading @@ -367,6 +375,10 @@ constructor( name = Contract.FlagsTable.FLAG_NAME_WALLPAPER_FULLSCREEN_PREVIEW, value = featureFlags.isEnabled(Flags.WALLPAPER_FULLSCREEN_PREVIEW), ), KeyguardPickerFlag( name = Contract.FlagsTable.FLAG_NAME_MONOCHROMATIC_THEME, value = featureFlags.isEnabled(Flags.MONOCHROMATIC_THEME) ) ) } Loading
packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java +2 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,7 @@ public class ThemeOverlayController implements CoreStartable, Dumpable { private final SecureSettings mSecureSettings; private final Executor mMainExecutor; private final Handler mBgHandler; private final boolean mIsMonochromaticEnabled; private final Context mContext; private final boolean mIsMonetEnabled; private final UserTracker mUserTracker; Loading Loading @@ -373,6 +374,7 @@ public class ThemeOverlayController implements CoreStartable, Dumpable { @Main Resources resources, WakefulnessLifecycle wakefulnessLifecycle) { mContext = context; mIsMonochromaticEnabled = featureFlags.isEnabled(Flags.MONOCHROMATIC_THEME); mIsMonetEnabled = featureFlags.isEnabled(Flags.MONET); mDeviceProvisionedController = deviceProvisionedController; mBroadcastDispatcher = broadcastDispatcher; Loading