You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bo...@apache.org on 2012/04/20 01:24:58 UTC
[10/13] android commit: Added another runnable,
this code is hideously awful
Added another runnable, this code is hideously awful
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/commit/327589a1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/327589a1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/327589a1
Branch: refs/heads/CordovaWebView
Commit: 327589a1d7e0a8a6af52e792e7b5edd50f4da384
Parents: 531b8f6
Author: Joe Bowser <bo...@apache.org>
Authored: Fri Apr 13 16:27:09 2012 -0700
Committer: Joe Bowser <bo...@apache.org>
Committed: Fri Apr 13 16:27:09 2012 -0700
----------------------------------------------------------------------
framework/src/org/apache/cordova/DroidGap.java | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/327589a1/framework/src/org/apache/cordova/DroidGap.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/DroidGap.java b/framework/src/org/apache/cordova/DroidGap.java
index 9b77e02..eff50a5 100755
--- a/framework/src/org/apache/cordova/DroidGap.java
+++ b/framework/src/org/apache/cordova/DroidGap.java
@@ -407,10 +407,16 @@ public class DroidGap extends Activity implements CordovaInterface {
// If timeout, then stop loading and handle error
if (me.loadUrlTimeout == currentLoadUrlTimeout) {
- me.appView.stopLoading();
- LOG.e(TAG, "DroidGap: TIMEOUT ERROR! - calling webViewClient");
- //We need another mechanism for handling timeout errors, we can't use webViewClient.onReceivedError anymore.
- //me.webViewClient.onReceivedError(me.appView, -6, "The connection to the server was unsuccessful.", url);
+
+ //TURTLES, TURTLES ALL THE WAY DOWN!!!!!
+ me.runOnUiThread(new Runnable() {
+ public void run() {
+ me.appView.stopLoading();
+ LOG.e(TAG, "DroidGap: TIMEOUT ERROR! - calling webViewClient");
+ appView.viewClient.onReceivedError(me.appView, -6, "The connection to the server was unsuccessful.", url);
+ };
+ });
+
}
}
};