OSDN Git Service

Do not set activity's task before clearing in some scenarios.
authorBryce Lee <brycelee@google.com>
Mon, 26 Mar 2018 23:03:47 +0000 (16:03 -0700)
committerBryce Lee <brycelee@google.com>
Mon, 2 Apr 2018 20:24:27 +0000 (13:24 -0700)
commitf65ee7e9e33a0f652832a4d56f2e3757cf477644
tree7d33bbeab1c9d80e03166893594f852f50833678
parent7790a2f2d1b5d7bd25b182fd58047a2a2bda5caf
Do not set activity's task before clearing in some scenarios.

When the clear top and reset task launch flags are specified for a
standard launch mode activity, we should not add the activity to the
task before taking these actions. Doing so leads to the potential of
prematurely ending the starting activity and reparenting the activity
without a window container controller set.

This changelist ensures that the task is not associated until later.

Fixes: 70635977
Test: atest CtsActivityManagerDeviceTestCases:ActivityStarterTests
Change-Id: I8e2245f9ad9f07e259b099daefe9ebb2170ae28d
services/core/java/com/android/server/am/ActivityStarter.java