From f93c438067a03a181069baf7228b74659bfc1bf7 Mon Sep 17 00:00:00 2001 From: Simon MacDonald Date: Thu, 15 Nov 2012 11:04:50 -0500 Subject: [PATCH] CB-1860: NPE in onReceivedError with non local errorUrl --- framework/src/org/apache/cordova/DroidGap.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/framework/src/org/apache/cordova/DroidGap.java b/framework/src/org/apache/cordova/DroidGap.java index f504d2ea..7d9b6d12 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() {