You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/05/03 18:19:25 UTC

[1/4] android commit: [CB-1108] Convert config.xml from to

Updated Branches:
  refs/heads/master d226818be -> 27cd9dde3


[CB-1108] Convert config.xml from <plugin> to <feature>

This unifies the config.xml used by iOS and Android. Now <feature> tags can be used
to add plugins. The changes are non-intrusive so the older versions of the config.xml
can still be used after this change. The value of a param named "android-package"
determines the class for the plugin.


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

Branch: refs/heads/master
Commit: 4b9047b7d8ef8b983bd3d107c20620a54474d269
Parents: d226818
Author: Gorkem Ercan <go...@gmail.com>
Authored: Thu Mar 28 10:22:08 2013 +0200
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Fri May 3 11:35:00 2013 -0400

----------------------------------------------------------------------
 framework/res/xml/config.xml                       |  123 ++++++++------
 .../src/org/apache/cordova/api/PluginManager.java  |   39 +++--
 test/res/xml/config.xml                            |  135 +++++++++------
 3 files changed, 177 insertions(+), 120 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/4b9047b7/framework/res/xml/config.xml
----------------------------------------------------------------------
diff --git a/framework/res/xml/config.xml b/framework/res/xml/config.xml
index bc6ca0c..c915f0c 100644
--- a/framework/res/xml/config.xml
+++ b/framework/res/xml/config.xml
@@ -1,60 +1,85 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-       Licensed to the Apache Software Foundation (ASF) under one
-       or more contributor license agreements.  See the NOTICE file
-       distributed with this work for additional information
-       regarding copyright ownership.  The ASF licenses this file
-       to you under the Apache License, Version 2.0 (the
-       "License"); you may not use this file except in compliance
-       with the License.  You may obtain a copy of the License at
+<?xml version="1.0" encoding="UTF-8"?>
+<widget xmlns     = "http://www.w3.org/ns/widgets"
+        id        = "io.cordova.helloCordova"
+        version   = "2.0.0">
+    <name>Hello Cordova</name>
 
-         http://www.apache.org/licenses/LICENSE-2.0
+    <description>
+        A sample Apache Cordova application that responds to the deviceready event.
+    </description>
 
-       Unless required by applicable law or agreed to in writing,
-       software distributed under the License is distributed on an
-       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-       KIND, either express or implied.  See the License for the
-       specific language governing permissions and limitations
-       under the License.
--->
-<cordova>
-    <!--
-    access elements control the Android whitelist.
-    Domains are assumed blocked unless set otherwise
-     -->
+    <author href="http://cordova.io" email="callback-dev@incubator.apache.org">
+        Apache Cordova Team
+    </author>
 
-    <access origin="http://127.0.0.1*"/> <!-- allow local pages -->
-
-    <!-- <access origin="https://example.com" /> allow any secure requests to example.com -->
-    <!-- <access origin="https://example.com" subdomains="true" /> such as above, but including subdomains, such as www -->
-    <access origin=".*"/>
+    <access origin="*"/>
+ 
 
     <!-- <content src="http://mysite.com/myapp.html" /> for external pages -->
     <content src="index.html" />
 
     <log level="DEBUG"/>
+
+    <!-- Preferences for Android -->
     <preference name="useBrowserHistory" value="true" />
     <preference name="exit-on-suspend" value="false" />
-<plugins>
-    <plugin name="App" value="org.apache.cordova.App"/>
-    <plugin name="Geolocation" value="org.apache.cordova.GeoBroker"/>
-    <plugin name="Device" value="org.apache.cordova.Device"/>
-    <plugin name="Accelerometer" value="org.apache.cordova.AccelListener"/>
-    <plugin name="Compass" value="org.apache.cordova.CompassListener"/>
-    <plugin name="Media" value="org.apache.cordova.AudioHandler"/>
-    <plugin name="Camera" value="org.apache.cordova.CameraLauncher"/>
-    <plugin name="Contacts" value="org.apache.cordova.ContactManager"/>
-    <plugin name="File" value="org.apache.cordova.FileUtils"/>
-    <plugin name="NetworkStatus" value="org.apache.cordova.NetworkManager"/>
-    <plugin name="Notification" value="org.apache.cordova.Notification"/>
-    <plugin name="Storage" value="org.apache.cordova.Storage"/>
-    <plugin name="FileTransfer" value="org.apache.cordova.FileTransfer"/>
-    <plugin name="Capture" value="org.apache.cordova.Capture"/>
-    <plugin name="Battery" value="org.apache.cordova.BatteryListener"/>
-    <plugin name="SplashScreen" value="org.apache.cordova.SplashScreen"/>
-    <plugin name="Echo" value="org.apache.cordova.Echo" />
-    <plugin name="Globalization" value="org.apache.cordova.Globalization"/>
-    <plugin name="InAppBrowser" value="org.apache.cordova.InAppBrowser"/>
-</plugins>
-</cordova>
 
