Skip to content

Commit 2cdbe2f

Browse files
Steve BlockAndroid (Google) Code Review
authored andcommitted
Merge "Update the error for WebView thread violations to make clear that it's not fatal"
2 parents 3bade95 + 7a01d94 commit 2cdbe2f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core/java/android/webkit/WebView.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9283,13 +9283,13 @@ protected void updateCachedTextfield(String updatedText) {
92839283

92849284
private static void checkThread() {
92859285
if (Looper.myLooper() != Looper.getMainLooper()) {
9286-
RuntimeException exception = new RuntimeException(
9287-
"A WebView method was called on thread '" +
9286+
Throwable throwable = new Throwable(
9287+
"Warning: A WebView method was called on thread '" +
92889288
Thread.currentThread().getName() + "'. " +
92899289
"All WebView methods must be called on the UI thread. " +
92909290
"Future versions of WebView may not support use on other threads.");
9291-
Log.e(LOGTAG, Log.getStackTraceString(exception));
9292-
StrictMode.onWebViewMethodCalledOnWrongThread(exception);
9291+
Log.w(LOGTAG, Log.getStackTraceString(throwable));
9292+
StrictMode.onWebViewMethodCalledOnWrongThread(throwable);
92939293
}
92949294
}
92959295

0 commit comments

Comments
 (0)