[Catalyst] Simplify KeyValueStore API calls
NO_IFTTT=Catalyst only Bug: 325144964 Flag: com.android.settings.flags.catalyst Test: atest Change-Id: I518b9c861eac6d515dfc7f0ac2d028f9395e06a1
This commit is contained in:
@@ -75,18 +75,14 @@ class BatterySaverPreferenceTest {
|
||||
|
||||
@Test
|
||||
fun storeSetOn_setPowerSaveMode() {
|
||||
batterySaverPreference
|
||||
.storage(context)
|
||||
.setValue(batterySaverPreference.key, Boolean::class.javaObjectType, true)
|
||||
batterySaverPreference.storage(context).setBoolean(batterySaverPreference.key, true)
|
||||
|
||||
verify(powerManager).setPowerSaveModeEnabled(true)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun storeSetOff_unsetPowerSaveMode() {
|
||||
batterySaverPreference
|
||||
.storage(context)
|
||||
.setValue(batterySaverPreference.key, Boolean::class.javaObjectType, false)
|
||||
batterySaverPreference.storage(context).setBoolean(batterySaverPreference.key, false)
|
||||
|
||||
verify(powerManager).setPowerSaveModeEnabled(false)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user