+    <feature name="App">
+      <param name="android-package" value="org.apache.cordova.App"/>
+    </feature>
+    <feature name="Geolocation">
+      <param name="android-package" value="org.apache.cordova.GeoBroker"/>
+    </feature>
+    <feature name="Device">
+      <param name="android-package" value="org.apache.cordova.Device"/>
+    </feature>
+    <feature name="Accelerometer">
+      <param name="android-package" value="org.apache.cordova.AccelListener"/>
+    </feature>
+    <feature name="Compass">
+      <param name="android-package" value="org.apache.cordova.CompassListener"/>
+    </feature>
+    <feature name="Media">
+      <param name="android-package" value="org.apache.cordova.AudioHandler"/>
+    </feature>
+    <feature name="Camera">
+      <param name="android-package" value="org.apache.cordova.CameraLauncher"/>
+    </feature>
+    <feature name="Contacts">
+      <param name="android-package" value="org.apache.cordova.ContactManager"/>
+    </feature>
+    <feature name="File">
+      <param name="android-package" value="org.apache.cordova.FileUtils"/>
+    </feature>
+    <feature name="NetworkStatus">
+      <param name="android-package" value="org.apache.cordova.NetworkManager"/>
+    </feature>
+    <feature name="Notification">
+      <param name="android-package" value="org.apache.cordova.Notification"/>
+    </feature>
+    <feature name="Storage">
+      <param name="android-package" value="org.apache.cordova.Storage"/>
+    </feature>
+    <feature name="FileTransfer">
+      <param name="android-package" value="org.apache.cordova.FileTransfer"/>
+    </feature>
+    <feature name="Capture">
+      <param name="android-package" value="org.apache.cordova.Capture"/>
+    </feature>
+    <feature name="Battery">
+      <param name="android-package" value="org.apache.cordova.BatteryListener"/>
+    </feature>
+    <feature name="SplashScreen">
+      <param name="android-package" value="org.apache.cordova.SplashScreen"/>
+    </feature>
+    <feature name="Echo">
+      <param name="android-package" value="org.apache.cordova.Echo"/>
+    </feature>
+    <feature name="Globalization">
+      <param name="android-package" value="org.apache.cordova.Globalization"/>
+    </feature>
+    <feature name="InAppBrowser">
+      <param name="android-package" value="org.apache.cordova.InAppBrowser"/>
+    </feature>
+         
+</widget>

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/4b9047b7/framework/src/org/apache/cordova/api/PluginManager.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/api/PluginManager.java b/framework/src/org/apache/cordova/api/PluginManager.java
index 7d823cd..4cf3450 100755
--- a/framework/src/org/apache/cordova/api/PluginManager.java
+++ b/framework/src/org/apache/cordova/api/PluginManager.java
@@ -107,7 +107,7 @@ public class PluginManager {
         }
         XmlResourceParser xml = this.ctx.getActivity().getResources().getXml(id);
         int eventType = -1;
-        String service = "", pluginClass = "", paramType = "";
+        String service = "", pluginClass = "", paramType = "", featureName="";
         boolean onload = false;
         PluginEntry entry = null;
         boolean insideFeature = false;
@@ -130,26 +130,28 @@ public class PluginManager {
                 }
                 else if (strNode.equals("feature")) {
                     insideFeature = true;
-                    //Check for supported feature sets (Accelerometer, Geolocation, etc)
+                    //Check for supported feature sets  aka. plugins (Accelerometer, Geolocation, etc)
                     //Set the bit for reading params
-                    String uri = xml.getAttributeValue(null,"name");
+                   featureName = xml.getAttributeValue(null,"name");
                 }
