fix(android): keep popup windows above the active window in snapshots
Summary
A popup that does not take focus, such as an AutoCompleteTextView dropdown or a Compose ExposedDropdownMenu with a PrimaryEditable anchor, is missing from Android snapshots. Its items are on screen and in --raw, but snapshot omits them and press fails with Selector did not match.
Android lists the popup as a TYPE_APPLICATION window at layer 1, neither active nor focused, above the activity at layer 0. collectInactiveApplicationWindows (#628, moved in #1865) hides every application window that is not active or focused, popup included.
Inactive application windows above the top foreground application layer are now kept. Windows at or below it are still hidden, so the stale drawer and navigation case from #628 is unchanged.
2 files.
Validation
Base e560224bd, head 0ff1f150e.
- The new
android-ui-hierarchytest fails on base and passes on head. - Live, API 37 emulator, helper built from source:
AutoCompleteTextView: items missing on base; listed and pressable on head.- Compose
PrimaryEditablemenu:presson an item fails on base and works on head. APrimaryNotEditablemenu still works.
pnpm check:affected --run --head 0ff1f150epassed (exactCommit=true).- Device lanes and coverage run in CI.
- Not covered live: the stale drawer case from #628.