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

Fix high flakiness of InsetsPolicyTest

The spy() will return a different instance. The caller who
doesn't use the instance will only update its own fields.

The test app window was default non-focusable set up by test.
So it was no problem before the change [1], that there will be
no candidate window in updateSystemBarAttributes.

Now updateSystemBarAttributes will choose the app window and
then updateBarControlTarget(). That causes abortTransient()
because focus change. And the focus change is because the
policy.updateBarControlTarget updated to a different instance
of InsetsPolicy#mFocusedWin.

[1] I957e1eddcfa3f7b873f7a9b32eeaf69db5927b00

Bug: 254268165
Test: atest InsetsPolicyTest
Change-Id: I21eb14313cc848894b6be3aafc4965a42c10ae0d
parent b29e4dc3
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