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

Commit a36c709a authored by Louis Chang's avatar Louis Chang Committed by Automerger Merge Worker
Browse files

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

Merge "Allowing system uid to embed Task on secondary user" into sc-v2-dev am: 8b701b08 am: 05e51e69

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16003535

Change-Id: I56e78185e8bfffd57ea6a982cde01364e6a43df9
parents 9640b7d7 05e51e69
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
@@ -2013,7 +2013,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;
        }