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
This commit is contained in:
Joanne Chung
2019-06-20 17:49:18 +08:00
parent 9d4f41f27c
commit 1620969a62

View File

@@ -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;