public void sendWorkerMessageEmpty(int what) { if (null != mWorkerHandler) { mWorkerHandler.sendEmptyMessage(what); } else { workerHandlerNotInit(); } }
// 目前只提供两个sendWorkerMessage的方法,如果需要使用其他handler发送消息的方法getmUIHandler后处理 public void sendWorkderMessage(Message msg) { if (null != mWorkerHandler) { mWorkerHandler.sendMessage(msg); } else { workerHandlerNotInit(); } }
public void recycleWorkerHandler() { if (null != mHandlerThread && null != mWorkerHandler) { mHandlerThread.quit(); mWorkerHandler.removeCallbacksAndMessages(null); } }