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

Commit 5c2f11d4 authored by Feng Cao's avatar Feng Cao
Browse files

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
parent faee762b
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -75,9 +75,7 @@ final class AutofillInlineSessionController {
            @NonNull Consumer<InlineSuggestionsRequest> 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;
        }