Use isAggregatedVisible for pane events

When the pane title changes, the view may not be actually visible on screen.
Check parent visibility before sending a pane event.

Bug: 133131221
Test: manual check to ensure we don't receive title event, atest AccessibilityPaneTest
Change-Id: I8bad8f742cc3e8f4d906c2b6fe80a3516c900ef1
This commit is contained in:
Sally
2022-02-14 22:42:33 +00:00
committed by Sally Yuen
parent 769b3a4328
commit 33e714af1c

View File

@@ -14173,7 +14173,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
&& isAccessibilityPane()) {
// If the pane isn't visible, content changed events are sufficient unless we're
// reporting that the view just disappeared
if ((getVisibility() == VISIBLE)
if ((isAggregatedVisible())
|| (changeType == AccessibilityEvent.CONTENT_CHANGE_TYPE_PANE_DISAPPEARED)) {
final AccessibilityEvent event = AccessibilityEvent.obtain();
onInitializeAccessibilityEvent(event);