OSDN Git Service

Unblock 'am start -W' if activity is brought to front without launching
authorChong Zhang <chz@google.com>
Tue, 21 Jun 2016 23:31:37 +0000 (16:31 -0700)
committerChong Zhang <chz@google.com>
Wed, 22 Jun 2016 02:44:09 +0000 (19:44 -0700)
commit5022da313f6b2fbd16e55ebabaadbb308e96e908
treeb12e3d20394e7c63939ae7037258ce331cd16bc5
parentc211539769dfaa507cfaf7dc22e9feb56065018c
Unblock 'am start -W' if activity is brought to front without launching

If -W is used to start an activity successfully, but this activity just
brings another activity to front without actual launching, the waiting
will be stuck because neither activity will report launch complete.

In this case, we have to treat it as if the -W started an activity and
received return code START_TASK_TO_FRONT. It needs to wait for the new
activity to become visible (or report launch complete if it's already
visible).

This reverts earlier commits afb776d5447e19565c9a826a554911decb9ed92a,
since it's causing problems with launch time reporting.

bug: 28333487
bug: 29451567
Change-Id: I9fd79ab5b3ed8f9de5df34ed9c7b0be3a94620b2
services/core/java/com/android/server/am/ActivityRecord.java
services/core/java/com/android/server/am/ActivityStack.java
services/core/java/com/android/server/am/ActivityStackSupervisor.java
services/core/java/com/android/server/am/ActivityStarter.java
services/core/java/com/android/server/am/TaskRecord.java