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 2014/06/09 04:55:00 UTC

[01/18] android commit: CB-5652 make visible cordova version

Repository: cordova-android
Updated Branches:
  refs/heads/4.0.x d5e880775 -> 6abb9da88
  refs/heads/master 32e07c22d -> b40764104


CB-5652 make visible cordova version

Log the cordova version using version string from CordovaWebView.java

This closes #101


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

Branch: refs/heads/4.0.x
Commit: 1deefa48eef2a15c9929093a24b5717a5d4b7074
Parents: 50c4aef
Author: Martin Gonzalez <ma...@gmail.com>
Authored: Thu May 15 11:55:42 2014 -0500
Committer: Marcel Kinard <cm...@gmail.com>
Committed: Mon May 19 11:10:58 2014 -0400

----------------------------------------------------------------------
 framework/src/org/apache/cordova/CordovaActivity.java | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1deefa48/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 9f8b020..a2610c5 100755
--- a/framework/src/org/apache/cordova/CordovaActivity.java
+++ b/framework/src/org/apache/cordova/CordovaActivity.java
@@ -214,6 +214,7 @@ public class CordovaActivity extends Activity implements CordovaInterface {
     @Override
     public void onCreate(Bundle savedInstanceState) {
         Config.init(this);
+        LOG.i(TAG, "Apache Cordova native platform version " + appView.CORDOVA_VERSION + " is starting");
         LOG.d(TAG, "CordovaActivity.onCreate()");
         super.onCreate(savedInstanceState);
 


[08/18] android commit: CB-6784 Add missing licenses

Posted by ag...@apache.org.
CB-6784 Add missing licenses

for ./test/assets/www/cordova_plugins.js and ./test/res/xml/config.xml


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

Branch: refs/heads/4.0.x
Commit: 2661e010d90fc5a729c6679e6a81392702f9da59
Parents: 7687bec
Author: Marcel Kinard <cm...@gmail.com>
Authored: Fri May 30 15:10:54 2014 -0400
Committer: Marcel Kinard <cm...@gmail.com>
Committed: Fri May 30 15:10:54 2014 -0400

----------------------------------------------------------------------
 test/assets/www/cordova_plugins.js | 23 +++++++++++++++++++++--
 test/res/xml/config.xml            | 18 ++++++++++++++++++
 2 files changed, 39 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/2661e010/test/assets/www/cordova_plugins.js
----------------------------------------------------------------------
diff --git a/test/assets/www/cordova_plugins.js b/test/assets/www/cordova_plugins.js
index fbe1f44..ecad9f6 100644
--- a/test/assets/www/cordova_plugins.js
+++ b/test/assets/www/cordova_plugins.js
@@ -1,3 +1,22 @@
+/*
+ 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.define('cordova/plugin_list', function(require, exports, module) {
-module.exports = []
-});
\ No newline at end of file
+    module.exports = [];
+});

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/2661e010/test/res/xml/config.xml
----------------------------------------------------------------------
diff --git a/test/res/xml/config.xml b/test/res/xml/config.xml
index d4fd635..76172cb 100644
--- a/test/res/xml/config.xml
+++ b/test/res/xml/config.xml
@@ -1,4 +1,22 @@
 <?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.
+-->
 <widget id="io.cordova.helloCordova" version="2.0.0" xmlns="http://www.w3.org/ns/widgets">
     <name>Hello Cordova</name>
     <description>


[02/18] android commit: CB-6707 Update minSdkVersion to 10 consistently

Posted by ag...@apache.org.
CB-6707 Update minSdkVersion to 10 consistently

Update minSdkVersion in the AndroidManifest for the cordova.jar and the
test project.


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

Branch: refs/heads/4.0.x
Commit: 0b5bf0c0985ca2238b6739004de1d5b901dde516
Parents: 1deefa4
Author: Marcel Kinard <cm...@gmail.com>
Authored: Tue May 20 07:00:21 2014 -0400
Committer: Marcel Kinard <cm...@gmail.com>
Committed: Tue May 20 07:00:21 2014 -0400

----------------------------------------------------------------------
 framework/AndroidManifest.xml | 2 +-
 test/AndroidManifest.xml      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/0b5bf0c0/framework/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/framework/AndroidManifest.xml b/framework/AndroidManifest.xml
index 15a9702..6fbe1b4 100755
--- a/framework/AndroidManifest.xml
+++ b/framework/AndroidManifest.xml
@@ -19,5 +19,5 @@
 -->
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
       package="org.apache.cordova" android:versionName="1.0" android:versionCode="1">
-    <uses-sdk android:minSdkVersion="8" />
+    <uses-sdk android:minSdkVersion="10" />
 </manifest>

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/0b5bf0c0/test/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/test/AndroidManifest.xml b/test/AndroidManifest.xml
index 2f99b9a..0224702 100755
--- a/test/AndroidManifest.xml
+++ b/test/AndroidManifest.xml
@@ -45,7 +45,7 @@
     <uses-permission android:name="android.permission.GET_ACCOUNTS" />
     <uses-permission android:name="android.permission.BROADCAST_STICKY" />
    
-    <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="19"/>
+    <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19"/>
 
     <instrumentation
         android:name="android.test.InstrumentationTestRunner"


[07/18] android commit: CB-6784 Add license to CONTRIBUTING.md

Posted by ag...@apache.org.
CB-6784 Add license to CONTRIBUTING.md


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

Branch: refs/heads/4.0.x
Commit: 7687becfeeba8aa29cb24775140d32c7ebfe28ad
Parents: 1641f09
Author: Marcel Kinard <cm...@gmail.com>
Authored: Fri May 30 11:45:13 2014 -0400
Committer: Marcel Kinard <cm...@gmail.com>
Committed: Fri May 30 11:45:13 2014 -0400

----------------------------------------------------------------------
 CONTRIBUTING.md | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/7687becf/CONTRIBUTING.md
----------------------------------------------------------------------
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 1594d12..f7dbcab 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,3 +1,24 @@
+<!--
+#
+# 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.
+#
+-->
+
 # Contributing to Apache Cordova
 
 Anyone can contribute to Cordova. And we need your contributions.


[14/18] android commit: CB-6876 Fix the "print usage"

Posted by ag...@apache.org.
CB-6876 Fix the "print usage"


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

Branch: refs/heads/4.0.x
Commit: d427c52aacb974142e10677db1a43a184cfab80b
Parents: eb623a8
Author: Marcel Kinard <cm...@gmail.com>
Authored: Wed Jun 4 19:12:55 2014 -0400
Committer: Marcel Kinard <cm...@gmail.com>
Committed: Wed Jun 4 19:12:55 2014 -0400

----------------------------------------------------------------------
 bin/templates/cordova/lib/run.js | 2 +-
 bin/templates/cordova/run        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/d427c52a/bin/templates/cordova/lib/run.js
----------------------------------------------------------------------
diff --git a/bin/templates/cordova/lib/run.js b/bin/templates/cordova/lib/run.js
index dd67901..be7f5a2 100644
--- a/bin/templates/cordova/lib/run.js
+++ b/bin/templates/cordova/lib/run.js
@@ -125,7 +125,7 @@ var path  = require('path'),
     });
 }
 
-module.exports.help = function() {
+module.exports.help = function(args) {
     console.log('Usage: ' + path.relative(process.cwd(), args[0]) + ' [options]');
     console.log('Build options :');
     console.log('    --debug : Builds project in debug mode');

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/d427c52a/bin/templates/cordova/run
----------------------------------------------------------------------
diff --git a/bin/templates/cordova/run b/bin/templates/cordova/run
index d4e2c6c..8c6fe38 100755
--- a/bin/templates/cordova/run
+++ b/bin/templates/cordova/run
@@ -26,7 +26,7 @@ var run  = require('./lib/run'),
 // Support basic help commands
 if (args[2] == '--help' || args[2] == '/?' || args[2] == '-h' ||
                     args[2] == 'help' || args[2] == '-help' || args[2] == '/help') {
-    run.help();
+    run.help(args);
 } else {
     reqs.run().done(function() {
         return run.run(args);


[12/18] android commit: CB-6818: I want to remove this code, because Square didn't do their headers properly

Posted by ag...@apache.org.
CB-6818: I want to remove this code, because Square didn't do their headers properly


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

Branch: refs/heads/4.0.x
Commit: 07290277bad83605aba2e72ab86f92d3f2b2d74d
Parents: 7435412
Author: Joe Bowser <bo...@apache.org>
Authored: Tue Jun 3 15:21:46 2014 -0700
Committer: Joe Bowser <bo...@apache.org>
Committed: Tue Jun 3 15:22:10 2014 -0700

----------------------------------------------------------------------
 .../squareup/okhttp/internal/spdy/ErrorCode.java    | 16 ++++++++++++++++
 .../com/squareup/okhttp/internal/spdy/Hpack.java    | 16 ++++++++++++++++
 .../okhttp/internal/spdy/NameValueBlockReader.java  | 16 ++++++++++++++++
 3 files changed, 48 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/07290277/framework/src/com/squareup/okhttp/internal/spdy/ErrorCode.java
----------------------------------------------------------------------
diff --git a/framework/src/com/squareup/okhttp/internal/spdy/ErrorCode.java b/framework/src/com/squareup/okhttp/internal/spdy/ErrorCode.java
index d3a32e1..9394b69 100755
--- a/framework/src/com/squareup/okhttp/internal/spdy/ErrorCode.java
+++ b/framework/src/com/squareup/okhttp/internal/spdy/ErrorCode.java
@@ -1,3 +1,19 @@
+/*
+ * Copyright (C) 2012 Square, Inc.
+ *
+ * Licensed 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.
+ */
+
 package com.squareup.okhttp.internal.spdy;
 
 public enum ErrorCode {

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/07290277/framework/src/com/squareup/okhttp/internal/spdy/Hpack.java
----------------------------------------------------------------------
diff --git a/framework/src/com/squareup/okhttp/internal/spdy/Hpack.java b/framework/src/com/squareup/okhttp/internal/spdy/Hpack.java
index c3ca8f1..9eaeebd 100755
--- a/framework/src/com/squareup/okhttp/internal/spdy/Hpack.java
+++ b/framework/src/com/squareup/okhttp/internal/spdy/Hpack.java
@@ -1,3 +1,19 @@
+/*
+ * Copyright (C) 2012 Square, Inc.
+ *
+ * Licensed 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.
+ */
+
 package com.squareup.okhttp.internal.spdy;
 
 import java.io.DataInputStream;

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/07290277/framework/src/com/squareup/okhttp/internal/spdy/NameValueBlockReader.java
----------------------------------------------------------------------
diff --git a/framework/src/com/squareup/okhttp/internal/spdy/NameValueBlockReader.java b/framework/src/com/squareup/okhttp/internal/spdy/NameValueBlockReader.java
index b95d013..b731a6d 100755
--- a/framework/src/com/squareup/okhttp/internal/spdy/NameValueBlockReader.java
+++ b/framework/src/com/squareup/okhttp/internal/spdy/NameValueBlockReader.java
@@ -1,3 +1,19 @@
+/*
+ * Copyright (C) 2012 Square, Inc.
+ *
+ * Licensed 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.
+ */
+
 package com.squareup.okhttp.internal.spdy;
 
 import com.squareup.okhttp.internal.Util;


[06/18] android commit: Revert "defaults.xml: Add AndroidLaunchMode preference"

Posted by ag...@apache.org.
Revert "defaults.xml: Add AndroidLaunchMode preference"

This reverts commit 11fc6be32871c3e6ce5159d34c99665cd7d05de5.


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

Branch: refs/heads/4.0.x
Commit: 1641f09dc9ff328e89f930381071b38795e99550
Parents: 1505673
Author: Michal Mocny <mm...@gmail.com>
Authored: Thu May 29 14:35:29 2014 -0400
Committer: Michal Mocny <mm...@gmail.com>
Committed: Thu May 29 14:50:01 2014 -0400

----------------------------------------------------------------------
 bin/templates/cordova/defaults.xml | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1641f09d/bin/templates/cordova/defaults.xml
----------------------------------------------------------------------
diff --git a/bin/templates/cordova/defaults.xml b/bin/templates/cordova/defaults.xml
index 25a878b..1654c13 100644
--- a/bin/templates/cordova/defaults.xml
+++ b/bin/templates/cordova/defaults.xml
@@ -23,7 +23,6 @@
 
     <!-- Preferences for Android -->
     <preference name="loglevel" value="DEBUG" />
-    <preference name="AndroidLaunchMode" value="singleTop" />
 
     <!-- This is required for native Android hooks -->
     <feature name="App">


[10/18] android commit: Remove +x from README.md

Posted by ag...@apache.org.
Remove +x from README.md


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

Branch: refs/heads/4.0.x
Commit: 36e9fb292b17ac104c2967ee1925b17215e66c3f
Parents: 2661e01
Author: Andrew Grieve <ag...@chromium.org>
Authored: Tue Jun 3 15:28:35 2014 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Tue Jun 3 15:29:06 2014 -0400

----------------------------------------------------------------------
 README.md | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/36e9fb29/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
old mode 100755
new mode 100644


[04/18] android commit: CB-6315: Wrapping this so it runs on the UI thread

Posted by ag...@apache.org.
CB-6315: Wrapping this so it runs on the UI thread


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

Branch: refs/heads/4.0.x
Commit: 629e05b7b1c93108bcdb992f9e7f22656b43cff9
Parents: e98f6ae
Author: Joe Bowser <bo...@apache.org>
Authored: Thu May 22 12:00:11 2014 -0700
Committer: Joe Bowser <bo...@apache.org>
Committed: Thu May 22 12:00:42 2014 -0700

----------------------------------------------------------------------
 framework/src/org/apache/cordova/App.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/629e05b7/framework/src/org/apache/cordova/App.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/App.java b/framework/src/org/apache/cordova/App.java
index ead99bc..4b15906 100755
--- a/framework/src/org/apache/cordova/App.java
+++ b/framework/src/org/apache/cordova/App.java
@@ -190,7 +190,11 @@ public class App extends CordovaPlugin {
      * Clear page history for the app.
      */
     public void clearHistory() {
-        this.webView.clearHistory();
+        cordova.getActivity().runOnUiThread(new Runnable() {
+            public void run() {
+                webView.clearHistory();
+            }
+        });
     }
 
     /**


[13/18] android commit: Trivial spelling fix in comments when reading CordovaResourceApi

Posted by ag...@apache.org.
Trivial spelling fix in comments when reading CordovaResourceApi


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

Branch: refs/heads/4.0.x
Commit: eb623a84d517327e62ed21e8a938af6ed279ac85
Parents: 0729027
Author: Joe Bowser <bo...@apache.org>
Authored: Wed Jun 4 11:13:37 2014 -0700
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Jun 4 11:13:37 2014 -0700

----------------------------------------------------------------------
 framework/src/org/apache/cordova/CordovaResourceApi.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/eb623a84/framework/src/org/apache/cordova/CordovaResourceApi.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaResourceApi.java b/framework/src/org/apache/cordova/CordovaResourceApi.java
index f1770fd..d27eeb1 100644
--- a/framework/src/org/apache/cordova/CordovaResourceApi.java
+++ b/framework/src/org/apache/cordova/CordovaResourceApi.java
@@ -106,6 +106,7 @@ public class CordovaResourceApi {
         return threadCheckingEnabled;
     }
     
+    
     public static int getUriType(Uri uri) {
         assertNonRelative(uri);
         String scheme = uri.getScheme();
@@ -199,6 +200,8 @@ public class CordovaResourceApi {
         return null;
     }
     
+    
+    //This already exists
     private String getMimeTypeFromPath(String path) {
         String extension = path;
         int lastDot = extension.lastIndexOf('.');
@@ -217,7 +220,7 @@ public class CordovaResourceApi {
     }
     
     /**
-     * Opens a stream to the givne URI, also providing the MIME type & length.
+     * Opens a stream to the given URI, also providing the MIME type & length.
      * @return Never returns null.
      * @throws Throws an InvalidArgumentException for relative URIs. Relative URIs should be
      *     resolved before being passed into this function.
@@ -229,7 +232,7 @@ public class CordovaResourceApi {
     }
 
     /**
-     * Opens a stream to the givne URI, also providing the MIME type & length.
+     * Opens a stream to the given URI, also providing the MIME type & length.
      * @return Never returns null.
      * @throws Throws an InvalidArgumentException for relative URIs. Relative URIs should be
      *     resolved before being passed into this function.


[09/18] android commit: Add a comment to custom_rules.xml saying why we move AndroidManifest.xml

Posted by ag...@apache.org.
Add a comment to custom_rules.xml saying why we move AndroidManifest.xml


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

Branch: refs/heads/4.0.x
Commit: 94de0a7ce2a233cbadcff3489398b0e1bce0538c
Parents: 36e9fb2
Author: Andrew Grieve <ag...@chromium.org>
Authored: Tue Jun 3 15:28:45 2014 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Tue Jun 3 15:29:06 2014 -0400

----------------------------------------------------------------------
 bin/templates/project/custom_rules.xml | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/94de0a7c/bin/templates/project/custom_rules.xml
----------------------------------------------------------------------
diff --git a/bin/templates/project/custom_rules.xml b/bin/templates/project/custom_rules.xml
index 4b20e22..66483d3 100644
--- a/bin/templates/project/custom_rules.xml
+++ b/bin/templates/project/custom_rules.xml
@@ -13,6 +13,7 @@
         </path>
         <echo message="Set jars path to: ${toString:project.all.jars.path}"/>
     </target>
+    <!-- Rename AndroidManifest.xml so that Eclipse's import wizard doesn't detect ant-build as a project -->
     <target name="-post-build">
         <move file="ant-build/AndroidManifest.xml" tofile="ant-build/AndroidManifest.cordova.xml" failonerror="false" overwrite="true" />
         <move file="CordovaLib/ant-build/AndroidManifest.xml" tofile="CordovaLib/ant-build/AndroidManifest.cordova.xml" failonerror="false" overwrite="true" />


[11/18] android commit: CB-6860 Add activity_name and launcher_name to AndroidManifest.xml & strings.xml

Posted by ag...@apache.org.
CB-6860 Add activity_name and launcher_name to AndroidManifest.xml & strings.xml


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

Branch: refs/heads/4.0.x
Commit: 743541218ff960ca542c53a4883b1866cec5ebd4
Parents: 94de0a7
Author: Andrew Grieve <ag...@chromium.org>
Authored: Tue Jun 3 16:08:35 2014 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Tue Jun 3 16:08:35 2014 -0400

----------------------------------------------------------------------
 bin/templates/project/AndroidManifest.xml    | 8 +++++---
 bin/templates/project/res/values/strings.xml | 5 +++++
 2 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/74354121/bin/templates/project/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/bin/templates/project/AndroidManifest.xml b/bin/templates/project/AndroidManifest.xml
index b031b60..315a4dd 100644
--- a/bin/templates/project/AndroidManifest.xml
+++ b/bin/templates/project/AndroidManifest.xml
@@ -32,10 +32,12 @@
 
     <application android:icon="@drawable/icon" android:label="@string/app_name"
         android:hardwareAccelerated="true">
-        <activity android:name="__ACTIVITY__" android:label="@string/app_name" android:launchMode="singleTop"
+        <activity android:name="__ACTIVITY__"
+                android:label="@string/activity_name"
+                android:launchMode="singleTop"
                 android:theme="@android:style/Theme.Black.NoTitleBar"
                 android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale">
-            <intent-filter>
+            <intent-filter android:label="@string/launcher_name">
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
@@ -43,4 +45,4 @@
     </application>
 
     <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="__APILEVEL__"/>
-</manifest> 
+</manifest>

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/74354121/bin/templates/project/res/values/strings.xml
----------------------------------------------------------------------
diff --git a/bin/templates/project/res/values/strings.xml b/bin/templates/project/res/values/strings.xml
index e8ed749..bb049db 100644
--- a/bin/templates/project/res/values/strings.xml
+++ b/bin/templates/project/res/values/strings.xml
@@ -1,4 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
+    <!-- App label shown within list of installed apps, battery & network usage screens. -->
     <string name="app_name">__NAME__</string>
+    <!-- App label shown on the launcher. -->
+    <string name="launcher_name">@string/app_name</string>
+    <!-- App label shown on the task switcher. -->
+    <string name="activity_name">@string/launcher_name</string>
 </resources>


[17/18] android commit: CB-6851 Deprecate WebView.sendJavascript()

Posted by ag...@apache.org.
CB-6851 Deprecate WebView.sendJavascript()


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

Branch: refs/heads/master
Commit: b40764104958e5b8a4c7ef19ae98d3a83be17810
Parents: 32e07c2
Author: Andrew Grieve <ag...@chromium.org>
Authored: Sun Jun 8 22:47:41 2014 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Sun Jun 8 22:47:41 2014 -0400

----------------------------------------------------------------------
 .../src/org/apache/cordova/CordovaWebView.java  | 21 +++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/b4076410/framework/src/org/apache/cordova/CordovaWebView.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaWebView.java b/framework/src/org/apache/cordova/CordovaWebView.java
index 9e98ac6..bb51a7a 100755
--- a/framework/src/org/apache/cordova/CordovaWebView.java
+++ b/framework/src/org/apache/cordova/CordovaWebView.java
@@ -557,10 +557,25 @@ public class CordovaWebView extends WebView {
     
     /**
      * Send JavaScript statement back to JavaScript.
-     * (This is a convenience method)
-     *
-     * @param statement
+     * Deprecated (https://issues.apache.org/jira/browse/CB-6851)
+     * Instead of executing snippets of JS, you should use the exec bridge
+     * to create a Java->JS communication channel.
+     * To do this:
+     * 1. Within plugin.xml (to have your JS run before deviceready):
+     *    <js-module><runs/></js-module>
+     * 2. Within your .js (call exec on start-up):
+     *    require('cordova/channel').onCordovaReady.subscribe(function() {
+     *      require('cordova/exec')(win, null, 'Plugin', 'method', []);
+     *      function win(message) {
+     *        ... process message from java here ...
+     *      }
+     *    });
+     * 3. Within your .java:
+     *    PluginResult dataResult = new PluginResult(PluginResult.Status.OK, CODE);
+     *    dataResult.setKeepCallback(true);
+     *    savedCallbackContext.sendPluginResult(dataResult);
      */
+    @Deprecated
     public void sendJavascript(String statement) {
         this.jsMessageQueue.addJavaScript(statement);
     }


[15/18] android commit: CB-6876 Show the correct executable name

Posted by ag...@apache.org.
CB-6876 Show the correct executable name


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

Branch: refs/heads/4.0.x
Commit: 32e07c22d07ae659d1ba9092effae73395824ab4
Parents: d427c52
Author: Marcel Kinard <cm...@gmail.com>
Authored: Wed Jun 4 19:23:43 2014 -0400
Committer: Marcel Kinard <cm...@gmail.com>
Committed: Wed Jun 4 19:23:43 2014 -0400

----------------------------------------------------------------------
 bin/templates/cordova/lib/run.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/32e07c22/bin/templates/cordova/lib/run.js
----------------------------------------------------------------------
diff --git a/bin/templates/cordova/lib/run.js b/bin/templates/cordova/lib/run.js
index be7f5a2..da8fc60 100644
--- a/bin/templates/cordova/lib/run.js
+++ b/bin/templates/cordova/lib/run.js
@@ -126,7 +126,7 @@ var path  = require('path'),
 }
 
 module.exports.help = function(args) {
-    console.log('Usage: ' + path.relative(process.cwd(), args[0]) + ' [options]');
+    console.log('Usage: ' + path.relative(process.cwd(), args[1]) + ' [options]');
     console.log('Build options :');
     console.log('    --debug : Builds project in debug mode');
     console.log('    --release : Builds project in release mode');


[16/18] android commit: CB-6851 Deprecate WebView.sendJavascript()

Posted by ag...@apache.org.
CB-6851 Deprecate WebView.sendJavascript()


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

Branch: refs/heads/4.0.x
Commit: b40764104958e5b8a4c7ef19ae98d3a83be17810
Parents: 32e07c2
Author: Andrew Grieve <ag...@chromium.org>
Authored: Sun Jun 8 22:47:41 2014 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Sun Jun 8 22:47:41 2014 -0400

----------------------------------------------------------------------
 .../src/org/apache/cordova/CordovaWebView.java  | 21 +++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/b4076410/framework/src/org/apache/cordova/CordovaWebView.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaWebView.java b/framework/src/org/apache/cordova/CordovaWebView.java
index 9e98ac6..bb51a7a 100755
--- a/framework/src/org/apache/cordova/CordovaWebView.java
+++ b/framework/src/org/apache/cordova/CordovaWebView.java
@@ -557,10 +557,25 @@ public class CordovaWebView extends WebView {
     
     /**
      * Send JavaScript statement back to JavaScript.
-     * (This is a convenience method)
-     *
-     * @param statement
+     * Deprecated (https://issues.apache.org/jira/browse/CB-6851)
+     * Instead of executing snippets of JS, you should use the exec bridge
+     * to create a Java->JS communication channel.
+     * To do this:
+     * 1. Within plugin.xml (to have your JS run before deviceready):
+     *    <js-module><runs/></js-module>
+     * 2. Within your .js (call exec on start-up):
+     *    require('cordova/channel').onCordovaReady.subscribe(function() {
+     *      require('cordova/exec')(win, null, 'Plugin', 'method', []);
+     *      function win(message) {
+     *        ... process message from java here ...
+     *      }
+     *    });
+     * 3. Within your .java:
+     *    PluginResult dataResult = new PluginResult(PluginResult.Status.OK, CODE);
+     *    dataResult.setKeepCallback(true);
+     *    savedCallbackContext.sendPluginResult(dataResult);
      */
+    @Deprecated
     public void sendJavascript(String statement) {
         this.jsMessageQueue.addJavaScript(statement);
     }


[05/18] android commit: updated RELEASENOTES

Posted by ag...@apache.org.
updated RELEASENOTES


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

Branch: refs/heads/4.0.x
Commit: 15056733932154c86e51739c2352a890b7d9dad1
Parents: 629e05b
Author: Steven Gill <st...@gmail.com>
Authored: Tue May 27 14:11:37 2014 -0700
Committer: Steven Gill <st...@gmail.com>
Committed: Tue May 27 14:12:16 2014 -0700

----------------------------------------------------------------------
 RELEASENOTES.md | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/15056733/RELEASENOTES.md
----------------------------------------------------------------------
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index 09b3d5d..d8e467b 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -20,6 +20,40 @@
 -->
 ## Release Notes for Cordova (Android) ##
 
+### 3.5.0 (May 2014) ###
+
+* OkHttp has broken headers. Updating for ASF compliance.
+* Revert accidentally removed lines from NOTICE
+* CB-6552: added top level package.json
+* CB-6491 add CONTRIBUTING.md
+* CB-6543 Fix cordova/run failure when no custom_rules.xml available
+* defaults.xml: Add AndroidLaunchMode preference
+* Add JavaDoc for CordovaResourceApi
+* CB-6388: Handle binary data correctly in LOAD_URL bridge
+* Fix CB-6048: Set launchMode=singleTop so tapping app icon does not always restart app
+* Remove incorrect usage of AlertDialog.Builder.create
+* Catch uncaught exceptions in from plugins and turn them into error responses.
+* Add NOTICE file
+* CB-6047 Fix online sometimes getting in a bad state on page transitions.
+* Add another convenience overload for CordovaResourceApi.copyResource
+* Update framework's .classpath to what Eclipse wants it to be.
+* README.md: `android update` to `android-19`.
+* Fix NPE when POLLING bridge mode is used.
+* Updating NOTICE to include Square for OkHttp
+* CB-5398 Apply KitKat content URI fix to all content URIs
+* CB-5398 Work-around for KitKat content: URLs not rendering in <img> tags
+* CB-5908: add splascreen images to template
+* CB-5395: Make scheme and host (but not path) case-insensitive in whitelist
+* Ignore multiple onPageFinished() callbacks & onReceivedError due to stopLoading()
+* Removing addJavascriptInterface support from all Android versions lower than 4.2 due to security vu
+* CB-4984 Don't create on CordovaActivity name
+* CB-5917 Add a loadUrlIntoView overload that doesn't recreate plugins.
+* Use thread pool for load timeout.
+* CB-5715 For CLI, hide assets/www and res/xml/config.xml by default
+* CB-5793 ant builds: Rename AndroidManifest during -post-build to avoid Eclipse detecting ant-build/
+* CB-5889 Make update script find project name instead of using "null" for CordovaLib
+* CB-5889 Add a message in the update script about needing to import CordovaLib when using an IDE.
+
 ### 3.4.0 (Feb 2014) ###
 
 43 commits from 10 authors. Highlights include:


[18/18] android commit: Merge branch 'master' into 4.0.x

Posted by ag...@apache.org.
Merge branch 'master' into 4.0.x

Conflicts:
	bin/templates/project/custom_rules.xml
	framework/src/org/apache/cordova/CordovaWebView.java
	test/src/org/apache/cordova/test/junit/MessageTest.java


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

Branch: refs/heads/4.0.x
Commit: 6abb9da88a3cbeb37c911397941b677c96533f5c
Parents: d5e8807 b407641
Author: Andrew Grieve <ag...@chromium.org>
Authored: Sun Jun 8 22:54:21 2014 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Sun Jun 8 22:54:21 2014 -0400

----------------------------------------------------------------------
 CONTRIBUTING.md                                 | 21 ++++++++++++
 README.md                                       |  0
 RELEASENOTES.md                                 | 34 ++++++++++++++++++++
 bin/templates/cordova/defaults.xml              |  1 -
 bin/templates/cordova/lib/run.js                |  4 +--
 bin/templates/cordova/run                       |  2 +-
 bin/templates/project/AndroidManifest.xml       |  8 +++--
 bin/templates/project/res/values/strings.xml    |  5 +++
 .../okhttp/internal/spdy/ErrorCode.java         | 16 +++++++++
 .../squareup/okhttp/internal/spdy/Hpack.java    | 16 +++++++++
 .../internal/spdy/NameValueBlockReader.java     | 16 +++++++++
 .../org/apache/cordova/CordovaResourceApi.java  |  7 ++--
 .../src/org/apache/cordova/CordovaWebView.java  | 24 ++++++++++++++
 test/assets/www/cordova_plugins.js              | 23 +++++++++++--
 test/res/xml/config.xml                         | 18 +++++++++++
 15 files changed, 184 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/6abb9da8/bin/templates/project/AndroidManifest.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/6abb9da8/framework/src/org/apache/cordova/CordovaResourceApi.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/6abb9da8/framework/src/org/apache/cordova/CordovaWebView.java
----------------------------------------------------------------------
diff --cc framework/src/org/apache/cordova/CordovaWebView.java
index 9ff1e5a,bb51a7a..6f3240a
mode 100644,100755..100644
--- a/framework/src/org/apache/cordova/CordovaWebView.java
+++ b/framework/src/org/apache/cordova/CordovaWebView.java
@@@ -1,134 -1,1022 +1,158 @@@
 -/*
 -       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.
 -*/
 -
  package org.apache.cordova;
  
 -import java.lang.reflect.InvocationTargetException;
 -import java.lang.reflect.Method;
 -import java.util.ArrayList;
  import java.util.HashMap;
 -import java.util.Locale;
  
 -import org.apache.cordova.Config;
 -import org.apache.cordova.CordovaInterface;
 -import org.apache.cordova.LOG;
 -import org.apache.cordova.PluginManager;
 -import org.apache.cordova.PluginResult;
 +import org.json.JSONException;
  
 -import android.annotation.SuppressLint;
 -import android.annotation.TargetApi;
 -import android.content.BroadcastReceiver;
  import android.content.Context;
  import android.content.Intent;
 -import android.content.IntentFilter;
 -import android.content.pm.ApplicationInfo;
 -import android.content.pm.PackageManager;
 -import android.content.pm.PackageManager.NameNotFoundException;
 -import android.net.Uri;
 -import android.os.Build;
 -import android.os.Bundle;
 -import android.util.AttributeSet;
 -import android.util.Log;
 -import android.view.Gravity;
  import android.view.KeyEvent;
  import android.view.View;
 -import android.view.ViewGroup;
 -import android.view.WindowManager;
 -import android.view.inputmethod.InputMethodManager;
 -import android.webkit.WebBackForwardList;
 -import android.webkit.WebHistoryItem;
 -import android.webkit.WebChromeClient;
 -import android.webkit.WebSettings;
 -import android.webkit.WebView;
 -import android.webkit.WebSettings.LayoutAlgorithm;
 -import android.widget.FrameLayout;
 -
 -/*
 - * This class is our web view.
 - *
 - * @see <a href="http://developer.android.com/guide/webapps/webview.html">WebView guide</a>
 - * @see <a href="http://developer.android.com/reference/android/webkit/WebView.html">WebView</a>
 - */
 -public class CordovaWebView extends WebView {
 +import android.webkit.WebChromeClient.CustomViewCallback;
 +import android.widget.LinearLayout.LayoutParams;
  
 -    public static final String TAG = "CordovaWebView";
 -    public static final String CORDOVA_VERSION = "3.6.0-dev";
 +public interface CordovaWebView {
  
 -    private ArrayList<Integer> keyDownCodes = new ArrayList<Integer>();
 -    private ArrayList<Integer> keyUpCodes = new ArrayList<Integer>();
 +    String OVER_SCROLL_NEVER = null;
 +    Object pluginManager = null;
 +    Object jsMessageQueue = null;
  
 -    public PluginManager pluginManager;
 -    private boolean paused;
 +    public static final String TAG = "CordovaWebView";
 +    public static final String CORDOVA_VERSION = "4.0.0-dev";
  
 -    private BroadcastReceiver receiver;
 +    View getView();
  
 +    CordovaWebViewClient makeWebViewClient();
  
 -    /** Activities and other important classes **/
 -    private CordovaInterface cordova;
 -    CordovaWebViewClient viewClient;
 -    @SuppressWarnings("unused")
 -    private CordovaChromeClient chromeClient;
 +    CordovaChromeClient makeWebChromeClient();
  
 -    private String url;
 +    void setWebViewClient(CordovaWebViewClient webViewClient);
  
 -    // Flag to track that a loadUrl timeout occurred
 -    int loadUrlTimeout = 0;
 +    void setWebChromeClient(CordovaChromeClient webChromeClient);
  
 -    private boolean bound;
 +    void setId(int i);
  
 -    private boolean handleButton = false;
 -    
 -    private long lastMenuEventTime = 0;
 +    void setLayoutParams(LayoutParams layoutParams);
  
 -    NativeToJsMessageQueue jsMessageQueue;
 -    ExposedJsApi exposedJsApi;
 +    void setVisibility(int invisible);
  
 -    /** custom view created by the browser (a video player for example) */
 -    private View mCustomView;
 -    private WebChromeClient.CustomViewCallback mCustomViewCallback;
 +    Object getParent();
  
 -    private ActivityResult mResult = null;
 +    void loadUrl(String url);
  
 -    private CordovaResourceApi resourceApi;
 +    void loadUrl(String url, int splashscreenTime);
  
 -    class ActivityResult {
 -        
 -        int request;
 -        int result;
 -        Intent incoming;
 -        
 -        public ActivityResult(int req, int res, Intent intent) {
 -            request = req;
 -            result = res;
 -            incoming = intent;
 -        }
 +    void loadUrlNow(String url);
  
 -        
 -    }
 -    
 -    static final FrameLayout.LayoutParams COVER_SCREEN_GRAVITY_CENTER =
 -            new FrameLayout.LayoutParams(
 -            ViewGroup.LayoutParams.MATCH_PARENT,
 -            ViewGroup.LayoutParams.MATCH_PARENT,
 -            Gravity.CENTER);
 -    
 -    /**
 -     * Constructor.
 -     *
 -     * @param context
 -     */
 -    public CordovaWebView(Context context) {
 -        super(context);
 -        if (CordovaInterface.class.isInstance(context))
 -        {
 -            this.cordova = (CordovaInterface) context;
 -        }
 -        else
 -        {
 -            Log.d(TAG, "Your activity must implement CordovaInterface to work");
 -        }
 -        this.loadConfiguration();
 -        this.setup();
 -    }
 +    void loadUrlIntoView(final String url);
  
 -    /**
 -     * Constructor.
 -     *
 -     * @param context
 -     * @param attrs
 -     */
 -    public CordovaWebView(Context context, AttributeSet attrs) {
 -        super(context, attrs);
 -        if (CordovaInterface.class.isInstance(context))
 -        {
 -            this.cordova = (CordovaInterface) context;
 -        }
 -        else
 -        {
 -            Log.d(TAG, "Your activity must implement CordovaInterface to work");
 -        }
 -        this.setWebChromeClient(new CordovaChromeClient(this.cordova, this));
 -        this.initWebViewClient(this.cordova);
 -        this.loadConfiguration();
 -        this.setup();
 -    }
 +    void loadUrlIntoView(final String url, boolean recreatePlugins);
  
 -    /**
 -     * Constructor.
 -     *
 -     * @param context
 -     * @param attrs
 -     * @param defStyle
 -     *
 -     */
 -    public CordovaWebView(Context context, AttributeSet attrs, int defStyle) {
 -        super(context, attrs, defStyle);
 -        if (CordovaInterface.class.isInstance(context))
 -        {
 -            this.cordova = (CordovaInterface) context;
 -        }
 -        else
 -        {
 -            Log.d(TAG, "Your activity must implement CordovaInterface to work");
 -        }
 -        this.setWebChromeClient(new CordovaChromeClient(this.cordova, this));
 -        this.loadConfiguration();
 -        this.setup();
 -    }
 +    void loadUrlIntoView(final String url, final int splashscreenTime);
  
 -    /**
 -     * Constructor.
 -     *
 -     * @param context
 -     * @param attrs
 -     * @param defStyle
 -     * @param privateBrowsing
 -     */
 -    @TargetApi(11)
 -    public CordovaWebView(Context context, AttributeSet attrs, int defStyle, boolean privateBrowsing) {
 -        super(context, attrs, defStyle, privateBrowsing);
 -        if (CordovaInterface.class.isInstance(context))
 -        {
 -            this.cordova = (CordovaInterface) context;
 -        }
 -        else
 -        {
 -            Log.d(TAG, "Your activity must implement CordovaInterface to work");
 -        }
 -        this.setWebChromeClient(new CordovaChromeClient(this.cordova));
 -        this.initWebViewClient(this.cordova);
 -        this.loadConfiguration();
 -        this.setup();
 -    }
 +    void stopLoading();
  
 -    /**
 -     * set the WebViewClient, but provide special case handling for IceCreamSandwich.
 -     */
 -    private void initWebViewClient(CordovaInterface cordova) {
 -        if(android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.HONEYCOMB ||
 -                android.os.Build.VERSION.SDK_INT > android.os.Build.VERSION_CODES.JELLY_BEAN_MR1)
 -        {
 -            this.setWebViewClient(new CordovaWebViewClient(this.cordova, this));
 -        }
 -        else
 -        {
 -            this.setWebViewClient(new IceCreamCordovaWebViewClient(this.cordova, this));
 -        }
 -    }
 +    boolean canGoBack();
  
 -    /**
 -     * Initialize webview.
 -     */
 -    @SuppressWarnings("deprecation")
 -    @SuppressLint("NewApi")
 -    private void setup() {
 -        this.setInitialScale(0);
 -        this.setVerticalScrollBarEnabled(false);
 -        if (shouldRequestFocusOnInit()) {
 -			this.requestFocusFromTouch();
 -		}
 -		// Enable JavaScript
 -        WebSettings settings = this.getSettings();
 -        settings.setJavaScriptEnabled(true);
 -        settings.setJavaScriptCanOpenWindowsAutomatically(true);
 -        settings.setLayoutAlgorithm(LayoutAlgorithm.NORMAL);
 -        
 -        // Set the nav dump for HTC 2.x devices (disabling for ICS, deprecated entirely for Jellybean 4.2)
 -        try {
 -            Method gingerbread_getMethod =  WebSettings.class.getMethod("setNavDump", new Class[] { boolean.class });
 -            
 -            String manufacturer = android.os.Build.MANUFACTURER;
 -            Log.d(TAG, "CordovaWebView is running on device made by: " + manufacturer);
 -            if(android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.HONEYCOMB &&
 -                    android.os.Build.MANUFACTURER.contains("HTC"))
 -            {
 -                gingerbread_getMethod.invoke(settings, true);
 -            }
 -        } catch (NoSuchMethodException e) {
 -            Log.d(TAG, "We are on a modern version of Android, we will deprecate HTC 2.3 devices in 2.8");
 -        } catch (IllegalArgumentException e) {
 -            Log.d(TAG, "Doing the NavDump failed with bad arguments");
 -        } catch (IllegalAccessException e) {
 -            Log.d(TAG, "This should never happen: IllegalAccessException means this isn't Android anymore");
 -        } catch (InvocationTargetException e) {
 -            Log.d(TAG, "This should never happen: InvocationTargetException means this isn't Android anymore.");
 -        }
 -
 -        //We don't save any form data in the application
 -        settings.setSaveFormData(false);
 -        settings.setSavePassword(false);
 -        
 -        // Jellybean rightfully tried to lock this down. Too bad they didn't give us a whitelist
 -        // while we do this
 -        if (android.os.Build.VERSION.SDK_INT > android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1)
 -            Level16Apis.enableUniversalAccess(settings);
 -        // Enable database
 -        // We keep this disabled because we use or shim to get around DOM_EXCEPTION_ERROR_16
 -        String databasePath = this.cordova.getActivity().getApplicationContext().getDir("database", Context.MODE_PRIVATE).getPath();
 -        settings.setDatabaseEnabled(true);
 -        settings.setDatabasePath(databasePath);
 -        
 -        
 -        //Determine whether we're in debug or release mode, and turn on Debugging!
 -        try {
 -            final String packageName = this.cordova.getActivity().getPackageName();
 -            final PackageManager pm = this.cordova.getActivity().getPackageManager();
 -            ApplicationInfo appInfo;
 -            
 -            appInfo = pm.getApplicationInfo(packageName, PackageManager.GET_META_DATA);
 -            
 -            if((appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0 &&  
 -                android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT)
 -            {
 -                setWebContentsDebuggingEnabled(true);
 -            }
 -        } catch (IllegalArgumentException e) {
 -            Log.d(TAG, "You have one job! To turn on Remote Web Debugging! YOU HAVE FAILED! ");
 -            e.printStackTrace();
 -        } catch (NameNotFoundException e) {
 -            Log.d(TAG, "This should never happen: Your application's package can't be found.");
 -            e.printStackTrace();
 -        }  
 -        
 -        settings.setGeolocationDatabasePath(databasePath);
 -
 -        // Enable DOM storage
 -        settings.setDomStorageEnabled(true);
 -
 -        // Enable built-in geolocation
 -        settings.setGeolocationEnabled(true);
 -        
 -        // Enable AppCache
 -        // Fix for CB-2282
 -        settings.setAppCacheMaxSize(5 * 1048576);
 -        String pathToCache = this.cordova.getActivity().getApplicationContext().getDir("database", Context.MODE_PRIVATE).getPath();
 -        settings.setAppCachePath(pathToCache);
 -        settings.setAppCacheEnabled(true);
 -        
 -        // Fix for CB-1405
 -        // Google issue 4641
 -        this.updateUserAgentString();
 -        
 -        IntentFilter intentFilter = new IntentFilter();
 -        intentFilter.addAction(Intent.ACTION_CONFIGURATION_CHANGED);
 -        if (this.receiver == null) {
 -            this.receiver = new BroadcastReceiver() {
 -                @Override
 -                public void onReceive(Context context, Intent intent) {
 -                    updateUserAgentString();
 -                }
 -            };
 -            this.cordova.getActivity().registerReceiver(this.receiver, intentFilter);
 -        }
 -        // end CB-1405
 -
 -        pluginManager = new PluginManager(this, this.cordova);
 -        jsMessageQueue = new NativeToJsMessageQueue(this, cordova);
 -        exposedJsApi = new ExposedJsApi(pluginManager, jsMessageQueue);
 -        resourceApi = new CordovaResourceApi(this.getContext(), pluginManager);
 -        exposeJsInterface();
 -    }
 -
 -	/**
 -	 * Override this method to decide whether or not you need to request the
 -	 * focus when your application start
 -	 * 
 -	 * @return true unless this method is overriden to return a different value
 -	 */
 -    protected boolean shouldRequestFocusOnInit() {
 -		return true;
 -	}
 -
 -	private void updateUserAgentString() {
 -        this.getSettings().getUserAgentString();
 -    }
 -
 -    private void exposeJsInterface() {
 -        int SDK_INT = Build.VERSION.SDK_INT;
 -        if ((SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1)) {
 -            Log.i(TAG, "Disabled addJavascriptInterface() bridge since Android version is old.");
 -            // Bug being that Java Strings do not get converted to JS strings automatically.
 -            // This isn't hard to work-around on the JS side, but it's easier to just
 -            // use the prompt bridge instead.
 -            return;            
 -        } 
 -        this.addJavascriptInterface(exposedJsApi, "_cordovaNative");
 -    }
 +    void clearCache(boolean b);
  
 -    /**
 -     * Set the WebViewClient.
 -     *
 -     * @param client
 -     */
 -    public void setWebViewClient(CordovaWebViewClient client) {
 -        this.viewClient = client;
 -        super.setWebViewClient(client);
 -    }
 +    void clearHistory();
  
 -    /**
 -     * Set the WebChromeClient.
 -     *
 -     * @param client
 -     */
 -    public void setWebChromeClient(CordovaChromeClient client) {
 -        this.chromeClient = client;
 -        super.setWebChromeClient(client);
 -    }
 -    
 -    public CordovaChromeClient getWebChromeClient() {
 -        return this.chromeClient;
 -    }
 +    boolean backHistory();
  
 -    /**
 -     * Load the url into the webview.
 -     *
 -     * @param url
 -     */
 -    @Override
 -    public void loadUrl(String url) {
 -        if (url.equals("about:blank") || url.startsWith("javascript:")) {
 -            this.loadUrlNow(url);
 -        }
 -        else {
 -
 -            String initUrl = this.getProperty("url", null);
 -
 -            // If first page of app, then set URL to load to be the one passed in
 -            if (initUrl == null) {
 -                this.loadUrlIntoView(url);
 -            }
 -            // Otherwise use the URL specified in the activity's extras bundle
 -            else {
 -                this.loadUrlIntoView(initUrl);
 -            }
 -        }
 -    }
 +    void handlePause(boolean keepRunning);
  
 -    /**
 -     * Load the url into the webview after waiting for period of time.
 -     * This is used to display the splashscreen for certain amount of time.
 -     *
 -     * @param url
 -     * @param time              The number of ms to wait before loading webview
 -     */
 -    public void loadUrl(final String url, int time) {
 -        String initUrl = this.getProperty("url", null);
 -
 -        // If first page of app, then set URL to load to be the one passed in
 -        if (initUrl == null) {
 -            this.loadUrlIntoView(url, time);
 -        }
 -        // Otherwise use the URL specified in the activity's extras bundle
 -        else {
 -            this.loadUrlIntoView(initUrl);
 -        }
 -    }
 -
 -    public void loadUrlIntoView(final String url) {
 -        loadUrlIntoView(url, true);
 -    }
 +    void onNewIntent(Intent intent);
  
 -    /**
 -     * Load the url into the webview.
 -     *
 -     * @param url
 -     */
 -    public void loadUrlIntoView(final String url, boolean recreatePlugins) {
 -        LOG.d(TAG, ">>> loadUrl(" + url + ")");
 -
 -        if (recreatePlugins) {
 -            this.url = url;
 -            this.pluginManager.init();
 -        }
 -
 -        // Create a timeout timer for loadUrl
 -        final CordovaWebView me = this;
 -        final int currentLoadUrlTimeout = me.loadUrlTimeout;
 -        final int loadUrlTimeoutValue = Integer.parseInt(this.getProperty("LoadUrlTimeoutValue", "20000"));
 -
 -        // Timeout error method
 -        final Runnable loadError = new Runnable() {
 -            public void run() {
 -                me.stopLoading();
 -                LOG.e(TAG, "CordovaWebView: TIMEOUT ERROR!");
 -                if (viewClient != null) {
 -                    viewClient.onReceivedError(me, -6, "The connection to the server was unsuccessful.", url);
 -                }
 -            }
 -        };
 -
 -        // Timeout timer method
 -        final Runnable timeoutCheck = new Runnable() {
 -            public void run() {
 -                try {
 -                    synchronized (this) {
 -                        wait(loadUrlTimeoutValue);
 -                    }
 -                } catch (InterruptedException e) {
 -                    e.printStackTrace();
 -                }
 -
 -                // If timeout, then stop loading and handle error
 -                if (me.loadUrlTimeout == currentLoadUrlTimeout) {
 -                    me.cordova.getActivity().runOnUiThread(loadError);
 -                }
 -            }
 -        };
 -
 -        // Load url
 -        this.cordova.getActivity().runOnUiThread(new Runnable() {
 -            public void run() {
 -                cordova.getThreadPool().execute(timeoutCheck);
 -                me.loadUrlNow(url);
 -            }
 -        });
 -    }
 +    void handleResume(boolean keepRunning, boolean activityResultKeepRunning);
  
 -    /**
 -     * Load URL in webview.
 -     *
 -     * @param url
 -     */
 -    void loadUrlNow(String url) {
 -        if (LOG.isLoggable(LOG.DEBUG) && !url.startsWith("javascript:")) {
 -            LOG.d(TAG, ">>> loadUrlNow()");
 -        }
 -        if (url.startsWith("file://") || url.startsWith("javascript:") || Config.isUrlWhiteListed(url)) {
 -            super.loadUrl(url);
 -        }
 -    }
 -
 -    /**
 -     * Load the url into the webview after waiting for period of time.
 -     * This is used to display the splashscreen for certain amount of time.
 -     *
 -     * @param url
 -     * @param time              The number of ms to wait before loading webview
 -     */
 -    public void loadUrlIntoView(final String url, final int time) {
 -
 -        // If not first page of app, then load immediately
 -        // Add support for browser history if we use it.
 -        if ((url.startsWith("javascript:")) || this.canGoBack()) {
 -        }
 -
 -        // If first page, then show splashscreen
 -        else {
 +    void handleDestroy();
  
 -            LOG.d(TAG, "loadUrlIntoView(%s, %d)", url, time);
 +    void postMessage(String id, Object data);
  
 -            // Send message to show splashscreen now if desired
 -            this.postMessage("splashscreen", "show");
 -        }
 +    void addJavascript(String statement);
  
 -        // Load url
 -        this.loadUrlIntoView(url);
 -    }
 -    
 -    @Override
 -    public void stopLoading() {
 -        viewClient.isCurrentlyLoading = false;
 -        super.stopLoading();
 -    }
 -    
 -    public void onScrollChanged(int l, int t, int oldl, int oldt)
 -    {
 -        super.onScrollChanged(l, t, oldl, oldt);
 -        //We should post a message that the scroll changed
 -        ScrollEvent myEvent = new ScrollEvent(l, t, oldl, oldt, this);
 -        this.postMessage("onScrollChanged", myEvent);
 -    }
 -    
+     /**
+      * Send JavaScript statement back to JavaScript.
++     * (This is a convenience method)
++     *
++     * @param statement
+      * Deprecated (https://issues.apache.org/jira/browse/CB-6851)
+      * Instead of executing snippets of JS, you should use the exec bridge
+      * to create a Java->JS communication channel.
+      * To do this:
+      * 1. Within plugin.xml (to have your JS run before deviceready):
+      *    <js-module><runs/></js-module>
+      * 2. Within your .js (call exec on start-up):
+      *    require('cordova/channel').onCordovaReady.subscribe(function() {
+      *      require('cordova/exec')(win, null, 'Plugin', 'method', []);
+      *      function win(message) {
+      *        ... process message from java here ...
+      *      }
+      *    });
+      * 3. Within your .java:
+      *    PluginResult dataResult = new PluginResult(PluginResult.Status.OK, CODE);
+      *    dataResult.setKeepCallback(true);
+      *    savedCallbackContext.sendPluginResult(dataResult);
+      */
+     @Deprecated
 -    public void sendJavascript(String statement) {
 -        this.jsMessageQueue.addJavaScript(statement);
 -    }
 +    void sendJavascript(String statememt);
  
 -    /**
 -     * Send a plugin result back to JavaScript.
 -     * (This is a convenience method)
 -     *
 -     * @param result
 -     * @param callbackId
 -     */
 -    public void sendPluginResult(PluginResult result, String callbackId) {
 -        this.jsMessageQueue.addPluginResult(result, callbackId);
 -    }
 +    CordovaChromeClient getWebChromeClient();
  
 -    /**
 -     * Send a message to all plugins.
 -     *
 -     * @param id            The message id
 -     * @param data          The message data
 -     */
 -    public void postMessage(String id, Object data) {
 -        if (this.pluginManager != null) {
 -            this.pluginManager.postMessage(id, data);
 -        }
 -    }
 +    CordovaPlugin getPlugin(String initCallbackClass);
  
 +    void showWebPage(String errorUrl, boolean b, boolean c, HashMap<String, Object> params);
  
 -    /**
 -     * Go to previous page in history.  (We manage our own history)
 -     *
 -     * @return true if we went back, false if we are already at top
 -     */
 -    public boolean backHistory() {
 +    Object getFocusedChild();
  
 -        // Check webview first to see if there is a history
 -        // This is needed to support curPage#diffLink, since they are added to appView's history, but not our history url array (JQMobile behavior)
 -        if (super.canGoBack()) {
 -            printBackForwardList();
 -            super.goBack();
 -            
 -            return true;
 -        }
 -        return false;
 -    }
 +    boolean isCustomViewShowing();
  
 +    boolean onKeyUp(int keyCode, KeyEvent event);
  
 -    /**
 -     * Load the specified URL in the Cordova webview or a new browser instance.
 -     *
 -     * NOTE: If openExternal is false, only URLs listed in whitelist can be loaded.
 -     *
 -     * @param url           The url to load.
 -     * @param openExternal  Load url in browser instead of Cordova webview.
 -     * @param clearHistory  Clear the history stack, so new page becomes top of history
 -     * @param params        Parameters for new app
 -     */
 -    public void showWebPage(String url, boolean openExternal, boolean clearHistory, HashMap<String, Object> params) {
 -        LOG.d(TAG, "showWebPage(%s, %b, %b, HashMap", url, openExternal, clearHistory);
 -
 -        // If clearing history
 -        if (clearHistory) {
 -            this.clearHistory();
 -        }
 -
 -        // If loading into our webview
 -        if (!openExternal) {
 -
 -            // Make sure url is in whitelist
 -            if (url.startsWith("file://") || Config.isUrlWhiteListed(url)) {
 -                // TODO: What about params?
 -                // Load new URL
 -                this.loadUrl(url);
 -                return;
 -            }
 -            // Load in default viewer if not
 -            LOG.w(TAG, "showWebPage: Cannot load URL into webview since it is not in white list.  Loading into browser instead. (URL=" + url + ")");
 -        }
 -        try {
 -            // Omitting the MIME type for file: URLs causes "No Activity found to handle Intent".
 -            // Adding the MIME type to http: URLs causes them to not be handled by the downloader.
 -            Intent intent = new Intent(Intent.ACTION_VIEW);
 -            Uri uri = Uri.parse(url);
 -            if ("file".equals(uri.getScheme())) {
 -                intent.setDataAndType(uri, resourceApi.getMimeType(uri));
 -            } else {
 -                intent.setData(uri);
 -            }
 -            cordova.getActivity().startActivity(intent);
 -        } catch (android.content.ActivityNotFoundException e) {
 -            LOG.e(TAG, "Error loading url " + url, e);
 -        }
 -    }
 +    boolean onKeyDown(int keyCode, KeyEvent event);
  
 -    /**
 -     * Check configuration parameters from Config.
 -     * Approved list of URLs that can be loaded into Cordova
 -     *      <access origin="http://server regexp" subdomains="true" />
 -     * Log level: ERROR, WARN, INFO, DEBUG, VERBOSE (default=ERROR)
 -     *      <log level="DEBUG" />
 -     */
 -    private void loadConfiguration() {
 - 
 -        if ("true".equals(this.getProperty("Fullscreen", "false"))) {
 -            this.cordova.getActivity().getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
 -            this.cordova.getActivity().getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
 -        }
 -    }
 +    String exec(String service, String action, String callbackId, String message) throws JSONException;
  
 -    /**
 -     * Get string property for activity.
 -     *
 -     * @param name
 -     * @param defaultValue
 -     * @return the String value for the named property
 -     */
 -    public String getProperty(String name, String defaultValue) {
 -        Bundle bundle = this.cordova.getActivity().getIntent().getExtras();
 -        if (bundle == null) {
 -            return defaultValue;
 -        }
 -        name = name.toLowerCase(Locale.getDefault());
 -        Object p = bundle.get(name);
 -        if (p == null) {
 -            return defaultValue;
 -        }
 -        return p.toString();
 -    }
 -
 -    /*
 -     * onKeyDown
 -     */
 -    @Override
 -    public boolean onKeyDown(int keyCode, KeyEvent event)
 -    {
 -        if(keyDownCodes.contains(keyCode))
 -        {
 -            if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) {
 -                    // only override default behavior is event bound
 -                    LOG.d(TAG, "Down Key Hit");
 -                    this.loadUrl("javascript:cordova.fireDocumentEvent('volumedownbutton');");
 -                    return true;
 -            }
 -            // If volumeup key
 -            else if (keyCode == KeyEvent.KEYCODE_VOLUME_UP) {
 -                    LOG.d(TAG, "Up Key Hit");
 -                    this.loadUrl("javascript:cordova.fireDocumentEvent('volumeupbutton');");
 -                    return true;
 -            }
 -            else
 -            {
 -                return super.onKeyDown(keyCode, event);
 -            }
 -        }
 -        else if(keyCode == KeyEvent.KEYCODE_BACK)
 -        {
 -            return !(this.startOfHistory()) || this.bound;
 -        }
 -        else if(keyCode == KeyEvent.KEYCODE_MENU)
 -        {
 -            //How did we get here?  Is there a childView?
 -            View childView = this.getFocusedChild();
 -            if(childView != null)
 -            {
 -                //Make sure we close the keyboard if it's present
 -                InputMethodManager imm = (InputMethodManager) cordova.getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
 -                imm.hideSoftInputFromWindow(childView.getWindowToken(), 0);
 -                cordova.getActivity().openOptionsMenu();
 -                return true;
 -            } else {
 -                return super.onKeyDown(keyCode, event);
 -            }
 -        }
 -        
 -        return super.onKeyDown(keyCode, event);
 -    }
 -    
 +    void setNativeToJsBridgeMode(int parseInt);
  
 -    @Override
 -    public boolean onKeyUp(int keyCode, KeyEvent event)
 -    {
 -        // If back key
 -        if (keyCode == KeyEvent.KEYCODE_BACK) {
 -            // A custom view is currently displayed  (e.g. playing a video)
 -            if(mCustomView != null) {
 -                this.hideCustomView();
 -            } else {
 -                // The webview is currently displayed
 -                // If back key is bound, then send event to JavaScript
 -                if (this.bound) {
 -                    this.loadUrl("javascript:cordova.fireDocumentEvent('backbutton');");
 -                    return true;
 -                } else {
 -                    // If not bound
 -                    // Go to previous page in webview if it is possible to go back
 -                    if (this.backHistory()) {
 -                        return true;
 -                    }
 -                    // If not, then invoke default behavior
 -                    else {
 -                        //this.activityState = ACTIVITY_EXITING;
 -                    	//return false;
 -                    	// If they hit back button when app is initializing, app should exit instead of hang until initialization (CB2-458)
 -                    	this.cordova.getActivity().finish();
 -                    }
 -                }
 -            }
 -        }
 -        // Legacy
 -        else if (keyCode == KeyEvent.KEYCODE_MENU) {
 -            if (this.lastMenuEventTime < event.getEventTime()) {
 -                this.loadUrl("javascript:cordova.fireDocumentEvent('menubutton');");
 -            }
 -            this.lastMenuEventTime = event.getEventTime();
 -            return super.onKeyUp(keyCode, event);
 -        }
 -        // If search key
 -        else if (keyCode == KeyEvent.KEYCODE_SEARCH) {
 -            this.loadUrl("javascript:cordova.fireDocumentEvent('searchbutton');");
 -            return true;
 -        }
 -        else if(keyUpCodes.contains(keyCode))
 -        {
 -            //What the hell should this do?
 -            return super.onKeyUp(keyCode, event);
 -        }
 -
 -        //Does webkit change this behavior?
 -        return super.onKeyUp(keyCode, event);
 -    }
 +    String retrieveJsMessages(boolean equals);
  
 +    void showCustomView(View view, CustomViewCallback callback);
 +
 +    void hideCustomView();
 +
 +    Context getContext();
 +
 +    boolean onOverrideUrlLoading(String url);
 +
 +    void resetJsMessageQueue();
 +
 +    void onReset();
 +
 +    int getVisibility();
 +
 +    void incUrlTimeout();
 +
 +    void setOverScrollMode(int overScrollNever);
 +
 +    void setNetworkAvailable(boolean online);
 +
 +    CordovaResourceApi getResourceApi();
 +
 +    void bindButton(boolean override);
 +    void bindButton(String button, boolean override);
 +
 +    boolean isBackButtonBound();
 +
 +    void sendPluginResult(PluginResult cr, String callbackId);
 +
 +    PluginManager getPluginManager();
 +
 +    void setLayoutParams(android.widget.FrameLayout.LayoutParams layoutParams);
      
 -    public void bindButton(boolean override)
 -    {
 -        this.bound = override;
 -    }
 -
 -    public void bindButton(String button, boolean override) {
 -        // TODO Auto-generated method stub
 -        if (button.compareTo("volumeup")==0) {
 -          keyDownCodes.add(KeyEvent.KEYCODE_VOLUME_UP);
 -        }
 -        else if (button.compareTo("volumedown")==0) {
 -          keyDownCodes.add(KeyEvent.KEYCODE_VOLUME_DOWN);
 -        }
 -      }
 -
 -    public void bindButton(int keyCode, boolean keyDown, boolean override) {
 -       if(keyDown)
 -       {
 -           keyDownCodes.add(keyCode);
 -       }
 -       else
 -       {
 -           keyUpCodes.add(keyCode);
 -       }
 -    }
 -
 -    public boolean isBackButtonBound()
 -    {
 -        return this.bound;
 -    }
 -    
 -    public void handlePause(boolean keepRunning)
 -    {
 -        LOG.d(TAG, "Handle the pause");
 -        // Send pause event to JavaScript
 -        this.loadUrl("javascript:try{cordova.fireDocumentEvent('pause');}catch(e){console.log('exception firing pause event from native');};");
 -
 -        // Forward to plugins
 -        if (this.pluginManager != null) {
 -            this.pluginManager.onPause(keepRunning);
 -        }
 -
 -        // If app doesn't want to run in background
 -        if (!keepRunning) {
 -            // Pause JavaScript timers (including setInterval)
 -            this.pauseTimers();
 -        }
 -        paused = true;
 -   
 -    }
 -    
 -    public void handleResume(boolean keepRunning, boolean activityResultKeepRunning)
 -    {
 -
 -        this.loadUrl("javascript:try{cordova.fireDocumentEvent('resume');}catch(e){console.log('exception firing resume event from native');};");
 -        
 -        // Forward to plugins
 -        if (this.pluginManager != null) {
 -            this.pluginManager.onResume(keepRunning);
 -        }
 -
 -        // Resume JavaScript timers (including setInterval)
 -        this.resumeTimers();
 -        paused = false;
 -    }
 -    
 -    public void handleDestroy()
 -    {
 -        // Send destroy event to JavaScript
 -        this.loadUrl("javascript:try{cordova.require('cordova/channel').onDestroy.fire();}catch(e){console.log('exception firing destroy event from native');};");
 -
 -        // Load blank page so that JavaScript onunload is called
 -        this.loadUrl("about:blank");
 -
 -        // Forward to plugins
 -        if (this.pluginManager != null) {
 -            this.pluginManager.onDestroy();
 -        }
 -        
 -        // unregister the receiver
 -        if (this.receiver != null) {
 -            try {
 -                this.cordova.getActivity().unregisterReceiver(this.receiver);
 -            } catch (Exception e) {
 -                Log.e(TAG, "Error unregistering configuration receiver: " + e.getMessage(), e);
 -            }
 -        }
 -    }
 -    
 -    public void onNewIntent(Intent intent)
 -    {
 -        //Forward to plugins
 -        if (this.pluginManager != null) {
 -            this.pluginManager.onNewIntent(intent);
 -        }
 -    }
 -    
 -    public boolean isPaused()
 -    {
 -        return paused;
 -    }
 -
 -    public boolean hadKeyEvent() {
 -        return handleButton;
 -    }
 -
 -    // Wrapping these functions in their own class prevents warnings in adb like:
 -    // VFY: unable to resolve virtual method 285: Landroid/webkit/WebSettings;.setAllowUniversalAccessFromFileURLs
 -    @TargetApi(16)
 -    private static class Level16Apis {
 -        static void enableUniversalAccess(WebSettings settings) {
 -            settings.setAllowUniversalAccessFromFileURLs(true);
 -        }
 -    }
 -    
 -    public void printBackForwardList() {
 -        WebBackForwardList currentList = this.copyBackForwardList();
 -        int currentSize = currentList.getSize();
 -        for(int i = 0; i < currentSize; ++i)
 -        {
 -            WebHistoryItem item = currentList.getItemAtIndex(i);
 -            String url = item.getUrl();
 -            LOG.d(TAG, "The URL at index: " + Integer.toString(i) + " is " + url );
 -        }
 -    }
 -    
 -    
 -    //Can Go Back is BROKEN!
 -    public boolean startOfHistory()
 -    {
 -        WebBackForwardList currentList = this.copyBackForwardList();
 -        WebHistoryItem item = currentList.getItemAtIndex(0);
 -        if( item!=null){	// Null-fence in case they haven't called loadUrl yet (CB-2458)
 -	        String url = item.getUrl();
 -	        String currentUrl = this.getUrl();
 -	        LOG.d(TAG, "The current URL is: " + currentUrl);
 -	        LOG.d(TAG, "The URL at item 0 is: " + url);
 -	        return currentUrl.equals(url);
 -        }
 -        return false;
 -    }
 -
 -    public void showCustomView(View view, WebChromeClient.CustomViewCallback callback) {
 -        // This code is adapted from the original Android Browser code, licensed under the Apache License, Version 2.0
 -        Log.d(TAG, "showing Custom View");
 -        // if a view already exists then immediately terminate the new one
 -        if (mCustomView != null) {
 -            callback.onCustomViewHidden();
 -            return;
 -        }
 -        
 -        // Store the view and its callback for later (to kill it properly)
 -        mCustomView = view;
 -        mCustomViewCallback = callback;
 -        
 -        // Add the custom view to its container.
 -        ViewGroup parent = (ViewGroup) this.getParent();
 -        parent.addView(view, COVER_SCREEN_GRAVITY_CENTER);
 -        
 -        // Hide the content view.
 -        this.setVisibility(View.GONE);
 -        
 -        // Finally show the custom view container.
 -        parent.setVisibility(View.VISIBLE);
 -        parent.bringToFront();
 -    }
 -
 -    public void hideCustomView() {
 -        // This code is adapted from the original Android Browser code, licensed under the Apache License, Version 2.0
 -        Log.d(TAG, "Hiding Custom View");
 -        if (mCustomView == null) return;
 -
 -        // Hide the custom view.
 -        mCustomView.setVisibility(View.GONE);
 -        
 -        // Remove the custom view from its container.
 -        ViewGroup parent = (ViewGroup) this.getParent();
 -        parent.removeView(mCustomView);
 -        mCustomView = null;
 -        mCustomViewCallback.onCustomViewHidden();
 -        
 -        // Show the content view.
 -        this.setVisibility(View.VISIBLE);
 -    }
 -    
 -    /**
 -     * if the video overlay is showing then we need to know 
 -     * as it effects back button handling
 -     * 
 -     * @return true if custom view is showing
 -     */
 -    public boolean isCustomViewShowing() {
 -        return mCustomView != null;
 -    }
 -    
 -    public WebBackForwardList restoreState(Bundle savedInstanceState)
 -    {
 -        WebBackForwardList myList = super.restoreState(savedInstanceState);
 -        Log.d(TAG, "WebView restoration crew now restoring!");
 -        //Initialize the plugin manager once more
 -        this.pluginManager.init();
 -        return myList;
 -    }
 -
 -    public void storeResult(int requestCode, int resultCode, Intent intent) {
 -        mResult = new ActivityResult(requestCode, resultCode, intent);
 -    }
 +    // Required for test
      
 -    public CordovaResourceApi getResourceApi() {
 -        return resourceApi;
 -    }
 +    String getUrl();
 +    boolean isPaused();
  }


[03/18] android commit: CB-6723 Update package name for Robotium

Posted by ag...@apache.org.
CB-6723 Update package name for Robotium


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

Branch: refs/heads/4.0.x
Commit: e98f6ae570766d648521f353966d25b86c0b0260
Parents: 0b5bf0c
Author: Marcel Kinard <cm...@gmail.com>
Authored: Tue May 20 07:09:02 2014 -0400
Committer: Marcel Kinard <cm...@gmail.com>
Committed: Tue May 20 07:09:02 2014 -0400

----------------------------------------------------------------------
 test/README.md                                          | 6 ++++--
 test/src/org/apache/cordova/test/junit/MessageTest.java | 4 ++--
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/e98f6ae5/test/README.md
----------------------------------------------------------------------
diff --git a/test/README.md b/test/README.md
index 1a144e2..38d76a5 100755
--- a/test/README.md
+++ b/test/README.md
@@ -26,8 +26,10 @@ These tests are designed to verify Android native features and other Android spe
 
 There really isn't any manual setup to do. The ant script takes care of that.
 You don't even need to compile cordova-x.y.z.jar or copy it, because 
-project.properties has a library reference to ../framework.  However, Robotium has to be 
-installed for the onScrollChanged tests to work correctly.  It can be found at https://code.google.com/p/robotium/
+project.properties has a library reference to ../framework.  However, Robotium
+has to be installed for the onScrollChanged tests to work correctly.  It can be
+found at https://code.google.com/p/robotium/ and the jar should be put in the
+'libs' directory'.
 
 To run manually from command line:
 

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/e98f6ae5/test/src/org/apache/cordova/test/junit/MessageTest.java
----------------------------------------------------------------------
diff --git a/test/src/org/apache/cordova/test/junit/MessageTest.java b/test/src/org/apache/cordova/test/junit/MessageTest.java
index 4d0ce16..1d23696 100644
--- a/test/src/org/apache/cordova/test/junit/MessageTest.java
+++ b/test/src/org/apache/cordova/test/junit/MessageTest.java
@@ -25,8 +25,8 @@ import org.apache.cordova.pluginApi.pluginStub;
 import org.apache.cordova.test.CordovaWebViewTestActivity;
 import org.apache.cordova.test.R;
 
-import com.jayway.android.robotium.solo.By;
-import com.jayway.android.robotium.solo.Solo;
+import com.robotium.solo.By;
+import com.robotium.solo.Solo;
 
 import android.test.ActivityInstrumentationTestCase2;
 import android.view.View;