Merge "Adds smart autorotate setting to the system." into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
b5884dc67c
@@ -5930,6 +5930,13 @@ public final class Settings {
|
|||||||
*/
|
*/
|
||||||
public static final String ADAPTIVE_SLEEP = "adaptive_sleep";
|
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}
|
* @deprecated Use {@link android.provider.Settings.Global#DEVELOPMENT_SETTINGS_ENABLED}
|
||||||
* instead
|
* instead
|
||||||
|
|||||||
@@ -518,6 +518,11 @@ message SecureSettingsProto {
|
|||||||
}
|
}
|
||||||
optional Search search = 48;
|
optional Search search = 48;
|
||||||
|
|
||||||
|
message CameraAutorotate {
|
||||||
|
optional SettingProto enabled = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
|
||||||
|
}
|
||||||
|
optional CameraAutorotate camera_autorotate = 88;
|
||||||
|
|
||||||
message SpellChecker {
|
message SpellChecker {
|
||||||
option (android.msg_privacy).dest = DEST_EXPLICIT;
|
option (android.msg_privacy).dest = DEST_EXPLICIT;
|
||||||
|
|
||||||
@@ -642,5 +647,5 @@ message SecureSettingsProto {
|
|||||||
|
|
||||||
// Please insert fields in alphabetical order and group them into messages
|
// Please insert fields in alphabetical order and group them into messages
|
||||||
// if possible (to avoid reaching the method limit).
|
// if possible (to avoid reaching the method limit).
|
||||||
// Next tag = 88;
|
// Next tag = 89;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -517,6 +517,9 @@
|
|||||||
<!-- Flag indicating whether we should enable smart battery. -->
|
<!-- Flag indicating whether we should enable smart battery. -->
|
||||||
<bool name="config_smart_battery_available">false</bool>
|
<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-->
|
<!-- Fast brightness animation ramp rate in brightness units per second-->
|
||||||
<integer translatable="false" name="config_brightness_ramp_rate_fast">180</integer>
|
<integer translatable="false" name="config_brightness_ramp_rate_fast">180</integer>
|
||||||
|
|
||||||
|
|||||||
@@ -1881,6 +1881,7 @@
|
|||||||
<java-symbol type="bool" name="config_enableServerNotificationEffectsForAutomotive" />
|
<java-symbol type="bool" name="config_enableServerNotificationEffectsForAutomotive" />
|
||||||
<java-symbol type="bool" name="config_useAttentionLight" />
|
<java-symbol type="bool" name="config_useAttentionLight" />
|
||||||
<java-symbol type="bool" name="config_adaptive_sleep_available" />
|
<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_animateScreenLights" />
|
||||||
<java-symbol type="bool" name="config_automatic_brightness_available" />
|
<java-symbol type="bool" name="config_automatic_brightness_available" />
|
||||||
<java-symbol type="bool" name="config_smart_battery_available" />
|
<java-symbol type="bool" name="config_smart_battery_available" />
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ public class SecureSettings {
|
|||||||
Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED,
|
Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED,
|
||||||
Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_NAVBAR_ENABLED,
|
Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_NAVBAR_ENABLED,
|
||||||
Settings.Secure.ADAPTIVE_SLEEP,
|
Settings.Secure.ADAPTIVE_SLEEP,
|
||||||
|
Settings.Secure.CAMERA_AUTOROTATE,
|
||||||
Settings.Secure.AUTOFILL_SERVICE,
|
Settings.Secure.AUTOFILL_SERVICE,
|
||||||
Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE,
|
Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE,
|
||||||
Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES,
|
Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES,
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ public class SecureSettingsValidators {
|
|||||||
VALIDATORS.put(
|
VALIDATORS.put(
|
||||||
Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_NAVBAR_ENABLED, BOOLEAN_VALIDATOR);
|
Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_NAVBAR_ENABLED, BOOLEAN_VALIDATOR);
|
||||||
VALIDATORS.put(Secure.ADAPTIVE_SLEEP, BOOLEAN_VALIDATOR);
|
VALIDATORS.put(Secure.ADAPTIVE_SLEEP, BOOLEAN_VALIDATOR);
|
||||||
|
VALIDATORS.put(Secure.CAMERA_AUTOROTATE, BOOLEAN_VALIDATOR);
|
||||||
VALIDATORS.put(Secure.AUTOFILL_SERVICE, NULLABLE_COMPONENT_NAME_VALIDATOR);
|
VALIDATORS.put(Secure.AUTOFILL_SERVICE, NULLABLE_COMPONENT_NAME_VALIDATOR);
|
||||||
VALIDATORS.put(
|
VALIDATORS.put(
|
||||||
Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE,
|
Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE,
|
||||||
|
|||||||
@@ -1969,6 +1969,12 @@ class SettingsProtoDumpUtil {
|
|||||||
Settings.Secure.BLUETOOTH_ON_WHILE_DRIVING,
|
Settings.Secure.BLUETOOTH_ON_WHILE_DRIVING,
|
||||||
SecureSettingsProto.BLUETOOTH_ON_WHILE_DRIVING);
|
SecureSettingsProto.BLUETOOTH_ON_WHILE_DRIVING);
|
||||||
|
|
||||||
|
final long smartAutoRotateToken = p.start(SecureSettingsProto.CAMERA_AUTOROTATE);
|
||||||
|
dumpSetting(s, p,
|
||||||
|
Settings.Secure.CAMERA_AUTOROTATE,
|
||||||
|
SecureSettingsProto.CameraAutorotate.ENABLED);
|
||||||
|
p.end(smartAutoRotateToken);
|
||||||
|
|
||||||
final long cameraToken = p.start(SecureSettingsProto.CAMERA);
|
final long cameraToken = p.start(SecureSettingsProto.CAMERA);
|
||||||
dumpSetting(s, p,
|
dumpSetting(s, p,
|
||||||
Settings.Secure.CAMERA_GESTURE_DISABLED,
|
Settings.Secure.CAMERA_GESTURE_DISABLED,
|
||||||
|
|||||||
Reference in New Issue
Block a user