Do not move PopupWindow when its anchor is detached
The current PopupWindow implementation might call
the anchor view's getLocationInWindow even if the anchor
is currently detached from the window (and the location is
a meaningless (0,0)). This results in the popup jumping to
the top of the screen.
This patch is adding tracking of the anchor's attachment state.
The position is never updated while the anchor is detached.
When the anchor is re-attached, the popup position is updated.
Bug: 34853580
Test: manual (see bug)
Change-Id: Icca1b9b558a70ee3edbe6236e076d2d08a1f8f11
1 file changed