Merge "Update the error for WebView thread violations to make clear that it's not fatal"
This commit is contained in:
@@ -9283,13 +9283,13 @@ public class WebView extends AbsoluteLayout
|
|||||||
|
|
||||||
private static void checkThread() {
|
private static void checkThread() {
|
||||||
if (Looper.myLooper() != Looper.getMainLooper()) {
|
if (Looper.myLooper() != Looper.getMainLooper()) {
|
||||||
RuntimeException exception = new RuntimeException(
|
Throwable throwable = new Throwable(
|
||||||
"A WebView method was called on thread '" +
|
"Warning: A WebView method was called on thread '" +
|
||||||
Thread.currentThread().getName() + "'. " +
|
Thread.currentThread().getName() + "'. " +
|
||||||
"All WebView methods must be called on the UI thread. " +
|
"All WebView methods must be called on the UI thread. " +
|
||||||
"Future versions of WebView may not support use on other threads.");
|
"Future versions of WebView may not support use on other threads.");
|
||||||
Log.e(LOGTAG, Log.getStackTraceString(exception));
|
Log.w(LOGTAG, Log.getStackTraceString(throwable));
|
||||||
StrictMode.onWebViewMethodCalledOnWrongThread(exception);
|
StrictMode.onWebViewMethodCalledOnWrongThread(throwable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user