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

Commit ed67bdd2 authored by Nate Myren's avatar Nate Myren
Browse files

Added if DEBUG_PERMISSIONS statement to "Un-granting permission" log in PermissionManagerServices

Fixes: 131721301

Test: change the DEBUG_PERMISSIONS static field to true, then install an
apk via ADB. Check logcat to verify the log is present. Then set
DEBUG_PERMISSIONS to false, install another apk, and verify the logs are
not present
Change-Id: I5752ca736ca2465fa26d860d4f3aae0d6e985e01
parent 29ef1aea
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -1294,11 +1294,13 @@ public class PermissionManagerService {
                        permissionsState.updatePermissionFlags(bp, UserHandle.USER_ALL,
                                MASK_PERMISSION_FLAGS_ALL, 0);
                        changedInstallPermission = true;
                        if (DEBUG_PERMISSIONS) {
                            Slog.i(TAG, "Un-granting permission " + perm
                                    + " from package " + pkg.packageName
                                    + " (protectionLevel=" + bp.getProtectionLevel()
                                    + " flags=0x" + Integer.toHexString(pkg.applicationInfo.flags)
                                    + ")");
                        }
                    } else if (bp.isAppOp()) {
                        // Don't print warning for app op permissions, since it is fine for them
                        // not to be granted, there is a UI for the user to decide.