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

Commit 8669c669 authored by Feng Cao's avatar Feng Cao Committed by Android (Google) Code Review
Browse files

Merge "Make InputMethodService to never reuse the inline suggestion response callback."

parents ea9617d5 ec3f84a8
Loading
Loading
Loading
Loading
+5 −10
Original line number Diff line number Diff line
@@ -450,9 +450,6 @@ public class InputMethodService extends AbstractInputMethodService {
    @Nullable
    private InlineSuggestionsRequestInfo mInlineSuggestionsRequestInfo = null;

    @Nullable
    private InlineSuggestionsResponseCallbackImpl mInlineSuggestionsResponseCallback = null;

    private final Handler mHandler = new Handler(Looper.getMainLooper(), null, true);

    final ViewTreeObserver.OnComputeInternalInsetsListener mInsetsComputer = info -> {
@@ -752,14 +749,12 @@ public class InputMethodService extends AbstractInputMethodService {
                Log.w(TAG, "onCreateInlineSuggestionsRequest() returned null request");
                requestCallback.onInlineSuggestionsUnsupported();
            } else {
                if (mInlineSuggestionsResponseCallback == null) {
                    mInlineSuggestionsResponseCallback =
                final IInlineSuggestionsResponseCallback inlineSuggestionsResponseCallback =
                        new InlineSuggestionsResponseCallbackImpl(this,
                                mInlineSuggestionsRequestInfo.mComponentName,
                                mInlineSuggestionsRequestInfo.mFocusedId);
                }
                requestCallback.onInlineSuggestionsRequest(request,
                        mInlineSuggestionsResponseCallback);
                        inlineSuggestionsResponseCallback);
            }
        } catch (RemoteException e) {
            Log.w(TAG, "makeInlinedSuggestionsRequest() remote exception:" + e);