Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 95497baf authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix the inverted logic to judge whether an app is system app."

parents 8b91e2b2 814eff1c
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -1826,8 +1826,7 @@ public final class DataProcessor {
        if (appEntry == null || appEntry.info == null) {
        if (appEntry == null || appEntry.info == null) {
            return false;
            return false;
        }
        }
        return !ApplicationsState.FILTER_DOWNLOADED_AND_LAUNCHER_AND_INSTANT.filterApp(
        return ApplicationsState.FILTER_DOWNLOADED_AND_LAUNCHER_AND_INSTANT.filterApp(appEntry);
                appEntry);
    }
    }


    private static boolean shouldShowBatteryAttributionList(final Context context) {
    private static boolean shouldShowBatteryAttributionList(final Context context) {
+3 −2
Original line number Original line Diff line number Diff line
@@ -1660,7 +1660,8 @@ public final class DataProcessorTest {
                batteryHistEntry);
                batteryHistEntry);
        doReturn(mAppEntry).when(mApplicationsState).getEntry(anyString(), anyInt());
        doReturn(mAppEntry).when(mApplicationsState).getEntry(anyString(), anyInt());
        mAppEntry.info = mApplicationInfo;
        mAppEntry.info = mApplicationInfo;
        mApplicationInfo.flags = ApplicationInfo.FLAG_SYSTEM;
        mApplicationInfo.flags =
                ApplicationInfo.FLAG_SYSTEM | ApplicationInfo.FLAG_UPDATED_SYSTEM_APP;


        boolean needsCombineInSystemApp = DataProcessor.needsCombineInSystemApp(
        boolean needsCombineInSystemApp = DataProcessor.needsCombineInSystemApp(
                batteryDiffEntry, List.of(), mApplicationsState);
                batteryDiffEntry, List.of(), mApplicationsState);
@@ -1690,7 +1691,7 @@ public final class DataProcessorTest {
                batteryHistEntry);
                batteryHistEntry);
        doReturn(mAppEntry).when(mApplicationsState).getEntry(anyString(), anyInt());
        doReturn(mAppEntry).when(mApplicationsState).getEntry(anyString(), anyInt());
        mAppEntry.info = mApplicationInfo;
        mAppEntry.info = mApplicationInfo;
        mApplicationInfo.flags = 0;
        mApplicationInfo.flags = ApplicationInfo.FLAG_SYSTEM;


        boolean needsCombineInSystemApp = DataProcessor.needsCombineInSystemApp(
        boolean needsCombineInSystemApp = DataProcessor.needsCombineInSystemApp(
                batteryDiffEntry, List.of(), mApplicationsState);
                batteryDiffEntry, List.of(), mApplicationsState);