Merge "Allowing system uid to embed Task on secondary user" into sc-v2-dev
This commit is contained in:
@@ -501,6 +501,8 @@ public class ActivityStartController {
|
||||
int startActivityInTaskFragment(@NonNull TaskFragment taskFragment,
|
||||
@NonNull Intent activityIntent, @Nullable Bundle activityOptions,
|
||||
@Nullable IBinder resultTo) {
|
||||
final ActivityRecord caller =
|
||||
resultTo != null ? ActivityRecord.forTokenLocked(resultTo) : null;
|
||||
return obtainStarter(activityIntent, "startActivityInTaskFragment")
|
||||
.setActivityOptions(activityOptions)
|
||||
.setInTaskFragment(taskFragment)
|
||||
@@ -508,6 +510,7 @@ public class ActivityStartController {
|
||||
.setRequestCode(-1)
|
||||
.setCallingUid(Binder.getCallingUid())
|
||||
.setCallingPid(Binder.getCallingPid())
|
||||
.setUserId(caller != null ? caller.mUserId : mService.getCurrentUserId())
|
||||
.execute();
|
||||
}
|
||||
|
||||
|
||||
@@ -1979,7 +1979,7 @@ class ActivityStarter {
|
||||
|
||||
// Allowing the embedding if the task is owned by system.
|
||||
final int hostUid = hostTask.effectiveUid;
|
||||
if (hostUid == Process.SYSTEM_UID) {
|
||||
if (UserHandle.getAppId(hostUid) == Process.SYSTEM_UID) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user