Skip to content

Commit 7b65a3e

Browse files
author
Steve Block
committed
Improve a warning message in WebViewCore's EventHub
These warnings appear occasionally and this will help track them down. Also removes an unused method. Bug: 5421676 Change-Id: I5ba3f146449623e3457aafc91fd2e7edc367a9d9
1 parent ca35bc5 commit 7b65a3e

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)