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

Commit 2e533939 authored by Yi Jiang's avatar Yi Jiang Committed by Alex Salo
Browse files

Adds smart autorotate setting to the system.

Also adds a config flag for the smart autorotate to indicate whether the
feature is enabled.

Test: make RunSettingsRoboTests
Bug: 172370409
Change-Id: I23ff3247827dca188e10d0bd8f00c37e2cd0b920
parent b7fd9a78
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -5930,6 +5930,13 @@ public final class Settings {
         */
        public static final String ADAPTIVE_SLEEP = "adaptive_sleep";
        /**
         * Setting key to indicate whether camera-based autorotate is enabled.
         *
         * @hide
         */
        public static final String CAMERA_AUTOROTATE = "camera_autorotate";
        /**
         * @deprecated Use {@link android.provider.Settings.Global#DEVELOPMENT_SETTINGS_ENABLED}
         * instead
+6 −1
Original line number Diff line number Diff line
@@ -518,6 +518,11 @@ message SecureSettingsProto {
    }
    optional Search search = 48;

    message CameraAutorotate {
        optional SettingProto enabled = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
    }
    optional CameraAutorotate camera_autorotate = 88;

    message SpellChecker {
        option (android.msg_privacy).dest = DEST_EXPLICIT;

@@ -642,5 +647,5 @@ message SecureSettingsProto {

    // Please insert fields in alphabetical order and group them into messages
    // if possible (to avoid reaching the method limit).
    // Next tag = 88;
    // Next tag = 89;
}
+3 −0
Original line number Diff line number Diff line
@@ -517,6 +517,9 @@
    <!-- Flag indicating whether we should enable smart battery. -->
    <bool name="config_smart_battery_available">false</bool>

    <!-- Flag indicating whether we should enable camera-based autorotate -->
    <bool name="config_camera_autorotate">false</bool>

    <!-- Fast brightness animation ramp rate in brightness units per second-->
    <integer translatable="false" name="config_brightness_ramp_rate_fast">180</integer>

+1 −0
Original line number Diff line number Diff line
@@ -1881,6 +1881,7 @@
  <java-symbol type="bool" name="config_enableServerNotificationEffectsForAutomotive" />
  <java-symbol type="bool" name="config_useAttentionLight" />
  <java-symbol type="bool" name="config_adaptive_sleep_available" />
  <java-symbol type="bool" name="config_camera_autorotate"/>
  <java-symbol type="bool" name="config_animateScreenLights" />
  <java-symbol type="bool" name="config_automatic_brightness_available" />
  <java-symbol type="bool" name="config_smart_battery_available" />
+1 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ public class SecureSettings {
        Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED,
        Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_NAVBAR_ENABLED,
        Settings.Secure.ADAPTIVE_SLEEP,
        Settings.Secure.CAMERA_AUTOROTATE,
        Settings.Secure.AUTOFILL_SERVICE,
        Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE,
        Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES,
Loading