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

Commit 79ce7e12 authored by Vadym Omelnytskyi's avatar Vadym Omelnytskyi
Browse files

Settings: add system setting CV_DYNAMIC

Bug: 390644464
Flag: build.RELEASE_EXP
Test: verified that CV_DYNAMIC_ENABLED settings may be used
Change-Id: I0fa61a45bed66e5e7a9b149e1a76a0bee9a0f922
parent 4268b167
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -6585,6 +6585,15 @@ public final class Settings {
        public static final String CV_ENABLED =
        public static final String CV_ENABLED =
                "cv_enabled";
                "cv_enabled";
        /**
         * Setting to set enable/disable CV dynamic mode.
         * Setting should be boolean (0 or 1)
         *
         * @hide
         */
        public static final String CV_DYNAMIC_ENABLED =
                "cv_dynamic_enabled";
        /**
        /**
         * Integer property that specifes the color for screen flash notification as a
         * Integer property that specifes the color for screen flash notification as a
         * packed 32-bit color.
         * packed 32-bit color.
+2 −0
Original line number Original line Diff line number Diff line
@@ -294,6 +294,8 @@ message SystemSettingsProto {
        option (android.msg_privacy).dest = DEST_EXPLICIT;
        option (android.msg_privacy).dest = DEST_EXPLICIT;


        optional SettingProto cv_enabled = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
        optional SettingProto cv_enabled = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];

        optional SettingProto cv_dynamic_enabled = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
    }
    }
    optional Display display = 39;
    optional Display display = 39;


+2 −1
Original line number Original line Diff line number Diff line
@@ -126,7 +126,8 @@ public class SystemSettings {
                Settings.System.NOTIFICATION_COOLDOWN_ALL,
                Settings.System.NOTIFICATION_COOLDOWN_ALL,
                Settings.System.NOTIFICATION_COOLDOWN_VIBRATE_UNLOCKED,
                Settings.System.NOTIFICATION_COOLDOWN_VIBRATE_UNLOCKED,
                Settings.System.PREFERRED_REGION,
                Settings.System.PREFERRED_REGION,
                Settings.System.CV_ENABLED
                Settings.System.CV_ENABLED,
                Settings.System.CV_DYNAMIC_ENABLED
        ));
        ));
        if (Flags.backUpSmoothDisplayAndForcePeakRefreshRate()) {
        if (Flags.backUpSmoothDisplayAndForcePeakRefreshRate()) {
            settings.add(Settings.System.PEAK_REFRESH_RATE);
            settings.add(Settings.System.PEAK_REFRESH_RATE);
+2 −2
Original line number Original line Diff line number Diff line
@@ -272,7 +272,7 @@ public class SystemSettingsValidators {
        VALIDATORS.put(System.NOTIFICATION_COOLDOWN_ALL, BOOLEAN_VALIDATOR);
        VALIDATORS.put(System.NOTIFICATION_COOLDOWN_ALL, BOOLEAN_VALIDATOR);
        VALIDATORS.put(System.NOTIFICATION_COOLDOWN_VIBRATE_UNLOCKED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(System.NOTIFICATION_COOLDOWN_VIBRATE_UNLOCKED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(System.PREFERRED_REGION, ANY_STRING_VALIDATOR);
        VALIDATORS.put(System.PREFERRED_REGION, ANY_STRING_VALIDATOR);
        VALIDATORS.put(System.CV_ENABLED,
        VALIDATORS.put(System.CV_ENABLED, new InclusiveIntegerRangeValidator(0, 1));
                new InclusiveIntegerRangeValidator(0, 1));
        VALIDATORS.put(System.CV_DYNAMIC_ENABLED, new InclusiveIntegerRangeValidator(0, 1));
    }
    }
}
}
+3 −0
Original line number Original line Diff line number Diff line
@@ -3175,6 +3175,9 @@ class SettingsProtoDumpUtil {
        dumpSetting(s, p,
        dumpSetting(s, p,
                Settings.System.CV_ENABLED,
                Settings.System.CV_ENABLED,
                SystemSettingsProto.Display.CV_ENABLED);
                SystemSettingsProto.Display.CV_ENABLED);
        dumpSetting(s, p,
                Settings.System.CV_DYNAMIC_ENABLED,
                SystemSettingsProto.Display.CV_DYNAMIC_ENABLED);
        p.end(systemDisplayToken);
        p.end(systemDisplayToken);


        dumpSetting(s, p,
        dumpSetting(s, p,