Scroll capture search: reject covered scroll containers

This change ensures Views are visited in drawing order, respecting
custom drawing order and View z-values. Then, when selecting the best
target, any scrolling view is rejected if any other scrolling view
is drawn over it.

This handles the case where a slightly smaller scroll container is
created atop a larger one, such as when user navigation creates a
new set of interface which is added to the top of the window, leaving
the previous UI in place below.

Bug: 365969802
Bug: 189827634
Fix: 365969802
Test: atest ScrollCaptureSearchResultsTest ViewGroupScrollCaptureTest
Flag: android.view.flags.scroll_capture_target_z_order_fix
Change-Id: I2341266a63d46c0bd68bb5325449bc06681816e0
5 files changed