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

Commit 9cfe9123 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Limit Activity taskAffinity to application uid"

parents 18281269 f365d3a8
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -1520,7 +1520,13 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        hasBeenLaunched = false;
        mStackSupervisor = supervisor;

        taskAffinity = aInfo.taskAffinity;
        // b/35954083: Limit task affinity to uid to avoid various issues associated with sharing
        // affinity across uids.
        final String uid = Integer.toString(info.applicationInfo.uid);
        if (info.taskAffinity != null && !info.taskAffinity.startsWith(uid)) {
            info.taskAffinity = uid + ":" + info.taskAffinity;
        }
        taskAffinity = info.taskAffinity;
        stateNotNeeded = (aInfo.flags & FLAG_STATE_NOT_NEEDED) != 0;
        nonLocalizedLabel = aInfo.nonLocalizedLabel;
        labelRes = aInfo.labelRes;