summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--services/core/java/com/android/server/am/ActivityStackSupervisor.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
index 7a3b712..48ac172 100644
--- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
@@ -959,8 +959,12 @@ public final class ActivityStackSupervisor implements DisplayListener {
try {
//TODO: This needs to be a flushed out API in the future.
- if (intent.getComponent() != null && AppGlobals.getPackageManager()
- .isComponentProtected(callingPackage, intent.getComponent(), userId)) {
+ boolean isProtected = intent.getComponent() != null
+ && AppGlobals.getPackageManager()
+ .isComponentProtected(callingPackage, intent.getComponent(), userId) &&
+ (intent.getFlags()&Intent.FLAG_GRANT_READ_URI_PERMISSION) == 0;
+
+ if (isProtected) {
Message msg = mService.mHandler.obtainMessage(
ActivityManagerService.POST_COMPONENT_PROTECTED_MSG);
//Store start flags, userid