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

Commit c2304701 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Make sure user context map is ArrayMap, not Map" into sc-dev am: a33bbd1f

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13419467

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2e0f3045a62b40e66b2a605946d917a5d8ca0651
parents f9c76048 a33bbd1f
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -88,10 +88,8 @@ public class PermissionUsageHelper {
    private static final long DEFAULT_RECENT_TIME_MS = 30000L;

    private static boolean shouldShowIndicators() {
        return true;
        // TODO ntmyren: remove true set when device config is configured correctly
        //DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_PRIVACY,
        //PROPERTY_CAMERA_MIC_ICONS_ENABLED, true);
        return DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_PRIVACY,
                PROPERTY_CAMERA_MIC_ICONS_ENABLED, true);
    }

    private static boolean shouldShowLocationIndicator() {
@@ -142,7 +140,7 @@ public class PermissionUsageHelper {
    }

    private Context mContext;
    private Map<UserHandle, Context> mUserContexts;
    private ArrayMap<UserHandle, Context> mUserContexts;
    private PackageManager mPkgManager;
    private AppOpsManager mAppOpsManager;

@@ -154,7 +152,8 @@ public class PermissionUsageHelper {
        mContext = context;
        mPkgManager = context.getPackageManager();
        mAppOpsManager = context.getSystemService(AppOpsManager.class);
        mUserContexts = Map.of(Process.myUserHandle(), mContext);
        mUserContexts = new ArrayMap<>();
        mUserContexts.put(Process.myUserHandle(), mContext);
    }

    private Context getUserContext(UserHandle user) {