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

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

Merge "Create copy of op list, return empty if indicators disabled"

parents 9f053e5f 07678180
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -153,11 +153,13 @@ public class PermissionUsageHelper {
     * @see PermissionManager.getIndicatorAppOpUsageData
     */
    public List<PermGroupUsage> getOpUsageData(boolean isMicMuted) {
        List<PermGroupUsage> usages = new ArrayList<>();

        if (!shouldShowIndicators()) {
            return null;
            return usages;
        }

        List<String> ops = CAMERA_OPS;
        List<String> ops = new ArrayList<>(CAMERA_OPS);
        if (shouldShowLocationIndicator()) {
            ops.addAll(LOCATION_OPS);
        }
@@ -169,7 +171,6 @@ public class PermissionUsageHelper {
        Map<PackageAttribution, CharSequence> packagesWithAttributionLabels =
                getTrustedAttributions(rawUsages.get(MICROPHONE));

        List<PermGroupUsage> usages = new ArrayList<>();
        List<String> usedPermGroups = new ArrayList<>(rawUsages.keySet());
        for (int permGroupNum = 0; permGroupNum < usedPermGroups.size(); permGroupNum++) {
            boolean isPhone = false;