Skip to content

Commit 1672124

Browse files
Steve BlockAndroid (Google) Code Review
authored andcommitted
Merge "Improve a warning message in WebViewCore's EventHub"
2 parents 9231549 + 7b65a3e commit 1672124

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

core/java/android/webkit/WebViewCore.java

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,24 +1662,15 @@ private synchronized void removeMessages(int what) {
16621662
mDrawIsScheduled = false;
16631663
}
16641664
if (mMessages != null) {
1665-
Log.w(LOGTAG, "Not supported in this case.");
1665+
Throwable throwable = new Throwable(
1666+
"EventHub.removeMessages(int what = " + what + ") is not supported " +
1667+
"before the WebViewCore is set up.");
1668+
Log.w(LOGTAG, Log.getStackTraceString(throwable));
16661669
} else {
16671670
mHandler.removeMessages(what);
16681671
}
16691672
}
16701673

1671-
private synchronized boolean hasMessages(int what) {
1672-
if (mBlockMessages) {
1673-
return false;
1674-
}
1675-
if (mMessages != null) {
1676-
Log.w(LOGTAG, "hasMessages() is not supported in this case.");
1677-
return false;
1678-
} else {
1679-
return mHandler.hasMessages(what);
1680-
}
1681-
}
1682-
16831674
private synchronized void sendMessageDelayed(Message msg, long delay) {
16841675
if (mBlockMessages) {
16851676
return;

0 commit comments

Comments
 (0)