Loading src/com/android/settings/contract/SettingsContract.kt +39 −0 Original line number Diff line number Diff line Loading @@ -47,3 +47,42 @@ const val KEY_ADAPTIVE_BRIGHTNESS = "auto_brightness" /** Contract key for the "Screen attention" setting. */ const val KEY_SCREEN_ATTENTION = "screen_attention" /** Contract key for the "Use adaptive connectivity" setting. */ const val KEY_ADAPTIVE_CONNECTIVITY = "adaptive_connectivity" /** Contract key for the "WiFi hotspot" setting. */ const val KEY_WIFI_HOTSPOT = "enable_wifi_ap" /** Contract key for the "Battery Gauge Slider" setting. */ const val KEY_BATTERY_LEVEL = "battery_level" /** Contract key for the "Battery Percentage" setting. */ const val KEY_BATTERY_PERCENTAGE = "battery_percentage" /** Contract key for the "Brightness level" setting. */ const val KEY_BRIGHTNESS_LEVEL = "brightness_level" /** Contract key for the "Smooth display" setting. */ const val KEY_SMOOTH_DISPLAY = "smooth_display" /** Contract key for the "Dark theme" setting. */ const val KEY_DARK_THEME = "dark_theme" /** Contract key for the "Always show time and info" setting. */ const val KEY_AMBIENT_DISPLAY_ALWAYS_ON = "ambient_display_always_on" /** Contract key for the "Use vibration & haptics" setting. */ const val KEY_VIBRATION_HAPTICS = "vibration_haptics" /** Contract key for the "Media volume" setting. */ const val KEY_MEDIA_VOLUME = "media_volume" /** Contract key for the "Call volume" setting. */ const val KEY_CALL_VOLUME = "call_volume" /** Contract key for the "Ring volume" setting. */ const val KEY_RING_VOLUME = "separate_ring_volume" /** Contract key for the "Remove animation" setting. */ const val KEY_REMOVE_ANIMATION = "remove_animation" src/com/android/settings/display/AmbientDisplayAlwaysOnPreference.kt +2 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.os.UserManager import android.provider.Settings.Secure.DOZE_ALWAYS_ON import com.android.settings.PreferenceRestrictionMixin import com.android.settings.R import com.android.settings.contract.KEY_AMBIENT_DISPLAY_ALWAYS_ON import com.android.settings.display.AmbientDisplayAlwaysOnPreferenceController.isAodSuppressedByBedtime import com.android.settingslib.datastore.AbstractKeyedDataObservable import com.android.settingslib.datastore.HandlerExecutor Loading Loading @@ -123,7 +124,7 @@ class AmbientDisplayAlwaysOnPreference : } companion object { const val KEY = "ambient_display_always_on" const val KEY = KEY_AMBIENT_DISPLAY_ALWAYS_ON private const val PROP_AWARE_AVAILABLE = "ro.vendor.aware_available" } } Loading src/com/android/settings/slices/CustomSliceRegistry.java +4 −4 Original line number Diff line number Diff line Loading @@ -171,7 +171,7 @@ public class CustomSliceRegistry { .scheme(ContentResolver.SCHEME_CONTENT) .authority(SettingsSliceProvider.SLICE_AUTHORITY) .appendPath(SettingsSlicesContract.PATH_SETTING_ACTION) .appendPath("call_volume") .appendPath(SettingsContractKt.KEY_CALL_VOLUME) .build(); /** * Full {@link Uri} for the Media Volume Slice. Loading @@ -180,7 +180,7 @@ public class CustomSliceRegistry { .scheme(ContentResolver.SCHEME_CONTENT) .authority(SettingsSliceProvider.SLICE_AUTHORITY) .appendPath(SettingsSlicesContract.PATH_SETTING_ACTION) .appendPath("media_volume") .appendPath(SettingsContractKt.KEY_MEDIA_VOLUME) .build(); /** Loading @@ -190,7 +190,7 @@ public class CustomSliceRegistry { .scheme(ContentResolver.SCHEME_CONTENT) .authority(SettingsSliceProvider.SLICE_AUTHORITY) .appendPath(SettingsSlicesContract.PATH_SETTING_ACTION) .appendPath("separate_ring_volume") .appendPath(SettingsContractKt.KEY_RING_VOLUME) .build(); /** Loading Loading @@ -268,7 +268,7 @@ public class CustomSliceRegistry { .scheme(ContentResolver.SCHEME_CONTENT) .authority(SettingsSliceProvider.SLICE_AUTHORITY) .appendPath(SettingsSlicesContract.PATH_SETTING_ACTION) .appendPath("dark_theme") .appendPath(SettingsContractKt.KEY_DARK_THEME) .build(); /** Loading Loading
src/com/android/settings/contract/SettingsContract.kt +39 −0 Original line number Diff line number Diff line Loading @@ -47,3 +47,42 @@ const val KEY_ADAPTIVE_BRIGHTNESS = "auto_brightness" /** Contract key for the "Screen attention" setting. */ const val KEY_SCREEN_ATTENTION = "screen_attention" /** Contract key for the "Use adaptive connectivity" setting. */ const val KEY_ADAPTIVE_CONNECTIVITY = "adaptive_connectivity" /** Contract key for the "WiFi hotspot" setting. */ const val KEY_WIFI_HOTSPOT = "enable_wifi_ap" /** Contract key for the "Battery Gauge Slider" setting. */ const val KEY_BATTERY_LEVEL = "battery_level" /** Contract key for the "Battery Percentage" setting. */ const val KEY_BATTERY_PERCENTAGE = "battery_percentage" /** Contract key for the "Brightness level" setting. */ const val KEY_BRIGHTNESS_LEVEL = "brightness_level" /** Contract key for the "Smooth display" setting. */ const val KEY_SMOOTH_DISPLAY = "smooth_display" /** Contract key for the "Dark theme" setting. */ const val KEY_DARK_THEME = "dark_theme" /** Contract key for the "Always show time and info" setting. */ const val KEY_AMBIENT_DISPLAY_ALWAYS_ON = "ambient_display_always_on" /** Contract key for the "Use vibration & haptics" setting. */ const val KEY_VIBRATION_HAPTICS = "vibration_haptics" /** Contract key for the "Media volume" setting. */ const val KEY_MEDIA_VOLUME = "media_volume" /** Contract key for the "Call volume" setting. */ const val KEY_CALL_VOLUME = "call_volume" /** Contract key for the "Ring volume" setting. */ const val KEY_RING_VOLUME = "separate_ring_volume" /** Contract key for the "Remove animation" setting. */ const val KEY_REMOVE_ANIMATION = "remove_animation"
src/com/android/settings/display/AmbientDisplayAlwaysOnPreference.kt +2 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.os.UserManager import android.provider.Settings.Secure.DOZE_ALWAYS_ON import com.android.settings.PreferenceRestrictionMixin import com.android.settings.R import com.android.settings.contract.KEY_AMBIENT_DISPLAY_ALWAYS_ON import com.android.settings.display.AmbientDisplayAlwaysOnPreferenceController.isAodSuppressedByBedtime import com.android.settingslib.datastore.AbstractKeyedDataObservable import com.android.settingslib.datastore.HandlerExecutor Loading Loading @@ -123,7 +124,7 @@ class AmbientDisplayAlwaysOnPreference : } companion object { const val KEY = "ambient_display_always_on" const val KEY = KEY_AMBIENT_DISPLAY_ALWAYS_ON private const val PROP_AWARE_AVAILABLE = "ro.vendor.aware_available" } } Loading
src/com/android/settings/slices/CustomSliceRegistry.java +4 −4 Original line number Diff line number Diff line Loading @@ -171,7 +171,7 @@ public class CustomSliceRegistry { .scheme(ContentResolver.SCHEME_CONTENT) .authority(SettingsSliceProvider.SLICE_AUTHORITY) .appendPath(SettingsSlicesContract.PATH_SETTING_ACTION) .appendPath("call_volume") .appendPath(SettingsContractKt.KEY_CALL_VOLUME) .build(); /** * Full {@link Uri} for the Media Volume Slice. Loading @@ -180,7 +180,7 @@ public class CustomSliceRegistry { .scheme(ContentResolver.SCHEME_CONTENT) .authority(SettingsSliceProvider.SLICE_AUTHORITY) .appendPath(SettingsSlicesContract.PATH_SETTING_ACTION) .appendPath("media_volume") .appendPath(SettingsContractKt.KEY_MEDIA_VOLUME) .build(); /** Loading @@ -190,7 +190,7 @@ public class CustomSliceRegistry { .scheme(ContentResolver.SCHEME_CONTENT) .authority(SettingsSliceProvider.SLICE_AUTHORITY) .appendPath(SettingsSlicesContract.PATH_SETTING_ACTION) .appendPath("separate_ring_volume") .appendPath(SettingsContractKt.KEY_RING_VOLUME) .build(); /** Loading Loading @@ -268,7 +268,7 @@ public class CustomSliceRegistry { .scheme(ContentResolver.SCHEME_CONTENT) .authority(SettingsSliceProvider.SLICE_AUTHORITY) .appendPath(SettingsSlicesContract.PATH_SETTING_ACTION) .appendPath("dark_theme") .appendPath(SettingsContractKt.KEY_DARK_THEME) .build(); /** Loading