summaryrefslogtreecommitdiffstats
path: root/core/java/android/app/Instrumentation.java
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2014-10-14 10:48:18 -0700
committerJeff Sharkey <jsharkey@android.com>2014-10-14 17:57:28 -0700
commit9797880808320e3a7bae1f59bc7e0c5a13189e5f (patch)
treeb8e469a4be51241d1740f316faa616ed939c6247 /core/java/android/app/Instrumentation.java
parentdc876b56217c588596661ca514b4bdb8a6cfe843 (diff)
downloadframeworks_base-9797880808320e3a7bae1f59bc7e0c5a13189e5f.zip
frameworks_base-9797880808320e3a7bae1f59bc7e0c5a13189e5f.tar.gz
frameworks_base-9797880808320e3a7bae1f59bc7e0c5a13189e5f.tar.bz2
Start cross profile intents as caller.
The system should always be using new startActivityAsCaller() when starting activities on behalf of someone else, to ensure that security checks are enforced as the original caller. Bug: 17983737 Change-Id: Ic40816a797cfdb13c0adb48b86ed4ed7d6aae8eb
Diffstat (limited to 'core/java/android/app/Instrumentation.java')
-rw-r--r--core/java/android/app/Instrumentation.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/app/Instrumentation.java b/core/java/android/app/Instrumentation.java
index ba3a234..60a013e 100644
--- a/core/java/android/app/Instrumentation.java
+++ b/core/java/android/app/Instrumentation.java
@@ -1671,7 +1671,7 @@ public class Instrumentation {
*/
public ActivityResult execStartActivityAsCaller(
Context who, IBinder contextThread, IBinder token, Activity target,
- Intent intent, int requestCode, Bundle options) {
+ Intent intent, int requestCode, Bundle options, int userId) {
IApplicationThread whoThread = (IApplicationThread) contextThread;
if (mActivityMonitors != null) {
synchronized (mSync) {
@@ -1695,7 +1695,7 @@ public class Instrumentation {
.startActivityAsCaller(whoThread, who.getBasePackageName(), intent,
intent.resolveTypeIfNeeded(who.getContentResolver()),
token, target != null ? target.mEmbeddedID : null,
- requestCode, 0, null, options);
+ requestCode, 0, null, options, userId);
checkStartActivityResult(result, intent);
} catch (RemoteException e) {
}