Skip to content
Commit dcf8a9c0 authored by Mateusz Cicheński's avatar Mateusz Cicheński
Browse files

Don't add a dismiss target to WM if we're not in PiP.

This prevents adding dismiss-overlay window even when user never had
entered PiP mode. (e.g. booting a device)

Otherwise we re-add the same dismiss target in onConfigurationChange and
it doesn't get removed properly in onOverlayChanged that calls init().

That in turn is caused because the same View is being added twice, and
the corresponding AttachInfo is not set properly the second time, which
prevents the removal logic in init() from working correctly. It is not
set properly because the ViewRootImpl traversal didn't have a chance
to set the mAttachInfo in the first traversal, when the onOverlayChanged gets called.

Test: atest WMShellFlickerTests
Bug: 258120818

Change-Id: I9bca4d179aabe6f95d0416cd457d4707b25e113c
parent e51346d9
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