0
我有一個程序,根據我推送的按鈕發送預定義的消息。它在我的舊手機(OG Evo)上運行良好,但只會發送給我的新手機(Evo LTE)的前14個人。大衆短信不發送給大家
我拉到一個logcat的,並保持遍地看到的代碼塊:
06-06 11:25:34.850: W/MessageQueue(28308): null sending message to a Handler on a dead thread
06-06 11:25:34.850: W/MessageQueue(28308): java.lang.RuntimeException: null sending message to a Handler on a dead thread
06-06 11:25:34.850: W/MessageQueue(28308): at android.os.MessageQueue.enqueueMessage(MessageQueue.java:200)
06-06 11:25:34.850: W/MessageQueue(28308): at android.os.Looper.quit(Looper.java:245)
06-06 11:25:34.850: W/MessageQueue(28308): at android.os.HandlerThread.quit(HandlerThread.java:96)
06-06 11:25:34.850: W/MessageQueue(28308): at com.htc.usage.service.UsageStatsService.onDestroy(UsageStatsService.java:197)
06-06 11:25:34.850: W/MessageQueue(28308): at android.app.ActivityThread.handleStopService(ActivityThread.java:2762)
06-06 11:25:34.850: W/MessageQueue(28308): at android.app.ActivityThread.access$2000(ActivityThread.java:139)
06-06 11:25:34.850: W/MessageQueue(28308): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1338)
06-06 11:25:34.850: W/MessageQueue(28308): at android.os.Handler.dispatchMessage(Handler.java:99)
06-06 11:25:34.850: W/MessageQueue(28308): at android.os.Looper.loop(Looper.java:154)
06-06 11:25:34.850: W/MessageQueue(28308): at android.app.ActivityThread.main(ActivityThread.java:4977)
06-06 11:25:34.850: W/MessageQueue(28308): at java.lang.reflect.Method.invokeNative(Native Method)
06-06 11:25:34.850: W/MessageQueue(28308): at java.lang.reflect.Method.invoke(Method.java:511)
06-06 11:25:34.850: W/MessageQueue(28308): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
06-06 11:25:34.850: W/MessageQueue(28308): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
06-06 11:25:34.850: W/MessageQueue(28308): at dalvik.system.NativeStart.main(Native Method)
06-06 11:25:35.320: D/PhoneStatusBarPolicy(611): @@ iconIndex=1
06-06 11:25:35.320: D/PhoneStatusBarPolicy(611): isCdma():true hasService:true mSimState=UNKNOWN gprsState=0 mDataState=2 dataActivity=4 mPhone.htcModemLinkOn:false hspa==true
06-06 11:25:35.330: D/PhoneStatusBarPolicy(611): hasService()=true ,mDataState=2 ,mPhone.htcModemLinkOn()=false ,mDataActivity=4
06-06 11:25:35.340: D/PhoneStatusBarPolicy(611): slotType[0]=SIM
06-06 11:25:35.451: V/UsageStatsService(28308): CMD_ID_UPDATE_MESSAGE_USAGE
06-06 11:25:35.471: V/UsageStatsService(28308): MSG_ON_MESSAGE_UPDATE
06-06 11:25:35.501: V/UsageStatsService(28308): MSG_STOP_SERVICE
06-06 11:25:35.501: V/UsageStatsService(28308): onDestroy
完整的logcat:http://pastebin.com/hZXwR5FL
我不明白如何將線後,15人,因爲我得到關閉我沒有關閉它。
我的編碼:http://pastebin.com/xe4U4GYZ
任何人都可以發現這個線程是如何得到關閉?