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

Commit 1620969a authored by Joanne Chung's avatar Joanne Chung
Browse files

Prevent showing FillUi multiple times if tapping on the same field.

Bug: 112772652
Test: atest CtsAutoFillServiceTestCases
Test: manual, make sure only show once when tapping in the same field
Change-Id: I3a02eb8abc3d88d9e9158489c753f5d62cfd0f71
parent 9d4f41f2
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2419,6 +2419,7 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
                    Slog.v(TAG, "entered on virtual child " + id + ": " + virtualBounds);
                }

                final boolean isSameViewEntered = Objects.equals(mCurrentViewId, viewState.id);
                // Update the view states first...
                mCurrentViewId = viewState.id;
                if (value != null) {
@@ -2451,6 +2452,10 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
                    hideAugmentedAutofillLocked(viewState);
                }

                if (isSameViewEntered) {
                    return;
                }

                // If the ViewState is ready to be displayed, onReady() will be called.
                viewState.update(value, virtualBounds, flags);
                break;