-                else if(strNode.equals("param")) {
-                    if(insideFeature)
+                else if( insideFeature && strNode.equals("param")) {
+                    paramType = xml.getAttributeValue(null, "name");
+                    if (paramType.equals("service")) // check if it is using the older service param
+                        service = xml.getAttributeValue(null, "value");
+                    else if (paramType.equals("package"))
+                        pluginClass = xml.getAttributeValue(null, "value");
+                    else if (paramType.equals("android-package"))
                     {
-                        paramType = xml.getAttributeValue(null, "name");
-                        if(paramType.equals("service"))
-                            service = xml.getAttributeValue(null, "value");
-                        else if(paramType.equals("package"))
-                            pluginClass = xml.getAttributeValue(null, "value");
-                        if(service.length() > 0  && pluginClass.length() > 0)
-                        {
-                            onload = "true".equals(xml.getAttributeValue(null, "onload"));
-                            entry = new PluginEntry(service, pluginClass, onload);
-                            this.addService(entry);
-                            service = "";
-                            pluginClass = "";
-                        }
+                        service = featureName;
+                        pluginClass = xml.getAttributeValue(null,"value");
+                    }
+                    if (service.length() > 0 && pluginClass.length() > 0) {
+                        onload = "true".equals(xml.getAttributeValue(null,
+                                "onload"));
+                        entry = new PluginEntry(service, pluginClass, onload);
+                        this.addService(entry);
+                        service = "";
+                        pluginClass = "";
                     }
                 }
             }
@@ -161,6 +163,7 @@ public class PluginManager {
                     //Empty the strings to prevent plugin loading bugs
                     service = "";
                     pluginClass = "";
+                    featureName ="";
                     insideFeature = false;
                 }
             }

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/4b9047b7/test/res/xml/config.xml
----------------------------------------------------------------------
diff --git a/test/res/xml/config.xml b/test/res/xml/config.xml
index 675aeb5..d3ea4d8 100644
--- a/test/res/xml/config.xml
+++ b/test/res/xml/config.xml
@@ -1,57 +1,86 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-       Licensed to the Apache Software Foundation (ASF) under one
-       or more contributor license agreements.  See the NOTICE file
-       distributed with this work for additional information
-       regarding copyright ownership.  The ASF licenses this file
-       to you under the Apache License, Version 2.0 (the
-       "License"); you may not use this file except in compliance
-       with the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-       Unless required by applicable law or agreed to in writing,
-       software distributed under the License is distributed on an
-       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-       KIND, either express or implied.  See the License for the
-       specific language governing permissions and limitations
-       under the License.
--->
-<cordova>
-    <!--
-    access elements control the Android whitelist.
-    Domains are assumed blocked unless set otherwise
-     -->
-
-    <access origin="http://127.0.0.1*"/> <!-- allow local pages -->
-
-    <!-- <access origin="https://example.com" /> allow any secure requests to example.com -->
-    <!-- <access origin="https://example.com" subdomains="true" /> such as above, but including subdomains, such as www -->
-    <access origin=".*"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<widget xmlns     = "http://www.w3.org/ns/widgets"
+        id        = "io.cordova.helloCordova"
+        version   = "2.0.0">
+    <name>Hello Cordova</name>
+
+    <description>
+        A sample Apache Cordova application that responds to the deviceready event.
+    </description>
+
+    <author href="http://cordova.io" email="callback-dev@incubator.apache.org">
+        Apache Cordova Team
+    </author>
+
+    <access origin="*"/>
+ 
+
+    <!-- <content src="http://mysite.com/myapp.html" /> for external pages -->
+    <content src="index.html" />
 
     <log level="DEBUG"/>
+
+    <!-- Preferences for Android -->
     <preference name="useBrowserHistory" value="true" />
