Update the errorurl to no longer use intents

This commit is contained in:
Joe Bowser 2014-06-24 12:57:46 -07:00
parent c47bcb2f54
commit 6f21a96238
2 changed files with 11 additions and 6 deletions

View File

@ -20,21 +20,16 @@
package org.apache.cordova;
import java.io.IOException;
import java.util.Locale;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.cordova.LOG;
import org.xmlpull.v1.XmlPullParserException;
import android.app.Activity;
import android.content.res.XmlResourceParser;
import android.graphics.Color;
import android.util.Log;
public class Config {
@ -44,6 +39,8 @@ public class Config {
private Whitelist whitelist = new Whitelist();
private String startUrl;
private static String errorUrl;
private static Config self = null;
public static void init(Activity action) {
@ -156,6 +153,10 @@ public class Config {
boolean value = xml.getAttributeValue(null, "value").equals("true");
action.getIntent().putExtra(name, value);
}
else if(name.equalsIgnoreCase("errorurl"))
{
errorUrl = xml.getAttributeValue(null, "value");
}
else
{
String value = xml.getAttributeValue(null, "value");
@ -230,4 +231,8 @@ public class Config {
}
return self.startUrl;
}
public static String getErrorUrl() {
return errorUrl;
}
}

View File

@ -716,7 +716,7 @@ public class CordovaActivity extends Activity implements CordovaInterface {
//Code to test CB-3064
String errorUrl = this.getStringProperty("ErrorUrl", null);
String errorUrl = Config.getErrorUrl();
LOG.d(TAG, "CB-3064: The errorUrl is " + errorUrl);
if (this.activityState == ACTIVITY_STARTING) {