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

Commit 8397f105 authored by Sunny Shao's avatar Sunny Shao
Browse files

[Catalyst] Introduce the Tags for Get/Set APIs

NO_IFTTT=Catalyst only

Test: atest ExternalSettingsProviderTest
Bug: 394002861
Flag: EXEMPT bugfix
Change-Id: I630a9f5ffbaaeed16e13674efa507f3a7b681839
parent ce463e41
Loading
Loading
Loading
Loading
+39 −0
Original line number Diff line number Diff line
@@ -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"
+2 −1
Original line number Diff line number Diff line
@@ -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
@@ -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"
    }
}
+4 −4
Original line number Diff line number Diff line
@@ -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.
@@ -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();

    /**
@@ -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();

    /**
@@ -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();

    /**