Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e3dbcdb authored by Amanda Lin Dietz's avatar Amanda Lin Dietz
Browse files

[A11y Focus API] Add null AttachInfo check in View#onFocusChanged

* Add null check to fix the flagged logic that is preventing flag
advancement in ag/33178285.

Flag: android.view.accessibility.request_rectangle_with_source
Bug: 391877896
Test: Manually confirmed fix for AccessibilityWindowReportingTest#testGetAnchorForDropDownForAutoCompleteTextView_returnsTextViewNode
Change-Id: I2253bc657e6cf0e766d9dea6b79715a2885e335c
parent 6da6b524
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -8857,12 +8857,14 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
            }
            if (android.view.accessibility.Flags.requestRectangleWithSource()) {
                if (mAttachInfo != null) {
                    final Rect r = mAttachInfo.mTmpInvalRect;
                    getLocalVisibleRect(r);
                    requestRectangleOnScreen(r, false,
                            RECTANGLE_ON_SCREEN_REQUEST_SOURCE_INPUT_FOCUS);
                }
            }
        }
        invalidate(true);
        ListenerInfo li = mListenerInfo;