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

Commit 78c1643b authored by Mill Chen's avatar Mill Chen
Browse files

[Catalyst] Implement get{Read,Write}Permissions for Vibration & haptics

NO_IFTTT=Catalyst only

Fix: 385745664
Test: devtool
Flag: com.android.settings.flags.catalyst_vibration_intensity_screen
Change-Id: I5a6dad4570feb7d313c781ae8e57934ffe417a61
parent 0f1c0f3c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -48,9 +48,13 @@ class VibrationMainSwitchPreference :
    override fun storage(context: Context): KeyValueStore =
        VibrationMainSwitchToggleStorage(SettingsSystemStore.get(context))

    override fun getReadPermissions(context: Context) = SettingsSystemStore.getReadPermissions()

    override fun getReadPermit(context: Context, callingPid: Int, callingUid: Int) =
        ReadWritePermit.ALLOW

    override fun getWritePermissions(context: Context) = SettingsSystemStore.getWritePermissions()

    override fun getWritePermit(
        context: Context,
        value: Boolean?,