mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-22 08:53:24 +08:00
Update the errorurl to no longer use intents
This commit is contained in:
parent
c47bcb2f54
commit
6f21a96238
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user