Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b701b08 authored by Louis Chang's avatar Louis Chang Committed by Android (Google) Code Review
Browse files

Merge "Allowing system uid to embed Task on secondary user" into sc-v2-dev

parents 275b1136 5c313cb3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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();
    }

+1 −1
Original line number Diff line number Diff line
@@ -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;
        }