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

Commit 007d440a authored by Daniel Norman's avatar Daniel Norman Committed by Android (Google) Code Review
Browse files

Merge "Fix NPE in UiAutomationManager" into main

parents 6b448786 8570c5a1
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -272,8 +272,10 @@ class UiAutomationManager {
            mMainHandler.post(() -> {
                try {
                    final IAccessibilityServiceClient serviceInterface;
                    final UiAutomationService uiAutomationService;
                    synchronized (mLock) {
                        serviceInterface = mServiceInterface;
                        uiAutomationService = mUiAutomationService;
                        if (serviceInterface == null) {
                            mService = null;
                        } else {
@@ -283,8 +285,8 @@ class UiAutomationManager {
                    }
                    // If the serviceInterface is null, the UiAutomation has been shut down on
                    // another thread.
                    if (serviceInterface != null) {
                        mUiAutomationService.addWindowTokensForAllDisplays();
                    if (serviceInterface != null && uiAutomationService != null) {
                        uiAutomationService.addWindowTokensForAllDisplays();
                        if (mTrace.isA11yTracingEnabledForTypes(
                                AccessibilityTrace.FLAGS_ACCESSIBILITY_SERVICE_CLIENT)) {
                            mTrace.logTrace("UiAutomationService.connectServiceUnknownThread",