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

Commit 1163d085 authored by Yohei Yukawa's avatar Yohei Yukawa Committed by Android (Google) Code Review
Browse files

Merge "Mechanical code clean-ups in MSG_UNBIND handler."

parents 55608e7a 678e38e2
Loading
Loading
Loading
Loading
+10 −22
Original line number Diff line number Diff line
@@ -443,30 +443,18 @@ public final class InputMethodManager {
                    if (DEBUG) {
                        Log.i(TAG, "handleMessage: MSG_UNBIND " + sequence);
                    }
                    boolean startInput = false;
                    final boolean startInput;
                    synchronized (mH) {
                        if (mBindSequence == sequence) {
                            if (false) {
                                // XXX the server has already unbound!
                                if (mCurMethod != null && mCurrentTextBoxAttribute != null) {
                                    try {
                                        mCurMethod.finishInput();
                                    } catch (RemoteException e) {
                                        Log.w(TAG, "IME died: " + mCurId, e);
                                    }
                                }
                        if (mBindSequence != sequence) {
                            return;
                        }
                        clearBindingLocked();
                            
                        // If we were actively using the last input method, then
                        // we would like to re-connect to the next input method.
                        if (mServedView != null && mServedView.isFocused()) {
                            mServedConnecting = true;
                        }
                            if (mActive) {
                                startInput = true;
                            }
                        }
                        startInput = mActive;
                    }
                    if (startInput) {
                        startInputInner(null, 0, 0, 0);