Support special tethering and removed apps UID in the usage list
There is a special UID for network data tethering usage, we will handle it in a special case to avoid the current rule considering it as an invalid UID case without showing in the usage list. We will disable the click behavior to protect the optimization mode page first. Bug: 227395125 Test: make RunSettingsRoboTests -j56 ROBOTEST_FILTER="com.android.settings.fuelgauge" Change-Id: I8d96473d382ebc3253748cce8345d6f2261a233d
This commit is contained in:
@@ -357,6 +357,24 @@ public final class BatteryDiffEntryTest {
|
||||
assertThat(entry.isSystemEntry()).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIsSystemEntry_uidBatteryWithTetheringProcess_returnTrue() {
|
||||
final BatteryDiffEntry entry =
|
||||
createBatteryDiffEntry(
|
||||
ConvertUtils.CONSUMER_TYPE_UID_BATTERY,
|
||||
/*uid=*/ BatteryUtils.UID_TETHERING, /*isHidden=*/ false);
|
||||
assertThat(entry.isSystemEntry()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIsSystemEntry_uidBatteryWithRemovedAppsProcess_returnTrue() {
|
||||
final BatteryDiffEntry entry =
|
||||
createBatteryDiffEntry(
|
||||
ConvertUtils.CONSUMER_TYPE_UID_BATTERY,
|
||||
/*uid=*/ BatteryUtils.UID_REMOVED_APPS, /*isHidden=*/ false);
|
||||
assertThat(entry.isSystemEntry()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUpdateRestrictionFlagState_updateFlagAsExpected() throws Exception {
|
||||
final String expectedAppLabel = "fake app label";
|
||||
|
Reference in New Issue
Block a user