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

Commit ad5545d3 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Disable inline suggestions for afservice when talkback is enabled."...

Merge "Disable inline suggestions for afservice when talkback is enabled." into sc-dev am: fda724a5

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15401901

Change-Id: I696274f2f8e74dc21e814c0b0089a22238a9756a
parents 6bc441cc fda724a5
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -96,6 +96,7 @@ import android.util.Slog;
import android.util.SparseArray;
import android.util.TimeUtils;
import android.view.KeyEvent;
import android.view.accessibility.AccessibilityManager;
import android.view.autofill.AutofillId;
import android.view.autofill.AutofillManager;
import android.view.autofill.AutofillManager.SmartSuggestionMode;
@@ -346,6 +347,8 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
     */
    private final AssistDataReceiverImpl mAssistReceiver = new AssistDataReceiverImpl();

    private final AccessibilityManager mAccessibilityManager;

    void onSwitchInputMethodLocked() {
        // One caveat is that for the case where the focus is on a field for which regular autofill
        // returns null, and augmented autofill is triggered,  and then the user switches the input
@@ -458,10 +461,15 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
                    return;
                }

                // If a11y touch exploration is enabled, then we do not send an inline fill request
                // to the regular af service, because dropdown UI is easier to use.
                if (!mAccessibilityManager.isTouchExplorationEnabled()) {
                    mPendingFillRequest = new FillRequest(mPendingFillRequest.getId(),
                        mPendingFillRequest.getFillContexts(), mPendingFillRequest.getClientState(),
                            mPendingFillRequest.getFillContexts(),
                            mPendingFillRequest.getClientState(),
                            mPendingFillRequest.getFlags(), mPendingInlineSuggestionsRequest);
                }
            }

            mRemoteFillService.onFillRequest(mPendingFillRequest);
            mPendingInlineSuggestionsRequest = null;
@@ -889,6 +897,7 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
        mRemoteFillService = serviceComponentName == null ? null
                : new RemoteFillService(context, serviceComponentName, userId, this,
                        bindInstantServiceAllowed);
        mAccessibilityManager = AccessibilityManager.getInstance(context);
        mActivityToken = activityToken;
        mHasCallback = hasCallback;
        mUiLatencyHistory = uiLatencyHistory;