判断是否实在线程中 是的话切换切换 然后更新UI
if (Looper.getMainLooper().getThread() != Thread.currentThread()) {
runOnUiThread(new Runnable() {
@Override
public void run() {
upDataAllMessageUI(message);
}
});
} else {
upDataAllMessageUI(message);
}