diff options
author | Kazuki Takise <takise@google.com> | 2018-08-08 14:44:15 +0900 |
---|---|---|
committer | Kazuki Takise <takise@google.com> | 2018-08-16 18:14:26 +0900 |
commit | 9a0be7278a391e16117c966e45cc9018180749bc (patch) | |
tree | a574c626a67441ab37a91afab3d6e434317de32c /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | 5e92684e16aebdec1bd2ec2925522aa6e1294ac3 (diff) |
Resolve race condition in TaskStackChangedListenerTest
This CL makes sure that the start-up process of an activity has
completed and ActivityStack#mResumedActivity is set as the activity
before removing the activity in TaskStackChangedListenerTest.
Otherwise, onTaskRemovalStarted, which is a callback expected to be
called in TaskStackChangedListenerTest is not called because of the
following logic in ActivityStack#finishActivityLocked().
if (mResumedActivity == r) {
mService.getTaskChangeNotificationController().notifyTaskRemovalStarted(task.taskId);
}
Currently, whether mResumeActivity is set before removing the
activity is not guaranteed, which causes flakiness in some
environments such as ARC. (it's 50/50 whether it's set properly or
not. ) This CL guarantees this and make the tests pass all the time.
Bug: 110908055
Test: atest TaskStackChangedListenerTest
Change-Id: Ieb9f2ffe40de4e79ef2bf43c4036625ce0b63304
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions