Merge "Change all the system items unclickable in battery usage list."
This commit is contained in:
committed by
Android (Google) Code Review
commit
3eabebb730
@@ -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