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

Commit 69062200 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Log calling UID/PID when UriPermissions change.

Helps debug who is requesting the change.

Bug: 62432749
Test: adb shell setprop log.tag.UriPermission VERBOSE
Change-Id: I3c721cc4fe07141117346ef519f18a63c5398bda
parent 487893da
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.server.am;

import android.content.Intent;
import android.os.Binder;
import android.os.UserHandle;
import android.util.ArraySet;
import android.util.Log;
@@ -101,7 +102,8 @@ final class UriPermission {
            Slog.d(TAG,
                    "Permission for " + targetPkg + " to " + uri + " is changing from 0x"
                            + Integer.toHexString(oldModeFlags) + " to 0x"
                            + Integer.toHexString(modeFlags),
                            + Integer.toHexString(modeFlags) + " via calling UID "
                            + Binder.getCallingUid() + " PID " + Binder.getCallingPid(),
                    new Throwable());
        }
    }