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: I8e0cd473a4cc32583cd47634c227d702f7c69c6cmain
parent
37beaf1529
commit
acce1aa59e
|
@ -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();
|
||||||
|
final boolean scheduled;
|
||||||
|
if (null != mIC) {
|
||||||
|
scheduled = InputConnectionCompatUtils.requestUpdateCursorAnchorInfo(mIC,
|
||||||
enableMonitor, requestImmediateCallback);
|
enableMonitor, requestImmediateCallback);
|
||||||
|
} else {
|
||||||
|
scheduled = false;
|
||||||
|
}
|
||||||
mCursorAnchorInfoMonitorEnabled = (scheduled && enableMonitor);
|
mCursorAnchorInfoMonitorEnabled = (scheduled && enableMonitor);
|
||||||
return scheduled;
|
return scheduled;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue