Loading services/autofill/java/com/android/server/autofill/AutofillInlineSuggestionsRequestSession.java +5 −5 Original line number Diff line number Diff line Loading @@ -212,12 +212,12 @@ final class AutofillInlineSuggestionsRequestSession { if (mDestroyed || mResponseCallback == null) { return; } if (!mImeInputViewStarted && mPreviousResponseIsNotEmpty) { // 1. if previous response is not empty, and IME just become invisible, then send // empty response to make sure existing responses don't stick around on the IME. if (!mImeInputStarted && mPreviousResponseIsNotEmpty) { // 1. if previous response is not empty, and IME is just disconnected from the view, // then send empty response to make sure existing responses don't stick around. // Although the inline suggestions should disappear when IME hides which removes them // from the view hierarchy, but we still send an empty response to be extra safe. // from the view hierarchy, but we still send an empty response to indicate that the // previous suggestions are invalid now. if (sVerbose) Slog.v(TAG, "Send empty inline response"); updateResponseToImeUncheckLocked(new InlineSuggestionsResponse(Collections.EMPTY_LIST)); mPreviousResponseIsNotEmpty = false; Loading services/autofill/java/com/android/server/autofill/Session.java +6 −2 Original line number Diff line number Diff line Loading @@ -2581,7 +2581,6 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState if (sVerbose) Slog.v(TAG, "Exiting view " + id); mUi.hideFillUi(this); hideAugmentedAutofillLocked(viewState); mInlineSessionController.hideInlineSuggestionsUiLocked(mCurrentViewId); mCurrentViewId = null; } break; Loading Loading @@ -2655,6 +2654,9 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState if (sVerbose) { Slog.v(TAG, "ignoring autofilled change on id " + id); } // TODO(b/156099633): remove this once framework gets out of business of resending // inline suggestions when IME visibility changes. mInlineSessionController.hideInlineSuggestionsUiLocked(viewState.id); viewState.resetState(ViewState.STATE_CHANGED); return; } else if ((viewState.id.equals(this.mCurrentViewId)) Loading Loading @@ -3348,7 +3350,9 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState if (generateEvent) { mService.logDatasetSelected(dataset.getId(), id, mClientState); } if (mCurrentViewId != null) { mInlineSessionController.hideInlineSuggestionsUiLocked(mCurrentViewId); } autoFillApp(dataset); return; } Loading services/autofill/java/com/android/server/autofill/ui/InlineSuggestionFactory.java +0 −2 Original line number Diff line number Diff line Loading @@ -57,7 +57,6 @@ final class InlineSuggestionFactory { @NonNull AutoFillUI.AutoFillUiCallback client, @NonNull Runnable onErrorCallback, @Nullable RemoteInlineSuggestionRenderService remoteRenderService) { final BiConsumer<Dataset, Integer> onClickFactory = (dataset, datasetIndex) -> { client.requestHideFillUi(autofillId); client.authenticate(response.getRequestId(), datasetIndex, response.getAuthentication(), response.getClientState(), /* authenticateInline= */ true); Loading Loading @@ -85,7 +84,6 @@ final class InlineSuggestionFactory { final Consumer<IntentSender> intentSenderConsumer = (intentSender) -> client.startIntentSender(intentSender, new Intent()); final BiConsumer<Dataset, Integer> onClickFactory = (dataset, datasetIndex) -> { client.requestHideFillUi(autofillId); client.fill(requestId, datasetIndex, dataset); }; Loading Loading
services/autofill/java/com/android/server/autofill/AutofillInlineSuggestionsRequestSession.java +5 −5 Original line number Diff line number Diff line Loading @@ -212,12 +212,12 @@ final class AutofillInlineSuggestionsRequestSession { if (mDestroyed || mResponseCallback == null) { return; } if (!mImeInputViewStarted && mPreviousResponseIsNotEmpty) { // 1. if previous response is not empty, and IME just become invisible, then send // empty response to make sure existing responses don't stick around on the IME. if (!mImeInputStarted && mPreviousResponseIsNotEmpty) { // 1. if previous response is not empty, and IME is just disconnected from the view, // then send empty response to make sure existing responses don't stick around. // Although the inline suggestions should disappear when IME hides which removes them // from the view hierarchy, but we still send an empty response to be extra safe. // from the view hierarchy, but we still send an empty response to indicate that the // previous suggestions are invalid now. if (sVerbose) Slog.v(TAG, "Send empty inline response"); updateResponseToImeUncheckLocked(new InlineSuggestionsResponse(Collections.EMPTY_LIST)); mPreviousResponseIsNotEmpty = false; Loading
services/autofill/java/com/android/server/autofill/Session.java +6 −2 Original line number Diff line number Diff line Loading @@ -2581,7 +2581,6 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState if (sVerbose) Slog.v(TAG, "Exiting view " + id); mUi.hideFillUi(this); hideAugmentedAutofillLocked(viewState); mInlineSessionController.hideInlineSuggestionsUiLocked(mCurrentViewId); mCurrentViewId = null; } break; Loading Loading @@ -2655,6 +2654,9 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState if (sVerbose) { Slog.v(TAG, "ignoring autofilled change on id " + id); } // TODO(b/156099633): remove this once framework gets out of business of resending // inline suggestions when IME visibility changes. mInlineSessionController.hideInlineSuggestionsUiLocked(viewState.id); viewState.resetState(ViewState.STATE_CHANGED); return; } else if ((viewState.id.equals(this.mCurrentViewId)) Loading Loading @@ -3348,7 +3350,9 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState if (generateEvent) { mService.logDatasetSelected(dataset.getId(), id, mClientState); } if (mCurrentViewId != null) { mInlineSessionController.hideInlineSuggestionsUiLocked(mCurrentViewId); } autoFillApp(dataset); return; } Loading
services/autofill/java/com/android/server/autofill/ui/InlineSuggestionFactory.java +0 −2 Original line number Diff line number Diff line Loading @@ -57,7 +57,6 @@ final class InlineSuggestionFactory { @NonNull AutoFillUI.AutoFillUiCallback client, @NonNull Runnable onErrorCallback, @Nullable RemoteInlineSuggestionRenderService remoteRenderService) { final BiConsumer<Dataset, Integer> onClickFactory = (dataset, datasetIndex) -> { client.requestHideFillUi(autofillId); client.authenticate(response.getRequestId(), datasetIndex, response.getAuthentication(), response.getClientState(), /* authenticateInline= */ true); Loading Loading @@ -85,7 +84,6 @@ final class InlineSuggestionFactory { final Consumer<IntentSender> intentSenderConsumer = (intentSender) -> client.startIntentSender(intentSender, new Intent()); final BiConsumer<Dataset, Integer> onClickFactory = (dataset, datasetIndex) -> { client.requestHideFillUi(autofillId); client.fill(requestId, datasetIndex, dataset); }; Loading