diff options
| author | Steve Block <steveblock@google.com> | 2011-09-26 12:30:31 +0100 |
|---|---|---|
| committer | Steve Block <steveblock@google.com> | 2011-09-26 14:59:12 +0100 |
| commit | 7a01d94c5e54f4e24ec88c0a26bdf08477ee86d0 (patch) | |
| tree | 2a2dda3198939a81ca602be87e053c8a4bc962ab /core | |
| parent | b48ca1f1ab8cf77db337d6f2bc8586cc172ab6f8 (diff) | |
| download | frameworks_base-7a01d94c5e54f4e24ec88c0a26bdf08477ee86d0.zip frameworks_base-7a01d94c5e54f4e24ec88c0a26bdf08477ee86d0.tar.gz frameworks_base-7a01d94c5e54f4e24ec88c0a26bdf08477ee86d0.tar.bz2 | |
Update the error for WebView thread violations to make clear that it's not fatal
- Update the description
- Use Throwable rather than RuntimeException
- Log as a warning rather than an error
Bug: 5313494
Change-Id: If13ce2088e7080122db14e5e0565f64e6d6f4320
Diffstat (limited to 'core')
| -rw-r--r-- | core/java/android/webkit/WebView.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 47629c4..cb6922d 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -9280,13 +9280,13 @@ public class WebView extends AbsoluteLayout private static void checkThread() { if (Looper.myLooper() != Looper.getMainLooper()) { - RuntimeException exception = new RuntimeException( - "A WebView method was called on thread '" + + Throwable throwable = new Throwable( + "Warning: A WebView method was called on thread '" + Thread.currentThread().getName() + "'. " + "All WebView methods must be called on the UI thread. " + "Future versions of WebView may not support use on other threads."); - Log.e(LOGTAG, Log.getStackTraceString(exception)); - StrictMode.onWebViewMethodCalledOnWrongThread(exception); + Log.w(LOGTAG, Log.getStackTraceString(throwable)); + StrictMode.onWebViewMethodCalledOnWrongThread(throwable); } } |
