updateSetting

abstract fun updateSetting(key: AASettingKey, enabled: Boolean)

Updates a single setting value and persists it to shared preferences.

This is called when the user toggles a setting on the Android Auto settings screen. The change is immediately written to the phone app's shared preferences system, ensuring that the phone app and Android Auto stay in sync.

Parameters

key

The AASettingKey identifying which setting to update

enabled

The new toggle value (true = enabled, false = disabled)

See also