Revamp the battery usage details page.
This cl adds AdvancedPowerUsageDetail to show the usage details page. The AdvancedPowerUsageDetail contains all the needed ui components: 1. App Header 2. Two buttons 3. Usage breakdown preference category 4. Power management preference category This cl also adds preference controller for two buttons but the detail implementation will be added in the following cl. Following cl will also remove previous detail page. Bug: 35810915 Test: RunSettingsRoboTests Change-Id: I17f95d1288762094671c0f148fa73367e51f175e
This commit is contained in:
@@ -67,31 +67,6 @@ public final class InstalledAppDetailsTest {
|
||||
mAppDetail = new InstalledAppDetails();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getInstallationStatus_notInstalled_shouldReturnUninstalled() {
|
||||
|
||||
assertThat(mAppDetail.getInstallationStatus(new ApplicationInfo()))
|
||||
.isEqualTo(R.string.not_installed);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getInstallationStatus_enabled_shouldReturnInstalled() {
|
||||
final ApplicationInfo info = new ApplicationInfo();
|
||||
info.flags = ApplicationInfo.FLAG_INSTALLED;
|
||||
info.enabled = true;
|
||||
|
||||
assertThat(mAppDetail.getInstallationStatus(info)).isEqualTo(R.string.installed);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getInstallationStatus_disabled_shouldReturnDisabled() {
|
||||
final ApplicationInfo info = new ApplicationInfo();
|
||||
info.flags = ApplicationInfo.FLAG_INSTALLED;
|
||||
info.enabled = false;
|
||||
|
||||
assertThat(mAppDetail.getInstallationStatus(info)).isEqualTo(R.string.disabled);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldShowUninstallForAll_installForOneOtherUserOnly_shouldReturnTrue() {
|
||||
when(mDevicePolicyManager.packageHasActiveAdmins(anyString())).thenReturn(false);
|
||||
|
Reference in New Issue
Block a user