summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Todd Kennedy <toddke@google.com> 2017-04-19 14:00:48 -0700
committer Todd Kennedy <toddke@google.com> 2017-04-19 14:00:48 -0700
commit7bed530d27c8bdda09535a57b68d33e79fb7b633 (patch)
treec101b25383f5dc749f894bb36df2143bcb70a586
parent3a8d8db6ad5ec53be18bd550bbb2a2940c84e1f0 (diff)
don't blindly reuse content providers
when a provider is already running, we would automatically give it out to other processes that request it. for instant apps, don't do that. Change-Id: I159913adc599e88dac6253104776589592b251fd Fixes: 37501319 Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.EphemeralTest
-rw-r--r--services/core/java/com/android/server/am/ActivityManagerService.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 8f1afa87b6a6..e3f4370951ea 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -11252,6 +11252,10 @@ public class ActivityManagerService extends IActivityManager.Stub
holder.provider = null;
return holder;
}
+ // Don't expose instant app providers
+ if (cpr.appInfo.isInstantApp()) {
+ return null;
+ }
final long origId = Binder.clearCallingIdentity();