Updated Branches:
  refs/heads/master e1d608443 -> f93c43806

CB-1860: NPE in onReceivedError with non local errorUrl


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/f93c4380
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/f93c4380
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/f93c4380

Branch: refs/heads/master
Commit: f93c438067a03a181069baf7228b74659bfc1bf7
Parents: e1d6084
Author: Simon MacDonald <[email protected]>
Authored: Thu Nov 15 11:04:50 2012 -0500
Committer: Simon MacDonald <[email protected]>
Committed: Thu Nov 15 11:04:50 2012 -0500

----------------------------------------------------------------------
 framework/src/org/apache/cordova/DroidGap.java |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/f93c4380/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 f504d2e..7d9b6d1 100755
--- a/framework/src/org/apache/cordova/DroidGap.java
+++ b/framework/src/org/apache/cordova/DroidGap.java
@@ -40,7 +40,6 @@ import android.graphics.Color;
 import android.media.AudioManager;
 import android.os.Bundle;
 import android.os.Handler;
-import android.util.Log;
 import android.view.Display;
 import android.view.KeyEvent;
 import android.view.Menu;
@@ -156,11 +155,6 @@ public class DroidGap extends Activity implements 
CordovaInterface {
     private static int ACTIVITY_EXITING = 2;
     private int activityState = 0;  // 0=starting, 1=running (after 1st 
resume), 2=shutting down
 
-    // The base of the initial URL for our app.
-    // Does not include file name.  Ends with /
-    // ie http://server/path/
-    String baseUrl = null;
-
     // Plugin to call when activity result is received
     protected CordovaPlugin activityResultCallback = null;
     protected boolean activityResultKeepRunning;
@@ -830,7 +824,7 @@ public class DroidGap extends Activity implements 
CordovaInterface {
 
         // 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))) {
+        if ((errorUrl != null) && (errorUrl.startsWith("file://") || 
this.appView.isUrlWhiteListed(errorUrl)) && (!failingUrl.equals(errorUrl))) {
 
             // Load URL on UI thread
             me.runOnUiThread(new Runnable() {

Reply via email to