Randomly closing app - InputManagerService: Got RemoteException sending setActive(false) notification

耗尽温柔 提交于 2019-12-07 09:46:22

问题


I've a very simple Android app, similar to fingerpaint application. I'm drawing some lines on the screen with my finger.

My problem is that, app closes itself randomly, taking me back to Android home screen.

Only log I can see on LogCat is that line:

(Warning) Tag: InputManagerService: Got RemoteException sending setActive(false) notification to pid 4962 uid 10077.

No exception is thrown.

I've tried compiling project against Android 2.0, 2.1 and 2.2...

I've tried disabling debuggable attribute in manifest.

I'm having this problem on both Nexus One and 2.2 Emulator.


回答1:


My problem was drawing on Canvas object from 2 different threads.

I was playing around Android's FingerPaint.java SDK sample and it's accessing Canvas within onTouchEvent. However I was also using SurfaceView and drawing on Canvas within my animation thread.

Therefore removing Canvas object access from onTouchEvent(main app thread) solved my problem.

Thanks.



来源:https://stackoverflow.com/questions/3201843/randomly-closing-app-inputmanagerservice-got-remoteexception-sending-setactiv

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!