Make sure checking for accessibility pane is consistent

The documentation states " Setting to null indicates that this View is
not a pane." So make this behave consistently in that way..

Test: it builds!
Change-Id: Ied03a313b1fa1e26393f1497d63658acf6e297f4
This commit is contained in:
Qasid Sadiq
2018-07-02 12:46:14 -07:00
parent 24158ba81b
commit c7f8833c4a

View File

@@ -7547,7 +7547,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
*/
public void onPopulateAccessibilityEventInternal(AccessibilityEvent event) {
if ((event.getEventType() == AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED)
&& !TextUtils.isEmpty(getAccessibilityPaneTitle())) {
&& isAccessibilityPane()) {
event.getText().add(getAccessibilityPaneTitle());
}
}
@@ -12963,7 +12963,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
}
}
}
if (!TextUtils.isEmpty(getAccessibilityPaneTitle())) {
if (isAccessibilityPane()) {
if (isVisible != oldVisible) {
notifyViewAccessibilityStateChangedIfNeeded(isVisible
? AccessibilityEvent.CONTENT_CHANGE_TYPE_PANE_APPEARED