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

Commit 8d0d2363 authored by Yohei Yukawa's avatar Yohei Yukawa Committed by Android Git Automerger
Browse files

am acce1aa5: Make sure to obtain the IC before requesting CursorAnchorInfo

* commit 'acce1aa5':
  Make sure to obtain the IC before requesting CursorAnchorInfo
parents 68a2a69a acce1aa5
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -924,8 +924,14 @@ public final class RichInputConnection {
     */
    public boolean requestUpdateCursorAnchorInfo(final boolean enableMonitor,
            final boolean requestImmediateCallback) {
        final boolean scheduled = InputConnectionCompatUtils.requestUpdateCursorAnchorInfo(mIC,
        mIC = mParent.getCurrentInputConnection();
        final boolean scheduled;
        if (null != mIC) {
            scheduled = InputConnectionCompatUtils.requestUpdateCursorAnchorInfo(mIC,
                    enableMonitor, requestImmediateCallback);
        } else {
            scheduled = false;
        }
        mCursorAnchorInfoMonitorEnabled = (scheduled && enableMonitor);
        return scheduled;
    }