mirror of
https://github.com/apache/cordova-android.git
synced 2026-02-10 00:03:01 +08:00
Update the errorurl to no longer use intents
This commit is contained in:
committed by
Marcel Kinard
parent
40acaa9e85
commit
2ab81bc5ae
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -715,7 +715,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) {
|
||||
|
||||
Reference in New Issue
Block a user