Merge change 26896 into eclair

* changes:
  ResultTransport needs a default value. If the thread is ununlocked by something else other than CallbackProxy's notify(), it can have a null value.
This commit is contained in:
Android (Google) Code Review
2009-09-24 15:35:22 -04:00

View File

@@ -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;