Android showStatusIcon on inactive InputConnection异常

时间:2015-01-31 19:27:39   收藏:0   阅读:11479

在开发的时候突然发现在输入文本框中点击输入法的删除按钮,发现app莫名其妙退出 了。log信息如下:

01-31 16:57:59.524: W/IInputConnectionWrapper(1259): clearMetaKeyStates on inactive InputConnection
01-31 16:57:59.624: W/IInputConnectionWrapper(1259): clearMetaKeyStates on inactive InputConnection
01-31 16:57:59.624: W/IInputConnectionWrapper(1259): beginBatchEdit on inactive InputConnection
01-31 16:57:59.624: W/IInputConnectionWrapper(1259): getTextBeforeCursor on inactive InputConnection
01-31 16:57:59.624: W/IInputConnectionWrapper(1259): endBatchEdit on inactive InputConnection
01-31 16:57:59.624: W/IInputConnectionWrapper(1259): sendKeyEvent on inactive InputConnection
01-31 16:57:59.624: W/IInputConnectionWrapper(1259): sendKeyEvent on inactive InputConnection
01-31 16:57:59.624: W/IInputConnectionWrapper(1259): clearMetaKeyStates on inactive InputConnection
01-31 16:57:59.684: W/IInputConnectionWrapper(1259): showStatusIcon on inactive InputConnection

后来各种查找,发现原来自己在Activity中重写了onKeyDown方法直接退出了Activity。


所以出现了这种Warn的时候请看看自己代码是否重写了onKeyDown或onKeyUp方法,检查下是否有逻辑上的错误。


评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!