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

Commit 0d587ee6 authored by Robert Carr's avatar Robert Carr
Browse files

SurfaceView: Fix null check on RemoteAccessibilityController

ImporantForAccessibility can be called from the View constructor
in which case we may not have initialized RemoteAccessibilityController
yet.

Bug: 171015133
Test: Existing tests pass. Repro from bug.
Change-Id: Iedc29a9d4270ebe600648d6ce5e17c864a662396
parent 4c361bbb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1849,7 +1849,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall
        // If developers explicitly set the important mode for it, don't change the mode.
        // Only change the mode to important when this SurfaceView isn't explicitly set and has
        // an embedded hierarchy.
        if (!mRemoteAccessibilityController.connected()
        if ((mRemoteAccessibilityController!= null && !mRemoteAccessibilityController.connected())
                || mode != IMPORTANT_FOR_ACCESSIBILITY_AUTO) {
            return mode;
        }