Change all the system items unclickable in battery usage list.
Bug: 264643763 Fix: 264643763 Test: manual Change-Id: I5854f9517bfb308142cc5f3c5e5cd8f54a237d59
This commit is contained in:
@@ -272,8 +272,8 @@ public class BatteryDiffEntry {
|
||||
|
||||
@VisibleForTesting
|
||||
void updateRestrictionFlagState() {
|
||||
mValidForRestriction = true;
|
||||
if (!mBatteryHistEntry.isAppEntry()) {
|
||||
mValidForRestriction = false;
|
||||
return;
|
||||
}
|
||||
final boolean isValidPackage =
|
||||
|
@@ -168,8 +168,8 @@ public final class BatteryDiffEntryTest {
|
||||
assertThat(nameAndIcon.mName).isEqualTo(expectedName);
|
||||
assertThat(nameAndIcon.mIconId).isEqualTo(R.drawable.ic_settings_aod);
|
||||
// Verifies the restrictable flag in the cache.
|
||||
assertThat(entry.mValidForRestriction).isTrue();
|
||||
assertThat(BatteryDiffEntry.sValidForRestriction.get(entry.getKey())).isTrue();
|
||||
assertThat(entry.mValidForRestriction).isFalse();
|
||||
assertThat(BatteryDiffEntry.sValidForRestriction.get(entry.getKey())).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -194,8 +194,8 @@ public final class BatteryDiffEntryTest {
|
||||
assertThat(nameAndIcon.mName).isEqualTo(expectedName);
|
||||
assertThat(nameAndIcon.mIconId).isEqualTo(0);
|
||||
// Verifies the restrictable flag in the cache.
|
||||
assertThat(entry.mValidForRestriction).isTrue();
|
||||
assertThat(BatteryDiffEntry.sValidForRestriction.get(entry.getKey())).isTrue();
|
||||
assertThat(entry.mValidForRestriction).isFalse();
|
||||
assertThat(BatteryDiffEntry.sValidForRestriction.get(entry.getKey())).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user