Add optional logging to investigate URI grants.

am: c0ee776046

Change-Id: I7bb10edfbf117f021d0714e023ba6cd54853f4d6
This commit is contained in:
Jeff Sharkey
2016-09-13 17:37:05 +00:00
committed by android-build-merger

View File

@@ -19,6 +19,7 @@ package com.android.server.am;
import android.content.Intent;
import android.os.UserHandle;
import android.util.ArraySet;
import android.util.Log;
import android.util.Slog;
import com.android.server.am.ActivityManagerService.GrantUri;
@@ -93,7 +94,16 @@ final class UriPermission {
}
private void updateModeFlags() {
final int oldModeFlags = modeFlags;
modeFlags = ownedModeFlags | globalModeFlags | persistableModeFlags | persistedModeFlags;
if (Log.isLoggable(TAG, Log.VERBOSE) && (modeFlags != oldModeFlags)) {
Slog.d(TAG,
"Permission for " + targetPkg + " to " + uri + " is changing from 0x"
+ Integer.toHexString(oldModeFlags) + " to 0x"
+ Integer.toHexString(modeFlags),
new Throwable());
}
}
/**