OSDN Git Service

Check component before notifying activity is visible.
authorBryce Lee <brycelee@google.com>
Tue, 4 Apr 2017 21:32:48 +0000 (14:32 -0700)
committerBryce Lee <brycelee@google.com>
Thu, 6 Apr 2017 17:11:58 +0000 (10:11 -0700)
commit4a19438955ab123a2b0862783fd35b8700b06eef
tree4f3b7b0934ae198eb1800f1f2208c9e251eb6fa8
parent154836844d280ebfeb8ae81eb650083dce6e4a7c
Check component before notifying activity is visible.

ActivityStackSupervisor tracks WaitResults which are waiting for an
Activity to become visible. This is used exclusively by
ActivityStarter to wait for an Activity to be brought to the
foreground before returning. However, there are some cases where
other Activities will report a visible state in between. Without a
qualifier, these would cause the ActivityStarter's WaitResult to be
fulfilled and the wrong information would be returned.

This changelist specifies a component the WaitResult should be
triggered on.

Change-Id: I7c356a8d153ddc24603acc55749e9992f9000c3f
Fixes: 36860122
Test: cts-tradefed run cts -m CtsServicesHostTestCases -t  android.server.cts.ActivityManagerAmStartOptionsTests#testDashW_Direct
core/java/android/app/WaitResult.java
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