Add BatterySaver as SettingSlice

Convert BatterySaverController to TogglePrefController.
This was the first MasterSwitchController, so we needed
to add the preference case to updateState.

Test: Robotests
Change-Id: I32f3dee0b183807c66c19513b8b064af8f369c2a
Fixes: 67996992
This commit is contained in:
Matthew Fritze
2018-02-20 18:27:26 -08:00
parent 956dd9451b
commit e8854ec33d
6 changed files with 44 additions and 36 deletions

View File

@@ -53,7 +53,7 @@ public class BatterySaverControllerTest {
public void setUp() {
MockitoAnnotations.initMocks(this);
mBatterySaverController = spy(new BatterySaverController(mContext, mLifecycle));
mBatterySaverController = spy(new BatterySaverController(mContext));
ReflectionHelpers.setField(mBatterySaverController, "mPowerManager", mPowerManager);
ReflectionHelpers.setField(mBatterySaverController, "mBatterySaverPref", mBatterySaverPref);
doNothing().when(mBatterySaverController).refreshConditionManager();