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

Commit 92f78ff2 authored by Yiling Chuang's avatar Yiling Chuang Committed by Android (Google) Code Review
Browse files

Merge "Add a new Settings.Secure setting CHARGE_OPTIMIZATION_MODE" into main

parents 7889d4f9 3d3feb26
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -12629,6 +12629,15 @@ public final class Settings {
         * @hide
         */
        public static final String V_TO_U_RESTORE_DENYLIST = "v_to_u_restore_denylist";
        /**
         * Integer property that determines which charging optimization mode is applied.
         * [0-10] inclusive representing different modes, where 0 is the default indicating
         * no optimization mode is applied.
         *
         * @hide
         */
        public static final String CHARGE_OPTIMIZATION_MODE = "charge_optimization_mode";
    }
    /**
+3 −1
Original line number Diff line number Diff line
@@ -731,7 +731,9 @@ message SecureSettingsProto {
    }
    optional Zen zen = 71;

    optional SettingProto charge_optimization_mode = 101 [ (android.privacy).dest = DEST_AUTOMATIC ];

    // Please insert fields in alphabetical order and group them into messages
    // if possible (to avoid reaching the method limit).
    // Next tag = 101;
    // Next tag = 102;
}
+2 −1
Original line number Diff line number Diff line
@@ -273,6 +273,7 @@ public class SecureSettings {
        Settings.Secure.AUDIO_DEVICE_INVENTORY,
        Settings.Secure.SCREEN_RESOLUTION_MODE,
        Settings.Secure.ACCESSIBILITY_FLOATING_MENU_TARGETS,
        Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_SATURATION_LEVEL
        Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_SATURATION_LEVEL,
        Settings.Secure.CHARGE_OPTIMIZATION_MODE
    };
}
+1 −0
Original line number Diff line number Diff line
@@ -432,5 +432,6 @@ public class SecureSettingsValidators {
                Secure.RESOLUTION_MODE_UNKNOWN, Secure.RESOLUTION_MODE_FULL));
        VALIDATORS.put(Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_SATURATION_LEVEL,
                new InclusiveIntegerRangeValidator(0, 10));
        VALIDATORS.put(Secure.CHARGE_OPTIMIZATION_MODE, new InclusiveIntegerRangeValidator(0, 10));
    }
}
+3 −0
Original line number Diff line number Diff line
@@ -2745,6 +2745,9 @@ class SettingsProtoDumpUtil {
        dumpSetting(s, p,
                Settings.Secure.ZEN_SETTINGS_SUGGESTION_VIEWED,
                SecureSettingsProto.Zen.SETTINGS_SUGGESTION_VIEWED);
        dumpSetting(s, p,
                Settings.Secure.CHARGE_OPTIMIZATION_MODE,
                SecureSettingsProto.CHARGE_OPTIMIZATION_MODE);
        p.end(zenToken);

        // Please insert new settings using the same order as in SecureSettingsProto.