-<plugins>
-    <plugin name="App" value="org.apache.cordova.App"/>
-    <plugin name="Activity" value="org.apache.cordova.test.ActivityPlugin"/>
-    <plugin name="Geolocation" value="org.apache.cordova.GeoBroker"/>
-    <plugin name="Device" value="org.apache.cordova.Device"/>
-    <plugin name="Accelerometer" value="org.apache.cordova.AccelListener"/>
-    <plugin name="Compass" value="org.apache.cordova.CompassListener"/>
-    <plugin name="Media" value="org.apache.cordova.AudioHandler"/>
-    <plugin name="Camera" value="org.apache.cordova.CameraLauncher"/>
-    <plugin name="Contacts" value="org.apache.cordova.ContactManager"/>
-    <plugin name="File" value="org.apache.cordova.FileUtils"/>
-    <plugin name="NetworkStatus" value="org.apache.cordova.NetworkManager"/>
-    <plugin name="Notification" value="org.apache.cordova.Notification"/>
-    <plugin name="Storage" value="org.apache.cordova.Storage"/>
-    <plugin name="FileTransfer" value="org.apache.cordova.FileTransfer"/>
-    <plugin name="Capture" value="org.apache.cordova.Capture"/>
-    <plugin name="Battery" value="org.apache.cordova.BatteryListener"/>
-    <plugin name="SplashScreen" value="org.apache.cordova.SplashScreen"/>
-    <plugin name="Echo" value="org.apache.cordova.Echo" />
-    <plugin name="Globalization" value="org.apache.cordova.Globalization"/>
-    <plugin name="InAppBrowser" value="org.apache.cordova.InAppBrowser"/>
-</plugins>
-</cordova>
+    <preference name="exit-on-suspend" value="false" />
+
+    <feature name="App">
+      <param name="android-package" value="org.apache.cordova.App"/>
+    </feature>
+    <feature name="Geolocation">
+      <param name="android-package" value="org.apache.cordova.GeoBroker"/>
+    </feature>
+    <feature name="Device">
+      <param name="android-package" value="org.apache.cordova.Device"/>
+    </feature>
+    <feature name="Accelerometer">
+      <param name="android-package" value="org.apache.cordova.AccelListener"/>
+    </feature>
+    <feature name="Compass">
+      <param name="android-package" value="org.apache.cordova.CompassListener"/>
+    </feature>
+    <feature name="Media">
+      <param name="android-package" value="org.apache.cordova.AudioHandler"/>
+    </feature>
+    <feature name="Camera">
+      <param name="android-package" value="org.apache.cordova.CameraLauncher"/>
+    </feature>
+    <feature name="Contacts">
+      <param name="android-package" value="org.apache.cordova.ContactManager"/>
+    </feature>
+    <feature name="File">
+      <param name="android-package" value="org.apache.cordova.FileUtils"/>
+    </feature>
+    <feature name="NetworkStatus">
+      <param name="android-package" value="org.apache.cordova.NetworkManager"/>
+    </feature>
+    <feature name="Notification">
+      <param name="android-package" value="org.apache.cordova.Notification"/>
+    </feature>
+    <feature name="Storage">
+      <param name="android-package" value="org.apache.cordova.Storage"/>
+    </feature>
+    <feature name="FileTransfer">
+      <param name="android-package" value="org.apache.cordova.FileTransfer"/>
+    </feature>
+    <feature name="Capture">
+      <param name="android-package" value="org.apache.cordova.Capture"/>
+    </feature>
+    <feature name="Battery">
+      <param name="android-package" value="org.apache.cordova.BatteryListener"/>
+    </feature>
+    <feature name="SplashScreen">
+      <param name="android-package" value="org.apache.cordova.SplashScreen"/>
+    </feature>
+    <feature name="Echo">
+      <param name="android-package" value="org.apache.cordova.Echo"/>
+    </feature>
+    <feature name="Globalization">
+      <param name="android-package" value="org.apache.cordova.Globalization"/>
+    </feature>
+    <feature name="InAppBrowser">
+      <param name="android-package" value="org.apache.cordova.InAppBrowser"/>
+    </feature>
+         
+</widget>
 


[3/4] android commit: [CB-1108] Make onload=true settable as a

Posted by ag...@apache.org.
[CB-1108] Make onload=true settable as a <feature> <param>

Plus some simplification of code.


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

Branch: refs/heads/master
Commit: 373da39ac2c9abfbf7866d76e3ace3ecc360ec96
Parents: b7990b7
Author: Andrew Grieve <ag...@chromium.org>
Authored: Fri May 3 12:18:21 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Fri May 3 12:18:21 2013 -0400

----------------------------------------------------------------------
 .../src/org/apache/cordova/api/PluginManager.java  |   35 +++++----------
 1 files changed, 11 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/373da39a/framework/src/org/apache/cordova/api/PluginManager.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/api/PluginManager.java b/framework/src/org/apache/cordova/api/PluginManager.java
index 4cf3450..36e286e 100755
--- a/framework/src/org/apache/cordova/api/PluginManager.java
+++ b/framework/src/org/apache/cordova/api/PluginManager.java
@@ -107,9 +107,8 @@ public class PluginManager {
         }
         XmlResourceParser xml = this.ctx.getActivity().getResources().getXml(id);
         int eventType = -1;
-        String service = "", pluginClass = "", paramType = "", featureName="";
+        String service = "", pluginClass = "", paramType = "";
         boolean onload = false;
