OSDN Git Service

RESTRICT AUTOMERGE Create separated tasks for different apps from startActivities
authorRiddle Hsu <riddlehsu@google.com>
Sat, 22 Feb 2020 15:20:41 +0000 (23:20 +0800)
committersyphyr <syphyr@gmail.com>
Wed, 6 May 2020 22:52:27 +0000 (00:52 +0200)
commitdb8d9ce65e236bcfb420b28dc0ad505da1c990d5
tree96c6c9270b415c91dfd5a91bad19892345817e40
parentc90263e2da63ff13f016c3f48626bd9557ab912d
RESTRICT AUTOMERGE Create separated tasks for different apps from startActivities

Assume there are 2 applications A, B with different uids.
There are 4 activities A1, A2, B1, B2 with default task
affinity and launch mode.

After A1 called startActivities(B1, A2, B2):
 Original   : Task(A1, B1, A2, B2)
 This Change: Task(A1, B1), Task(A2, B2)
In other words, the source caller cannot launch its activity
above the activity of other application in the same task, and
it can still launch activity of other application in its task.

Bug: 145669109
Test: run cts --test android.server.cts.StartActivityTests \
      -m CtsServicesHostTestCases

[basilgello: Back-ported to 14.1:
 - Added definition for ActivityRecord.getUid() from
   fwb/82ea6cb9de38fd20ebcddfd84f0132908beeeab1]
Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
Change-Id: I97bd875146a52f62b8fe82235487ccefb2955e8e
(cherry picked from commit 2be3ba49733df585bcfbf63d3b299d15dbfb0f13)
services/core/java/com/android/server/am/ActivityRecord.java
services/core/java/com/android/server/am/ActivityStarter.java