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

Commit 0e7899c1 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Simplify MSG_SET_ACTIVE handler"

parents 73186bfa a9625d3b
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
@@ -1117,15 +1117,20 @@ public final class InputMethodManager {
                        // Check focus again in case that "onWindowFocus" is called before
                        // handling this message.
                        final View servedView = getServedViewLocked();
                        if (servedView != null && canStartInput(servedView)) {
                            if (mCurRootView != null && mCurRootView.getImeFocusController()
                                    .checkFocus(mRestartOnNextWindowFocus, false)) {
                        if (servedView == null || !canStartInput(servedView)) {
                            return;
                        }
                        if (mCurRootView == null) {
                            return;
                        }
                        if (!mCurRootView.getImeFocusController().checkFocus(
                                mRestartOnNextWindowFocus, false)) {
                            return;
                        }
                        final int reason = active ? StartInputReason.ACTIVATED_BY_IMMS
                                : StartInputReason.DEACTIVATED_BY_IMMS;
                        startInputOnWindowFocusGainInternal(reason, null, 0, 0, 0);
                    }
                        }
                    }
                    return;
                }
                case MSG_SET_INTERACTIVE: {