AppInfo from Notifications for secondary users
Required wiring up startActivitiesAsUser()
Bug: 7224950
Also fix a bug in navigateUp in secondary user
Change-Id: I114ae2de0457362d62e899fdb94b12239a3eb778
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index a21f6d5..c49959d 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -2623,10 +2623,13 @@
}
public final int startActivities(IApplicationThread caller,
- Intent[] intents, String[] resolvedTypes, IBinder resultTo, Bundle options) {
+ Intent[] intents, String[] resolvedTypes, IBinder resultTo, Bundle options,
+ int userId) {
enforceNotIsolatedCaller("startActivities");
+ userId = handleIncomingUserLocked(Binder.getCallingPid(), Binder.getCallingUid(), userId,
+ false, true, "startActivity", null);
int ret = mMainStack.startActivities(caller, -1, intents, resolvedTypes, resultTo,
- options, UserHandle.getCallingUserId());
+ options, userId);
return ret;
}
@@ -12434,7 +12437,7 @@
} else {
try {
ActivityInfo aInfo = AppGlobals.getPackageManager().getActivityInfo(
- destIntent.getComponent(), 0, UserHandle.getCallingUserId());
+ destIntent.getComponent(), 0, srec.userId);
int res = mMainStack.startActivityLocked(srec.app.thread, destIntent,
null, aInfo, parent.appToken, null,
0, -1, parent.launchedFromUid, 0, null, true, null);