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

Commit 8333cfec authored by Phil Weaver's avatar Phil Weaver Committed by Android (Google) Code Review
Browse files

Merge "Clean up UiAutomation working alongside a11y."

parents 9aef86f3 846522ce
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -1842,14 +1842,11 @@ public class Instrumentation {
     * @see UiAutomation
     */
    public UiAutomation getUiAutomation() {
        if (mUiAutomationConnection != null) {
            if (mUiAutomation == null) {
        if ((mUiAutomation == null) || (mUiAutomation.isDestroyed())) {
            return getUiAutomation(0);
        }
        return mUiAutomation;
    }
        return null;
    }

    /**
     * Gets the {@link UiAutomation} instance with flags set.
+1 −2
Original line number Diff line number Diff line
@@ -52,7 +52,6 @@ import android.net.Uri;
import android.os.Binder;
import android.os.Build;
import android.os.Bundle;
import android.os.Debug;
import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
@@ -650,7 +649,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {
            userState.mUiAutomationFlags = flags;
            userState.mIsAccessibilityEnabled = true;
            userState.mInstalledServices.add(accessibilityServiceInfo);
            if (userState.isUiAutomationSuppressingOtherServices()) {
            if ((flags & UiAutomation.FLAG_DONT_SUPPRESS_ACCESSIBILITY_SERVICES) == 0) {
                // Set the temporary state.
                userState.mIsTouchExplorationEnabled = false;
                userState.mIsEnhancedWebAccessibilityEnabled = false;