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

Commit 60226001 authored by Jordan Jozwiak's avatar Jordan Jozwiak
Browse files

Show phone usage app op for microphone

Bug: 266955439
Test: Manual testing
Change-Id: I64a0bfaef42b5c1820625bafc8802ff9f25ae7ad
parent 3c4c6b8f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@ public class RecentAppOpsAccess {
    };
    private static final int[] MICROPHONE_OPS = new int[]{
            AppOpsManager.OP_RECORD_AUDIO,
            AppOpsManager.OP_PHONE_CALL_MICROPHONE,
    };
    private static final int[] CAMERA_OPS = new int[]{
            AppOpsManager.OP_CAMERA,
@@ -144,6 +145,11 @@ public class RecentAppOpsAccess {
            if (!showSystemApps) {
                for (int op : mOps) {
                    final String permission = AppOpsManager.opToPermission(op);
                    if (permission == null) {
                        // Some ops like OP_PHONE_CALL_MICROPHONE don't have corresponding
                        // permissions. No need to check in this case.
                        continue;
                    }
                    final int permissionFlags = mPackageManager.getPermissionFlags(permission,
                            packageName,
                            user);