Merge "[Catalyst] Support Getter API for settings service" into main

This commit is contained in:
Jacky Wang
2024-11-17 05:53:58 +00:00
committed by Android (Google) Code Review
10 changed files with 40 additions and 0 deletions

View File

@@ -64,6 +64,9 @@ class AutoBrightnessScreen :
override fun storage(context: Context): KeyValueStore =
AutoBrightnessDataStore(SettingsSystemStore.get(context))
override fun getReadPermit(context: Context, myUid: Int, callingUid: Int) =
ReadWritePermit.ALLOW
override fun getWritePermit(context: Context, value: Boolean?, myUid: Int, callingUid: Int) =
ReadWritePermit.ALLOW

View File

@@ -48,6 +48,9 @@ class BatteryPercentageSwitchPreference :
com.android.internal.R.bool.config_battery_percentage_setting_available
)
override fun getReadPermit(context: Context, myUid: Int, callingUid: Int) =
ReadWritePermit.ALLOW
override fun getWritePermit(context: Context, value: Boolean?, myUid: Int, callingUid: Int) =
ReadWritePermit.ALLOW

View File

@@ -49,6 +49,9 @@ class PeakRefreshRateSwitchPreference :
override fun storage(context: Context): KeyValueStore =
PeakRefreshRateStore(context, SettingsSystemStore.get(context))
override fun getReadPermit(context: Context, myUid: Int, callingUid: Int) =
ReadWritePermit.ALLOW
override fun getWritePermit(context: Context, value: Boolean?, myUid: Int, callingUid: Int) =
ReadWritePermit.ALLOW

View File

@@ -70,6 +70,9 @@ class DarkModeScreen :
override val keywords: Int
get() = R.string.keywords_dark_ui_mode
override fun getReadPermit(context: Context, myUid: Int, callingUid: Int) =
ReadWritePermit.ALLOW
override fun getWritePermit(context: Context, value: Boolean?, myUid: Int, callingUid: Int) =
ReadWritePermit.ALLOW