Should not show internal package entry in the usage list
Bug: 187770266 Test: make SettingsRoboTests Change-Id: I56897c8f91295ba2139b7fda8c59a863130ecd86
This commit is contained in:
@@ -581,6 +581,33 @@ public final class BatteryChartPreferenceControllerTest {
|
||||
assertThat(mBatteryChartPreferenceController.mIsExpanded).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIsValidToShowSummary_returnExpectedResult() {
|
||||
assertThat(mBatteryChartPreferenceController
|
||||
.isValidToShowSummary("com.google.android.apps.scone"))
|
||||
.isTrue();
|
||||
|
||||
// Verifies the item which is defined in the array list.
|
||||
assertThat(mBatteryChartPreferenceController
|
||||
.isValidToShowSummary("com.google.android.googlequicksearchbox"))
|
||||
.isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIsValidToShowEntry_returnExpectedResult() {
|
||||
assertThat(mBatteryChartPreferenceController
|
||||
.isValidToShowEntry("com.google.android.apps.scone"))
|
||||
.isTrue();
|
||||
|
||||
// Verifies the items which are defined in the array list.
|
||||
assertThat(mBatteryChartPreferenceController
|
||||
.isValidToShowEntry("com.google.android.gms.persistent"))
|
||||
.isFalse();
|
||||
assertThat(mBatteryChartPreferenceController
|
||||
.isValidToShowEntry("dex2oat64"))
|
||||
.isFalse();
|
||||
}
|
||||
|
||||
private static Map<Long, Map<String, BatteryHistEntry>> createBatteryHistoryMap() {
|
||||
final Map<Long, Map<String, BatteryHistEntry>> batteryHistoryMap = new HashMap<>();
|
||||
for (int index = 0; index < DESIRED_HISTORY_SIZE; index++) {
|
||||
|
Reference in New Issue
Block a user