Remove toggles in battery settings.

In Android P, we only show "Battery saver" and "Power management"
in battery settings. So we need to remove other preferences.

Keep "Battery percentage" toggle for now because it is not
cross-listed in other places.

Bug: 71502850
Test: Screenshot
Change-Id: Ia3c919f61239ff71f9343f2bce961aa4b89533c0
This commit is contained in:
jackqdyulei
2018-01-02 10:44:48 -08:00
parent ce3633be80
commit 5c56588d59
3 changed files with 16 additions and 63 deletions

View File

@@ -400,18 +400,6 @@ public class PowerUsageSummaryLegacyTest {
assertThat(percent).isWithin(PRECISION).of(POWER_USAGE_PERCENTAGE);
}
@Test
public void testNonIndexableKeys_MatchPreferenceKeys() {
final Context context = RuntimeEnvironment.application;
final List<String> niks = PowerUsageSummary.SEARCH_INDEX_DATA_PROVIDER
.getNonIndexableKeys(context);
final List<String> keys = XmlTestUtils.getKeysFromPreferenceXml(context,
R.xml.power_usage_summary);
assertThat(keys).containsAllIn(niks);
}
@Test
public void testPreferenceControllers_getPreferenceKeys_existInPreferenceScreen() {
final Context context = RuntimeEnvironment.application;