Revert "Add PowerSaveWhitelistExceptIdle as Optimizted modes condition"

This reverts commit 3f7839cad0.

Reason for revert: This fix will cause a side effect which makes app switch state from Unrestricted to Optimize then it will lock at Optimize mode only, will prepare other cl to fix the previous issue

Change-Id: Ic5232eb0099fa1591f15e72747eca4d08b9af9b9
This commit is contained in:
Wesley Wang
2021-10-14 09:31:13 +00:00
parent 3f7839cad0
commit b900e0e43b
10 changed files with 5 additions and 76 deletions

View File

@@ -93,16 +93,6 @@ public class OptimizedPreferenceControllerTest {
assertThat(mPreference.isChecked()).isFalse();
}
@Test
public void testUpdateState_isAllowlistedExceptIdleApp_prefEnabled() {
when(mockBatteryOptimizeUtils.isAllowlistedExceptIdleApp()).thenReturn(true);
mController.updateState(mPreference);
assertThat(mPreference.isEnabled()).isTrue();
assertThat(mPreference.isChecked()).isTrue();
}
@Test
public void testHandlePreferenceTreeClick_samePrefKey_verifyAction() {
mPreference.setKey(mController.KEY_OPTIMIZED_PREF);