diff options
| author | Grace Kloba <klobag@google.com> | 2009-09-24 12:27:14 -0700 |
|---|---|---|
| committer | Grace Kloba <klobag@google.com> | 2009-09-24 12:27:14 -0700 |
| commit | dbad320bf3a4ae44717aa8dff4ec1791a3820259 (patch) | |
| tree | b0a5c09b85538039fda5e1de6dc881f067f685d9 /core/java/android/webkit/CallbackProxy.java | |
| parent | bb6aba1984bfdceaec43054ef0b2a8e5dcd26215 (diff) | |
ResultTransport needs a default value. If the thread is
ununlocked by something else other than CallbackProxy's
notify(), it can have a null value.
Fix http://b/issue?id=2131842
Diffstat (limited to 'core/java/android/webkit/CallbackProxy.java')
| -rw-r--r-- | core/java/android/webkit/CallbackProxy.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/java/android/webkit/CallbackProxy.java b/core/java/android/webkit/CallbackProxy.java index 1ec769b62659..37efdb0248b8 100644 --- a/core/java/android/webkit/CallbackProxy.java +++ b/core/java/android/webkit/CallbackProxy.java @@ -116,6 +116,10 @@ class CallbackProxy extends Handler { // Private result object private E mResult; + public ResultTransport(E defaultResult) { + mResult = defaultResult; + } + public synchronized void setResult(E result) { mResult = result; } @@ -819,7 +823,7 @@ class CallbackProxy extends Handler { public boolean shouldOverrideUrlLoading(String url) { // We have a default behavior if no client exists so always send the // message. - ResultTransport<Boolean> res = new ResultTransport<Boolean>(); + ResultTransport<Boolean> res = new ResultTransport<Boolean>(false); Message msg = obtainMessage(OVERRIDE_URL); msg.getData().putString("url", url); msg.obj = res; |
