Enabling Monochromatic on droidfood
Changing from default false to true Test: Manual Bug: 241778903 Change-Id: I822548737679f9f09f0460a8994a72e89edc0de1
This commit is contained in:
@@ -181,6 +181,9 @@ object CustomizationProviderContract {
|
|||||||
/** Flag denoting whether the Wallpaper preview should use the full screen UI. */
|
/** Flag denoting whether the Wallpaper preview should use the full screen UI. */
|
||||||
const val FLAG_NAME_WALLPAPER_FULLSCREEN_PREVIEW = "wallpaper_fullscreen_preview"
|
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 {
|
object Columns {
|
||||||
/** String. Unique ID for the flag. */
|
/** String. Unique ID for the flag. */
|
||||||
const val NAME = "name"
|
const val NAME = "name"
|
||||||
|
|||||||
@@ -311,9 +311,7 @@ object Flags {
|
|||||||
val SCREEN_CONTENTS_TRANSLATION = unreleasedFlag(803, "screen_contents_translation")
|
val SCREEN_CONTENTS_TRANSLATION = unreleasedFlag(803, "screen_contents_translation")
|
||||||
|
|
||||||
// 804 - monochromatic themes
|
// 804 - monochromatic themes
|
||||||
@JvmField
|
@JvmField val MONOCHROMATIC_THEME = releasedFlag(804, "monochromatic")
|
||||||
val MONOCHROMATIC_THEMES =
|
|
||||||
sysPropBooleanFlag(804, "persist.sysui.monochromatic", default = false)
|
|
||||||
|
|
||||||
// 900 - media
|
// 900 - media
|
||||||
// TODO(b/254512697): Tracking Bug
|
// TODO(b/254512697): Tracking Bug
|
||||||
|
|||||||
@@ -154,7 +154,11 @@ constructor(
|
|||||||
val slots = repository.get().getSlotPickerRepresentations()
|
val slots = repository.get().getSlotPickerRepresentations()
|
||||||
val slot = slots.find { it.id == slotId } ?: return false
|
val slot = slots.find { it.id == slotId } ?: return false
|
||||||
val selections =
|
val selections =
|
||||||
repository.get().getCurrentSelections().getOrDefault(slotId, emptyList()).toMutableList()
|
repository
|
||||||
|
.get()
|
||||||
|
.getCurrentSelections()
|
||||||
|
.getOrDefault(slotId, emptyList())
|
||||||
|
.toMutableList()
|
||||||
val alreadySelected = selections.remove(affordanceId)
|
val alreadySelected = selections.remove(affordanceId)
|
||||||
if (!alreadySelected) {
|
if (!alreadySelected) {
|
||||||
while (selections.size > 0 && selections.size >= slot.maxSelectedAffordances) {
|
while (selections.size > 0 && selections.size >= slot.maxSelectedAffordances) {
|
||||||
@@ -203,7 +207,11 @@ constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
val selections =
|
val selections =
|
||||||
repository.get().getCurrentSelections().getOrDefault(slotId, emptyList()).toMutableList()
|
repository
|
||||||
|
.get()
|
||||||
|
.getCurrentSelections()
|
||||||
|
.getOrDefault(slotId, emptyList())
|
||||||
|
.toMutableList()
|
||||||
return if (selections.remove(affordanceId)) {
|
return if (selections.remove(affordanceId)) {
|
||||||
repository
|
repository
|
||||||
.get()
|
.get()
|
||||||
@@ -367,6 +375,10 @@ constructor(
|
|||||||
name = Contract.FlagsTable.FLAG_NAME_WALLPAPER_FULLSCREEN_PREVIEW,
|
name = Contract.FlagsTable.FLAG_NAME_WALLPAPER_FULLSCREEN_PREVIEW,
|
||||||
value = featureFlags.isEnabled(Flags.WALLPAPER_FULLSCREEN_PREVIEW),
|
value = featureFlags.isEnabled(Flags.WALLPAPER_FULLSCREEN_PREVIEW),
|
||||||
),
|
),
|
||||||
|
KeyguardPickerFlag(
|
||||||
|
name = Contract.FlagsTable.FLAG_NAME_MONOCHROMATIC_THEME,
|
||||||
|
value = featureFlags.isEnabled(Flags.MONOCHROMATIC_THEME)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -115,6 +115,7 @@ public class ThemeOverlayController implements CoreStartable, Dumpable {
|
|||||||
private final SecureSettings mSecureSettings;
|
private final SecureSettings mSecureSettings;
|
||||||
private final Executor mMainExecutor;
|
private final Executor mMainExecutor;
|
||||||
private final Handler mBgHandler;
|
private final Handler mBgHandler;
|
||||||
|
private final boolean mIsMonochromaticEnabled;
|
||||||
private final Context mContext;
|
private final Context mContext;
|
||||||
private final boolean mIsMonetEnabled;
|
private final boolean mIsMonetEnabled;
|
||||||
private final UserTracker mUserTracker;
|
private final UserTracker mUserTracker;
|
||||||
@@ -364,6 +365,7 @@ public class ThemeOverlayController implements CoreStartable, Dumpable {
|
|||||||
UserTracker userTracker, DumpManager dumpManager, FeatureFlags featureFlags,
|
UserTracker userTracker, DumpManager dumpManager, FeatureFlags featureFlags,
|
||||||
@Main Resources resources, WakefulnessLifecycle wakefulnessLifecycle) {
|
@Main Resources resources, WakefulnessLifecycle wakefulnessLifecycle) {
|
||||||
mContext = context;
|
mContext = context;
|
||||||
|
mIsMonochromaticEnabled = featureFlags.isEnabled(Flags.MONOCHROMATIC_THEME);
|
||||||
mIsMonetEnabled = featureFlags.isEnabled(Flags.MONET);
|
mIsMonetEnabled = featureFlags.isEnabled(Flags.MONET);
|
||||||
mDeviceProvisionedController = deviceProvisionedController;
|
mDeviceProvisionedController = deviceProvisionedController;
|
||||||
mBroadcastDispatcher = broadcastDispatcher;
|
mBroadcastDispatcher = broadcastDispatcher;
|
||||||
|
|||||||
Reference in New Issue
Block a user