-        PluginEntry entry = null;
         boolean insideFeature = false;
         while (eventType != XmlResourceParser.END_DOCUMENT) {
             if (eventType == XmlResourceParser.START_TAG) {
@@ -118,52 +117,40 @@ public class PluginManager {
                 if (strNode.equals("plugin")) {
                     service = xml.getAttributeValue(null, "name");
                     pluginClass = xml.getAttributeValue(null, "value");
-                    // System.out.println("Plugin: "+name+" => "+value);
                     Log.d(TAG, "<plugin> tags are deprecated, please use <features> instead. <plugin> will no longer work as of Cordova 3.0");
                     onload = "true".equals(xml.getAttributeValue(null, "onload"));
-                    entry = new PluginEntry(service, pluginClass, onload);
-                    this.addService(entry);
                 }
                 //What is this?
                 else if (strNode.equals("url-filter")) {
                     this.urlMap.put(xml.getAttributeValue(null, "value"), service);
                 }
                 else if (strNode.equals("feature")) {
-                    insideFeature = true;
                     //Check for supported feature sets  aka. plugins (Accelerometer, Geolocation, etc)
                     //Set the bit for reading params
-                   featureName = xml.getAttributeValue(null,"name");
+                    insideFeature = true;
+                    service = xml.getAttributeValue(null, "name");
                 }
-                else if( insideFeature && strNode.equals("param")) {
+                else if (insideFeature && strNode.equals("param")) {
                     paramType = xml.getAttributeValue(null, "name");
                     if (paramType.equals("service")) // check if it is using the older service param
                         service = xml.getAttributeValue(null, "value");
-                    else if (paramType.equals("package"))
-                        pluginClass = xml.getAttributeValue(null, "value");
-                    else if (paramType.equals("android-package"))
-                    {
-                        service = featureName;
+                    else if (paramType.equals("package") || paramType.equals("android-package"))
                         pluginClass = xml.getAttributeValue(null,"value");
-                    }
-                    if (service.length() > 0 && pluginClass.length() > 0) {
-                        onload = "true".equals(xml.getAttributeValue(null,
-                                "onload"));
-                        entry = new PluginEntry(service, pluginClass, onload);
-                        this.addService(entry);
-                        service = "";
-                        pluginClass = "";
-                    }
+                    else if (paramType.equals("onload"))
+                        onload = "true".equals(xml.getAttributeValue(null, "onload"));
                 }
             }
             else if (eventType == XmlResourceParser.END_TAG)
             {
                 String strNode = xml.getName();
-                if(strNode.equals("feature"))
+                if (strNode.equals("feature") || strNode.equals("plugin"))
                 {
+                    PluginEntry entry = new PluginEntry(service, pluginClass, onload);
+                    this.addService(entry);
+
                     //Empty the strings to prevent plugin loading bugs
                     service = "";
                     pluginClass = "";
-                    featureName ="";
                     insideFeature = false;
                 }
             }


[2/4] android commit: Deprecate in favour of

Posted by ag...@apache.org.
Deprecate <log> in favour of <preference name="loglevel">


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

Branch: refs/heads/master
Commit: b7990b7df83413982a7d8eb115e1f13a6bd51c1a
Parents: 4b9047b
Author: Andrew Grieve <ag...@chromium.org>
Authored: Fri May 3 12:11:09 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Fri May 3 12:11:09 2013 -0400

----------------------------------------------------------------------
 framework/src/org/apache/cordova/Config.java |   16 +++++-----------
 1 files changed, 5 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/b7990b7d/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 594c2b2..b9f81f0 100644
--- a/framework/src/org/apache/cordova/Config.java
+++ b/framework/src/org/apache/cordova/Config.java
@@ -97,7 +97,7 @@ public class Config {
                 }
                 else if (strNode.equals("log")) {
                     String level = xml.getAttributeValue(null, "level");
-                    LOG.i("CordovaLog", "Found log level %s", level);
+                    Log.d(TAG, "The <log> tags is deprecated. Use <preference name=\"loglevel\" value=\"" + level + "\"/> instead.");
                     if (level != null) {
                         LOG.setLogLevel(level);
                     }
@@ -113,7 +113,10 @@ public class Config {
                        
                        Note: We should probably pass in the classname for the variable splash on splashscreen!
                        */
-                    if(name.equals("splashscreen")) {
+                    if (name.equals("loglevel")) {
+                        String level = xml.getAttributeValue(null, "value");
+                        LOG.setLogLevel(level);
+                    } else if (name.equals("splashscreen")) {
                         String value = xml.getAttributeValue(null, "value");
                         int resource = 0;
                         if (value != null)
@@ -123,20 +126,14 @@ public class Config {
                         resource = action.getResources().getIdentifier(value, "drawable", action.getPackageName());
                         
                         action.getIntent().putExtra(name, resource);
-                        LOG.i("CordovaLog", "Found preference for %s=%s", name, value);
-                        Log.d("CordovaLog", "Found preference for " + name + "=" + value);
                     }
                     else if(name.equals("backgroundColor")) {
                         int value = xml.getAttributeIntValue(null, "value", Color.BLACK);
                         action.getIntent().putExtra(name, value);
-                        LOG.i("CordovaLog", "Found preference for %s=%d", name, value);
-                        Log.d("CordovaLog", "Found preference for " + name + "=" + Integer.toString(value));
                     }
                     else if(name.equals("loadUrlTimeoutValue")) {
                         int value = xml.getAttributeIntValue(null, "value", 20000);
                         action.getIntent().putExtra(name, value);
-                        LOG.i("CordovaLog", "Found preference for %s=%d", name, value);
-                        Log.d("CordovaLog", "Found preference for " + name + "=" + Integer.toString(value));
                     }
                     else if(name.equals("keepRunning"))
                     {
@@ -157,12 +154,9 @@ public class Config {
                     {
                         String value = xml.getAttributeValue(null, "value");
                         action.getIntent().putExtra(name, value);
-                        LOG.i("CordovaLog", "Found preference for %s=%s", name, value);
-                        Log.d("CordovaLog", "Found preference for " + name + "=" + value);
                     }
                     /*
                     LOG.i("CordovaLog", "Found preference for %s=%s", name, value);
-                    Log.d("CordovaLog", "Found preference for " + name + "=" + value);
                      */
                 }
                 else if (strNode.equals("content")) {


[4/4] android commit: [CB-1108] Update config.xml template's list of available s

Posted by ag...@apache.org.
[CB-1108] Update config.xml template's list of available <preference>s


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

Branch: refs/heads/master
Commit: 27cd9dde38368e8eab7b84a20a1f21a595313853
Parents: 373da39
Author: Andrew Grieve <ag...@chromium.org>
Authored: Fri May 3 12:18:36 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Fri May 3 12:18:36 2013 -0400

----------------------------------------------------------------------
 framework/res/xml/config.xml |   32 ++++++++++++++++++++++++--------
 1 files changed, 24 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/27cd9dde/framework/res/xml/config.xml
----------------------------------------------------------------------
diff --git a/framework/res/xml/config.xml b/framework/res/xml/config.xml
index c915f0c..2fb16c4 100644
--- a/framework/res/xml/config.xml
+++ b/framework/res/xml/config.xml
@@ -1,4 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.
+-->
 <widget xmlns     = "http://www.w3.org/ns/widgets"
         id        = "io.cordova.helloCordova"
         version   = "2.0.0">
@@ -8,21 +23,23 @@
         A sample Apache Cordova application that responds to the deviceready event.
     </description>
 
-    <author href="http://cordova.io" email="callback-dev@incubator.apache.org">
+    <author href="http://cordova.io" email="dev@cordova.apache.org">
         Apache Cordova Team
     </author>
 
     <access origin="*"/>
- 
 
     <!-- <content src="http://mysite.com/myapp.html" /> for external pages -->
     <content src="index.html" />
 
-    <log level="DEBUG"/>
-
-    <!-- Preferences for Android -->
-    <preference name="useBrowserHistory" value="true" />
-    <preference name="exit-on-suspend" value="false" />
+    <preference name="loglevel" value="DEBUG" />
+    <!--
+      <preference name="splashscreen" value="resourceName" />
+      <preference name="backgroundColor" value="0xFFF" />
+      <preference name="loadUrlTimeoutValue" value="20000" />
+      <preference name="InAppBrowserStorageEnabled" value="true" />
+      <preference name="disallowOverscroll" value="true" />
+    -->
 
     <feature name="App">
       <param name="android-package" value="org.apache.cordova.App"/>
@@ -81,5 +98,4 @@
     <feature name="InAppBrowser">
       <param name="android-package" value="org.apache.cordova.InAppBrowser"/>
     </feature>
-         
 </widget>