有人知道如何防止安卓摄像头2关闭守护程序警告:
11-18 22:49:26.330 32353-32365/zpavel.com.myapplication W/MessageQueue: Handler (android.os.Handler) {37798789} sending message to a Handler on a dead thread 11-18 22:49:26.330 32353-32365/zpavel.com.myapplication W/MessageQueue: java.lang.IllegalStateException: Handler (android.os.Handler) {37798789} sending message to a Handler on a dead thread 11-18 22:49:26.330 32353-32365/zpavel.com.myapplication W/MessageQueue: at android.os.MessageQueue.enqueueMessage(MessageQueue.java:325) 11-18 22:49:26.330 32353-32365/zpavel.com.myapplication W/MessageQueue: at android.os.Handler.enqueueMessage(Handler.java:631) 11-18 22:49:26.330 32353-32365/zpavel.com.myapplication W/MessageQueue: at android.os.Handler.sendMessageAtFrontOfQueue(Handler.java:623) 11-18 22:49:26.330 32353-32365/zpavel.com.myapplication W/MessageQueue: at android.hardware.camera2.legacy.RequestThreadManager.quit(RequestThreadManager.java:941) 11-18 22:49:26.330 32353-32365/zpavel.com.myapplication W/MessageQueue: at android.hardware.camera2.legacy.LegacyCameraDevice.close(LegacyCameraDevice.java:444) 11-18 22:49:26.330 32353-32365/zpavel.com.myapplication W/MessageQueue: at android.hardware.camera2.legacy.LegacyCameraDevice.finalize(LegacyCameraDevice.java:468) 11-18 22:49:26.330 32353-32365/zpavel.com.myapplication W/MessageQueue: at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:209) 11-18 22:49:26.330 32353-32365/zpavel.com.myapplication W/MessageQueue: at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:192) 11-18 22:49:26.330 32353-32365/zpavel.com.myapplication W/MessageQueue: at java.lang.Thread.run(Thread.java:818)
我正在Galaxy A5,android 5.0.2,api level 21上测试它,通过一个服务,每隔一段时间打开和停止摄像头。一切似乎都能很好地摘录这个仍然很烦人的警告。
是否可以在相机关闭的同时停止守护程序并阻止出现此警告?
提前感谢您的帮助。