Skip to content
Snippets Groups Projects
Commit acce1aa5 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Make sure to obtain the IC before requesting CursorAnchorInfo

RichInputConnection#requestUpdateCursorAnchorInfo must make
sure to obtain the input connection before calling methods
of it.

BUG: 17299587
Change-Id: I8e0cd473a4cc32583cd47634c227d702f7c69c6c
parent 37beaf15
No related branches found
No related tags found
No related merge requests found
...@@ -924,8 +924,14 @@ public final class RichInputConnection { ...@@ -924,8 +924,14 @@ public final class RichInputConnection {
*/ */
public boolean requestUpdateCursorAnchorInfo(final boolean enableMonitor, public boolean requestUpdateCursorAnchorInfo(final boolean enableMonitor,
final boolean requestImmediateCallback) { final boolean requestImmediateCallback) {
final boolean scheduled = InputConnectionCompatUtils.requestUpdateCursorAnchorInfo(mIC, mIC = mParent.getCurrentInputConnection();
enableMonitor, requestImmediateCallback); final boolean scheduled;
if (null != mIC) {
scheduled = InputConnectionCompatUtils.requestUpdateCursorAnchorInfo(mIC,
enableMonitor, requestImmediateCallback);
} else {
scheduled = false;
}
mCursorAnchorInfoMonitorEnabled = (scheduled && enableMonitor); mCursorAnchorInfoMonitorEnabled = (scheduled && enableMonitor);
return scheduled; return scheduled;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment