Put Android Core Apps under System apps
Bug: 269188405 Fix: 269188405 Test: manual Change-Id: Ie79cdb71c48661b6b1e90b8d0e7836269cf665e7
This commit is contained in:
@@ -88,7 +88,7 @@ public final class BatteryChartPreferenceControllerTest {
|
||||
Locale.setDefault(new Locale("en_US"));
|
||||
org.robolectric.shadows.ShadowSettings.set24HourTimeFormat(false);
|
||||
TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
|
||||
DataProcessor.sTestSystemAppsSet = Set.of();
|
||||
DataProcessor.sTestSystemAppsPackageNames = Set.of();
|
||||
mFeatureFactory = FakeFeatureFactory.setupForTest();
|
||||
mContext = spy(RuntimeEnvironment.application);
|
||||
doReturn(mContext).when(mContext).getApplicationContext();
|
||||
|
@@ -63,7 +63,7 @@ public class BatteryDiffDataTest {
|
||||
createBatteryDiffEntry(mContext, /*consumePower=*/ 0, /*isHidden=*/ true);
|
||||
|
||||
final boolean needsCombineInSystemApp = BatteryDiffData.needsCombineInSystemApp(
|
||||
hiddenDiffEntry, List.of(), Set.of());
|
||||
hiddenDiffEntry, List.of(), Set.of(), Set.of());
|
||||
|
||||
assertThat(needsCombineInSystemApp).isTrue();
|
||||
}
|
||||
@@ -77,7 +77,7 @@ public class BatteryDiffDataTest {
|
||||
mApplicationInfo.flags = ApplicationInfo.FLAG_SYSTEM;
|
||||
|
||||
final boolean needsCombineInSystemApp = BatteryDiffData.needsCombineInSystemApp(
|
||||
batteryDiffEntry, List.of(), Set.of(ConvertUtils.FAKE_PACKAGE_NAME));
|
||||
batteryDiffEntry, List.of(), Set.of(ConvertUtils.FAKE_PACKAGE_NAME), Set.of());
|
||||
|
||||
assertThat(needsCombineInSystemApp).isTrue();
|
||||
}
|
||||
@@ -91,7 +91,7 @@ public class BatteryDiffDataTest {
|
||||
mApplicationInfo.flags = 0;
|
||||
|
||||
final boolean needsCombineInSystemApp = BatteryDiffData.needsCombineInSystemApp(
|
||||
batteryDiffEntry, List.of(), Set.of());
|
||||
batteryDiffEntry, List.of(), Set.of(), Set.of());
|
||||
|
||||
assertThat(needsCombineInSystemApp).isFalse();
|
||||
}
|
||||
|
@@ -107,7 +107,7 @@ public final class BatteryUsageBreakdownControllerTest {
|
||||
mBatteryDiffEntry = spy(mBatteryDiffEntry);
|
||||
mBatteryUsageBreakdownController.mBatteryDiffData =
|
||||
new BatteryDiffData(mContext, Arrays.asList(mBatteryDiffEntry), Arrays.asList(),
|
||||
Set.of(), /* isAccumulated= */ false);
|
||||
Set.of(), Set.of(), /* isAccumulated= */ false);
|
||||
// Adds fake testing data.
|
||||
BatteryDiffEntry.sResourceCache.put(
|
||||
"fakeBatteryDiffEntryKey",
|
||||
|
@@ -93,7 +93,7 @@ public final class DataProcessorTest {
|
||||
mFeatureFactory = FakeFeatureFactory.setupForTest();
|
||||
mPowerUsageFeatureProvider = mFeatureFactory.powerUsageFeatureProvider;
|
||||
|
||||
DataProcessor.sTestSystemAppsSet = Set.of();
|
||||
DataProcessor.sTestSystemAppsPackageNames = Set.of();
|
||||
DataProcessor.sUsageStatsManager = mUsageStatsManager;
|
||||
doReturn(mIntent).when(mContext).registerReceiver(
|
||||
isA(BroadcastReceiver.class), isA(IntentFilter.class));
|
||||
|
Reference in New Issue
Block a user