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

Commit 8a1c56ac authored by Taran Singh's avatar Taran Singh Committed by Android (Google) Code Review
Browse files

Merge "Fix order of binding result when using zeroJankProxy" into main

parents b9b1de53 eb0db5b0
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -2327,10 +2327,12 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
            @NonNull InputMethodBindingController bindingController, @NonNull ClientState cs) {
        if (bindingController.hasMainConnection()) {
            if (getCurMethodLocked() != null) {
                if (!Flags.useZeroJankProxy()) {
                    // Return to client, and we will get back with it when
                    // we have had a session made for it.
                    requestClientSessionLocked(cs);
                    requestClientSessionForAccessibilityLocked(cs);
                }
                return new InputBindResult(
                        InputBindResult.ResultCode.SUCCESS_WAITING_IME_SESSION,
                        null, null, null,
+11 −0
Original line number Diff line number Diff line
@@ -248,6 +248,17 @@ final class ZeroJankProxy implements IInputMethodManagerImpl.Callback {
                    unverifiedTargetSdkVersion,
                    userId, imeDispatcher);
            sendOnStartInputResult(client, result, startInputSeq);
            // For first-time client bind, MSG_BIND should arrive after MSG_START_INPUT_RESULT.
            if (result.result == InputBindResult.ResultCode.SUCCESS_WAITING_IME_SESSION) {
                InputMethodManagerService imms = ((InputMethodManagerService) mInner);
                synchronized (ImfLock.class) {
                    ClientState cs = imms.getClientStateLocked(client);
                    if (cs != null) {
                        imms.requestClientSessionLocked(cs);
                        imms.requestClientSessionForAccessibilityLocked(cs);
                    }
                }
            }
        });
    }