From 5c2f11d4ae183cdd3fa19a43b88bcbd9ec39abc1 Mon Sep 17 00:00:00 2001 From: Feng Cao Date: Tue, 2 Jun 2020 14:26:02 -0700 Subject: [PATCH] When starting new session, make autofill manager service to not clear inline suggestions * This is to handle the case where when coming back from the attribution dialog, the augmented autofill is retriggered which cause the old inline session with the IME to be destroyed and a new one created, in which case we used to send an empty response to IME to clear the suggestions. But this would cause flicker in the IME side, between the time when it's cleared and the new suggestions arrive. * It's safe to remove this becasue we now rely on the onStartInput (or onFinishInput) in the IME side to clear the suggestions anyways. Test: atest android.autofillservice.cts.inline Bug: 157515522 Change-Id: Ie7cb8b164b7f5352632ee509ea978a2d421f5e5b --- .../server/autofill/AutofillInlineSessionController.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/services/autofill/java/com/android/server/autofill/AutofillInlineSessionController.java b/services/autofill/java/com/android/server/autofill/AutofillInlineSessionController.java index e2330ca6ffe9f..0ec8654f2a204 100644 --- a/services/autofill/java/com/android/server/autofill/AutofillInlineSessionController.java +++ b/services/autofill/java/com/android/server/autofill/AutofillInlineSessionController.java @@ -75,9 +75,7 @@ final class AutofillInlineSessionController { @NonNull Consumer requestConsumer, @NonNull Bundle uiExtras) { // TODO(b/151123764): rename the method to better reflect what it does. if (mSession != null) { - // Send an empty response to IME and destroy the existing session. - mSession.onInlineSuggestionsResponseLocked( - InlineFillUi.emptyUi(mSession.getAutofillIdLocked())); + // Destroy the existing session. mSession.destroySessionLocked(); mInlineFillUi = null; }