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
|
@VisibleForTesting
|
||||||
void updateRestrictionFlagState() {
|
void updateRestrictionFlagState() {
|
||||||
mValidForRestriction = true;
|
|
||||||
if (!mBatteryHistEntry.isAppEntry()) {
|
if (!mBatteryHistEntry.isAppEntry()) {
|
||||||
|
mValidForRestriction = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final boolean isValidPackage =
|
final boolean isValidPackage =
|
||||||
|
|||||||
@@ -168,8 +168,8 @@ public final class BatteryDiffEntryTest {
|
|||||||
assertThat(nameAndIcon.mName).isEqualTo(expectedName);
|
assertThat(nameAndIcon.mName).isEqualTo(expectedName);
|
||||||
assertThat(nameAndIcon.mIconId).isEqualTo(R.drawable.ic_settings_aod);
|
assertThat(nameAndIcon.mIconId).isEqualTo(R.drawable.ic_settings_aod);
|
||||||
// Verifies the restrictable flag in the cache.
|
// Verifies the restrictable flag in the cache.
|
||||||
assertThat(entry.mValidForRestriction).isTrue();
|
assertThat(entry.mValidForRestriction).isFalse();
|
||||||
assertThat(BatteryDiffEntry.sValidForRestriction.get(entry.getKey())).isTrue();
|
assertThat(BatteryDiffEntry.sValidForRestriction.get(entry.getKey())).isFalse();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -194,8 +194,8 @@ public final class BatteryDiffEntryTest {
|
|||||||
assertThat(nameAndIcon.mName).isEqualTo(expectedName);
|
assertThat(nameAndIcon.mName).isEqualTo(expectedName);
|
||||||
assertThat(nameAndIcon.mIconId).isEqualTo(0);
|
assertThat(nameAndIcon.mIconId).isEqualTo(0);
|
||||||
// Verifies the restrictable flag in the cache.
|
// Verifies the restrictable flag in the cache.
|
||||||
assertThat(entry.mValidForRestriction).isTrue();
|
assertThat(entry.mValidForRestriction).isFalse();
|
||||||
assertThat(BatteryDiffEntry.sValidForRestriction.get(entry.getKey())).isTrue();
|
assertThat(BatteryDiffEntry.sValidForRestriction.get(entry.getKey())).isFalse();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user