mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 15:12:51 +08:00
Added another runnable, this code is hideously awful
This commit is contained in:
parent
531b8f641f
commit
327589a1d7
@ -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);
|
||||
};
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user