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/07/25 21:54:44 UTC
[1/2] android commit: Throwing code over the fence for CB-1128,
We need a Samsung Galaxy S running 2.3.5 to confirm this fix
Updated Branches:
refs/heads/master b9b2c6a01 -> 401584dbd
Throwing code over the fence for CB-1128, We need a Samsung Galaxy S running 2.3.5 to confirm this fix
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/401584db
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/401584db
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/401584db
Branch: refs/heads/master
Commit: 401584dbd8d0839b7b96f93f25aa3662b0c5e092
Parents: b234b0b
Author: Joe Bowser <bo...@apache.org>
Authored: Wed Jul 25 12:54:03 2012 -0700
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jul 25 12:54:03 2012 -0700
----------------------------------------------------------------------
framework/src/org/apache/cordova/DroidGap.java | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/401584db/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 f48e211..4d6df52 100755
--- a/framework/src/org/apache/cordova/DroidGap.java
+++ b/framework/src/org/apache/cordova/DroidGap.java
@@ -740,10 +740,10 @@ public class DroidGap extends Activity implements CordovaInterface {
}
/**
- * Stop spinner.
+ * Stop spinner - Must be called from UI thread
*/
public void spinnerStop() {
- if (this.spinnerDialog != null) {
+ if (this.spinnerDialog != null && this.spinnerDialog.isShowing()) {
this.spinnerDialog.dismiss();
this.spinnerDialog = null;
}
@@ -811,10 +811,7 @@ public class DroidGap extends Activity implements CordovaInterface {
*/
public void onReceivedError(final int errorCode, final String description, final String failingUrl) {
final DroidGap me = this;
-
- // Stop "app loading" spinner if showing
- this.spinnerStop();
-
+
// If errorUrl specified, then load it
final String errorUrl = me.getStringProperty("errorUrl", null);
if ((errorUrl != null) && (errorUrl.startsWith("file://") || errorUrl.indexOf(me.baseUrl) == 0 || this.appView.isUrlWhiteListed(errorUrl)) && (!failingUrl.equals(errorUrl))) {
@@ -822,6 +819,8 @@ public class DroidGap extends Activity implements CordovaInterface {
// Load URL on UI thread
me.runOnUiThread(new Runnable() {
public void run() {
+ // Stop "app loading" spinner if showing
+ me.spinnerStop();
me.appView.showWebPage(errorUrl, false, true, null);
}
});