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

Commit 0e0c2043 authored by Svetoslav Ganov's avatar Svetoslav Ganov Committed by Android (Google) Code Review
Browse files

Merge "Crash observed when attempted to uncheck the Accessibility option."

parents 77dd02df ce5ee2dc
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
@@ -4637,13 +4637,18 @@ public final class ViewAncestor extends Handler implements ViewParent,

        public void run() {
            if (mView != null) {
                // Check again for accessibility state since this is executed delayed.
                AccessibilityManager accessibilityManager =
                    AccessibilityManager.getInstance(mView.mContext);
                if (accessibilityManager.isEnabled()) {
                    // Send the event directly since we do not want to append the
                    // source text because this is the text for the entire window
                    // and we just want to notify that the content has changed.
                    AccessibilityEvent event = AccessibilityEvent.obtain(
                            AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED);
                    mView.onInitializeAccessibilityEvent(event);
                AccessibilityManager.getInstance(mView.mContext).sendAccessibilityEvent(event);
                    accessibilityManager.sendAccessibilityEvent(event);
                }
                mIsPending = false;
            }
        }