Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c912bccc authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Fix flakiness of testTaskChangeCallBacks

1. The test asserts that there will be onDetachedFromWindow. But if
   finishAndRemoveTask is called too early before the window is
   attached, there won't be the callback. So make sure that
   onAttachedToWindow is called before triggering the removal.
2. The task removal callback may come from previous test. So only
   count down the latch for removal if the incoming task id is the
   one created by the current test method.

Also
 - Create virtual display only if needed.
 - Replace deprecated callback of TaskStackListener.

Fixes: 212682767
Test: atest TaskStackChangedListenerTest#testTaskChangeCallBacks
Change-Id: Idcfcef3b2a5162cc6b5496ff0a448f8399984dbe
parent d29ddfd1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment