Android Looper和Handler分析(10)
来源:未知 责任编辑:责任编辑 发表时间:2014-04-20 03:36 点击:次
if (mQueue != null) {
synchronized (mQueue) {
Message msg = mQueue.mMessages;
int n = 0;
while (msg != null) {
pw.println(prefix + " Message " + n + ": " + msg);
n++;
msg = msg.next;
}
pw.println(prefix + "(Total messages: " + n + ")");
}
}
}
public String toString() {
return "Looper{"
+ Integer.toHexString(System.identityHashCode(this))
+ "}";
}
static class HandlerException extends Exception {
HandlerException(Message message, Throwable cause) {
super(createMessage(cause), cause);
}
static String createMessage(Throwable cause) {
String causeMsg = cause.getMessage();
if (causeMsg == null) {
causeMsg = cause.toString();
}
return causeMsg;
}
}
}
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>