incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject [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
Date Wed, 25 Jul 2012 19:54:44 GMT
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 <bowserj@apache.org>
Authored: Wed Jul 25 12:54:03 2012 -0700
Committer: Joe Bowser <bowserj@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);
                 }
             });


Mime
View raw message