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

Commit e283b644 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Allow disojoint datasets for inline suggestions." into rvc-dev am: 28a5ed1c am: bac4652e

Change-Id: I5f7b4b7acc659d58e083fedeb6a1f6f257dbd643
parents 66a2356e bac4652e
Loading
Loading
Loading
Loading
+21 −13
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ import android.view.autofill.AutofillManager;
import android.view.autofill.AutofillValue;
import android.view.autofill.IAutoFillManagerClient;
import android.view.inputmethod.InlineSuggestionsRequest;
import android.view.inputmethod.InlineSuggestionsResponse;

import com.android.internal.infra.AbstractRemoteService;
import com.android.internal.infra.AndroidFuture;
@@ -243,8 +244,7 @@ final class RemoteAugmentedAutofillService
        }
        mCallbacks.setLastResponse(sessionId);

        try {
            inlineSuggestionsCallback.onInlineSuggestionsResponse(
        final InlineSuggestionsResponse inlineSuggestionsResponse =
                InlineSuggestionFactory.createAugmentedInlineSuggestionsResponse(
                        request, inlineSuggestionsData, focusedId, mContext,
                        dataset -> {
@@ -256,7 +256,15 @@ final class RemoteAugmentedAutofillService
                            } catch (RemoteException e) {
                                Slog.w(TAG, "Encounter exception autofilling the values");
                            }
                            }, onErrorCallback, remoteRenderService));
                        }, onErrorCallback, remoteRenderService);

        if (inlineSuggestionsResponse == null) {
            Slog.w(TAG, "InlineSuggestionFactory created null response");
            return;
        }

        try {
            inlineSuggestionsCallback.onInlineSuggestionsResponse(inlineSuggestionsResponse);
        } catch (RemoteException e) {
            Slog.w(TAG, "Exception sending inline suggestions response back to IME.");
        }
+6 −0
Original line number Diff line number Diff line
@@ -2686,6 +2686,12 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
                                requestHideFillUi(mCurrentViewId);
                            }
                        }, mService.getRemoteInlineSuggestionRenderServiceLocked());

        if (inlineSuggestionsResponse == null) {
            Slog.w(TAG, "InlineSuggestionFactory created null response");
            return false;
        }

        try {
            imeResponse.getCallback().onInlineSuggestionsResponse(inlineSuggestionsResponse);
        } catch (RemoteException e) {
+2 −2
Original line number Diff line number Diff line
@@ -150,13 +150,13 @@ public final class InlineSuggestionFactory {
            final int fieldIndex = dataset.getFieldIds().indexOf(autofillId);
            if (fieldIndex < 0) {
                Slog.w(TAG, "AutofillId=" + autofillId + " not found in dataset");
                return null;
                continue;
            }
            final InlinePresentation inlinePresentation = dataset.getFieldInlinePresentation(
                    fieldIndex);
            if (inlinePresentation == null) {
                Slog.w(TAG, "InlinePresentation not found in dataset");
                return null;
                continue;
            }
            if (!includeDataset(dataset, fieldIndex, filterText)) {
                continue;