diff options
| author | 2019-12-11 19:43:15 +0800 | |
|---|---|---|
| committer | 2019-12-24 03:03:34 +0000 | |
| commit | 4123afaf16c107de3a257a20bce73a8b103e8f7c (patch) | |
| tree | bb1ea530c76a84288248354d23b17a40371f9229 | |
| parent | c2517eeebadc08de9c2d1680eb6d9fd7b4ed29de (diff) | |
Fixes sending multiple fill requests to the augmented service
Tapping on the same input field multiple times should only send one fill
request to the augmented service.
Bug: 145949573
Test: atest CtsAutoFillServiceTestCases
Change-Id: If07d64bd937b9e3a020135b58654dff9c2a21db1
| -rw-r--r-- | services/autofill/java/com/android/server/autofill/Session.java | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/services/autofill/java/com/android/server/autofill/Session.java b/services/autofill/java/com/android/server/autofill/Session.java index 67bcccd1d7de..5af43994775a 100644 --- a/services/autofill/java/com/android/server/autofill/Session.java +++ b/services/autofill/java/com/android/server/autofill/Session.java @@ -2563,7 +2563,9 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState return; } - if ((flags & FLAG_MANUAL_REQUEST) == 0 && mAugmentedAutofillableIds != null + if (!isSameViewEntered + && (flags & FLAG_MANUAL_REQUEST) == 0 + && mAugmentedAutofillableIds != null && mAugmentedAutofillableIds.contains(id)) { // View was already reported when server could not handle a response, but it // triggered augmented autofill @@ -2577,13 +2579,6 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState requestNewFillResponseOnViewEnteredIfNecessaryLocked(id, viewState, flags); - // Remove the UI if the ViewState has changed. - if (!Objects.equals(mCurrentViewId, viewState.id)) { - mUi.hideFillUi(this); - mCurrentViewId = viewState.id; - hideAugmentedAutofillLocked(viewState); - } - if (isSameViewEntered) { return; } |