cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [3/8] android commit: Update the errorurl to no longer use intents
Date Fri, 04 Jul 2014 03:02:44 GMT
Update the errorurl to no longer use intents


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/6f21a962
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/6f21a962
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/6f21a962

Branch: refs/heads/4.0.x
Commit: 6f21a96238a298a94cb66bfa4f2a969f768cea69
Parents: c47bcb2
Author: Joe Bowser <bowserj@apache.org>
Authored: Tue Jun 24 12:57:46 2014 -0700
Committer: Joe Bowser <bowserj@apache.org>
Committed: Tue Jun 24 12:57:46 2014 -0700

----------------------------------------------------------------------
 framework/src/org/apache/cordova/Config.java         | 15 ++++++++++-----
 .../src/org/apache/cordova/CordovaActivity.java      |  2 +-
 2 files changed, 11 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/6f21a962/framework/src/org/apache/cordova/Config.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/Config.java b/framework/src/org/apache/cordova/Config.java
index 31a1370..5da0856 100644
--- a/framework/src/org/apache/cordova/Config.java
+++ b/framework/src/org/apache/cordova/Config.java
@@ -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;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/6f21a962/framework/src/org/apache/cordova/CordovaActivity.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaActivity.java b/framework/src/org/apache/cordova/CordovaActivity.java
index a2610c5..1cfe265 100755
--- a/framework/src/org/apache/cordova/CordovaActivity.java
+++ b/framework/src/org/apache/cordova/CordovaActivity.java
@@ -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) {


Mime
View raw message