Merge "SurfaceView: Fix null check on RemoteAccessibilityController"

This commit is contained in:
Rob Carr
2020-10-19 17:40:55 +00:00
committed by Android (Google) Code Review

View File

@@ -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;
}