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

Commit 10dac4f9 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Fix augmented autofill to not send multiple request on the same field"...

Merge "Fix augmented autofill to not send multiple request on the same field" into rvc-dev am: 10017115

Change-Id: I1973ed460728f64d879fa5a9e39c93c36ef65b58
parents cad8c2e5 10017115
Loading
Loading
Loading
Loading
+18 −12
Original line number Original line Diff line number Diff line
@@ -2459,19 +2459,25 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
                    return;
                    return;
                }
                }


                if (!isSameViewEntered
                if ((flags & FLAG_MANUAL_REQUEST) == 0) {
                        && (flags & FLAG_MANUAL_REQUEST) == 0
                    // Not a manual request
                        && mAugmentedAutofillableIds != null
                    if (mAugmentedAutofillableIds != null && mAugmentedAutofillableIds.contains(
                        && mAugmentedAutofillableIds.contains(id)) {
                            id)) {
                    // View was already reported when server could not handle a response, but it
                        // Regular autofill handled the view and returned null response, but it
                        // triggered augmented autofill
                        // triggered augmented autofill

                        if (!isSameViewEntered) {
                    if (sDebug) Slog.d(TAG, "updateLocked(" + id + "): augmented-autofillable");
                            if (sDebug) Slog.d(TAG, "trigger augmented autofill.");

                    // ...then trigger the augmented autofill UI
                            triggerAugmentedAutofillLocked();
                            triggerAugmentedAutofillLocked();
                        } else {
                            if (sDebug) Slog.d(TAG, "skip augmented autofill for same view.");
                        }
                        return;
                    } else if (mForAugmentedAutofillOnly && isSameViewEntered) {
                        // Regular autofill is disabled.
                        if (sDebug) Slog.d(TAG, "skip augmented autofill for same view.");
                        return;
                        return;
                    }
                    }
                }


                if (requestNewFillResponseOnViewEnteredIfNecessaryLocked(id, viewState, flags)) {
                if (requestNewFillResponseOnViewEnteredIfNecessaryLocked(id, viewState, flags)) {
                    return;
                    return;