diff --git a/RELEASENOTES.md b/RELEASENOTES.md index d8e467b2..43bb3265 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -20,6 +20,135 @@ --> ## Release Notes for Cordova (Android) ## +### 3.6.0 (Sept 2014) ### + +* Set VERSION to 3.6.0 (via coho) +* CB-7410 fix the menu test +* CB-7410 Fix the errorUrl test +* CB-7410 Fix Basic Authentication test +* CB-3445: Allow build and run scripts to select APK by architecture +* CB-3445: Add environment variable 'BUILD_MULTIPLE_APKS' for splitting APKs based on architecture +* CB-3445: Ensure that JAR files in libs directory are included +* CB-7267 update RELEASENOTES for 3.5.1 +* CB-7410 clarify the title +* CB-7385 update cordova.js for testing prior to branch/tag +* CB-7410 add whitelist entries to get iframe/GoogleMaps working +* CB-7291 propogate change in method signature to the native tests +* CB-7291: Restrict meaning of "\*" in internal whitelist to just http and https +* CB-7291: Only add file, content and data URLs to internal whitelist +* CB-7291: Add defaults to external whitelist +* CB-7291: Add external-launch-whitelist and use it for filtering intent launches +* CB-3445: Read project.properties to configure gradle libraries +* CB-7325 Fix error message in android_sdk_version.js when missing SDK on windows +* CB-7335 Add a .gitignore to android project template +* CB-7330 Fix dangling function call in last commit (broke gradle builds) +* CB-7330 Don't run "android update" during creation +* CB-3445 Add gradle support clean command (plus some code cleanup) +* CB-7044 Fix typo in prev commit causing check_reqs to always fail. +* CB-3445 Copy gradle wrapper in build instead of create +* CB-3445 Add .gradle template files for "update" as well as "create" +* CB-7044 Add JAVA_HOME when not set. Be stricter about ANDROID_HOME +* CB-3445 Speed up gradle building (incremental builds go from 10s -> 1.5s for me) +* CB-3445: android: Copy Gradle wrapper from Android SDK rather than bundling a JAR +* CB-3445: Add which to checked-in node_modules +* CB-3445: Add option to build and install with gradle +* CB-3445: Add an initial set of Gradle build scripts +* CB-7321 Don't require ant for create script +* CB-7044, CB-7299 Fix up PATH problems when possible. +* Change in test's AndroidManifest.xml needed for the test to run properly. Forgot the manifest. +* Change in test's AndroidManifest.xml needed for the test to run properly +* Adding tests related to 3.5.1 +* CB-7261 Fix setNativeToJsBridgeMode sometimes crashing when switching to ONLINE_EVENT +* CB-7265 Fix crash when navigating to custom protocol (introduced in 3.5.1) +* Filter out non-launchable intents +* Handle unsupported protocol errors in webview better +* CB-7238: I should have collapsed this, but Config.init() must go before the creation of CordovaWebView +* CB-7238: Minor band-aid to get tests running again, this has to go away before 3.6.0 is released, since this is an API change. +* Extend whitelist to handle URLs without // chars +* CB-7172 Force window to have focus after resume +* CB-7159 Set background color of webView as well as its parent +* CB-7018 Fix setButtonPlumbedToJs never un-listening +* Undeprecate some just-deprecated symbols in PluginManager. +* @Deprecate methods of PluginManager that were never meant to be public +* Move plugin instantiation and instance storing logic PluginEntry->PluginManager +* Fix broken unit test due to missing Config.init() call +* Update to check for Google Glass APIs +* Fix for `android` not being in PATH check on Windows +* Displaying error when regex does not match. +* Fix broken compile due to previous commit :( +* Tweak CordovaPlugin.initialize method to be less deprecated. +* Un-deprecate CordovaActivity.init() - it's needed to tweak prefs in onCreate +* Tweak log messages in CordovaBridge with bridgeSecret is wrong +* Backport CordovaBridge from 4.0.x -> master +* Update unit tests to not use most deprecated things (e.g. DroidGap) +* Add non-String overloades for CordovaPreferences.set() +* Make CordovaWebview resilient to init() not being called (for backwards-compatibility) +* Add node_module licenses to LICENSE +* Update cordova.js snapshot to work with bridge changes +* Provide CordovaPlugin with CordovaPreferences. Add new Plugin.initialize() +* Convert usages of Config.\* to use the non-static versions +* Change getProperty -> prefs.get\* within CordovaActivity +* Make CordovaUriHelper class package-private +* Fix PluginManager.setPluginEntries not removing old entries +* Move registration of App plugin from config.xml -> code +* Make setWebViewClient an override instead of an overload. Delete Location-change JS->Native bridge mode (missed some of it). +* CB-4404 Revert setting android:windowSoftInputMode to "adjustPan" +* Refactor: Use ConfigXmlParser in activity. Adds CordovaWebView.init() +* Deprecate some convenience methods on CordovaActivity +* Fix CordovaPreferences not correctly parsing hex values (valueOf->decode) +* Refactor: Move url-filter information into PluginEntry. +* Don't re-parse config.xml in onResume. +* Move handling of Fullscreen preference to CordovaActivity +* Delete dead code from CordovaActivity +* Update .classpath to make Eclipse happy (just re-orders one line) +* Delete "CB-3064: The errorUrl is..." Log message left over from debugging presumably +* Refactor Config into ConfigXmlParser, CordovaPreferences +* Delete Location-change JS->Native bridge mode +* CB-5988 Allow exec() only from file: or start-up URL's domain +* CB-6761 Fix native->JS bridge ceasing to fire when page changes and online is set to false and the JS loads quickly +* Update the errorurl to no longer use intents +* This breaks running the JUnit tests, we'll bring it back soon +* Refactoring the URI handling on Cordova, removing dead code +* CB-7018 Clean up and deprecation of some button-related functions +* CB-7017 Fix onload=true being set on all subsequent plugins +* CB-5971: Fix package / project validation +* CB-5971: Add unit tests to cordova-android +* CB-5971: Factor out package/project name validation logic +* Delete explicit activity.finish() in back button handling. No change in behaviour. +* CB-5971: This would have been a good first bug, too bad +* CB-4404: Changing where android:windowSoftInputMode is in the manifest so it works +* Add documentation referencing other implementation. +* CB-6851 Deprecate WebView.sendJavascript() +* CB-6876 Show the correct executable name +* CB-6876 Fix the "print usage" +* Trivial spelling fix in comments when reading CordovaResourceApi +* CB-6818: I want to remove this code, because Square didn't do their headers properly +* CB-6860 Add activity_name and launcher_name to AndroidManifest.xml & strings.xml +* Add a comment to custom_rules.xml saying why we move AndroidManifest.xml +* Remove +x from README.md +* CB-6784 Add missing licenses +* CB-6784 Add license to CONTRIBUTING.md +* Revert "defaults.xml: Add AndroidLaunchMode preference" +* updated RELEASENOTES +* CB-6315: Wrapping this so it runs on the UI thread +* CB-6723 Update package name for Robotium +* CB-6707 Update minSdkVersion to 10 consistently +* CB-5652 make visible cordova version +* Update JS snapshot to version 3.6.0-dev (via coho) +* Update JS snapshot to version 3.6.0-dev (via coho) +* Set VERSION to 3.6.0-dev (via coho) + +### 3.5.1 (August 2014) ### + +This was a security update to address CVE-2014-3500, CVE-2014-3501, +and CVE-2014-3502. For more information, see +http://cordova.apache.org/announcements/2014/08/04/android-351.html + +* Filter out non-launchable intents +* Handle unsupported protocol errors in webview better +* Update the errorurl to no longer use intents +* Refactoring the URI handling on Cordova, removing dead code + ### 3.5.0 (May 2014) ### * OkHttp has broken headers. Updating for ASF compliance. diff --git a/framework/assets/www/cordova.js b/framework/assets/www/cordova.js index f0e57cd1..3838e63f 100644 --- a/framework/assets/www/cordova.js +++ b/framework/assets/www/cordova.js @@ -1,5 +1,5 @@ // Platform: android -// 3.6.0-dev-70cdca3 +// 3.7.0-dev-8f41e8d /* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file @@ -19,7 +19,7 @@ under the License. */ ;(function() { -var CORDOVA_JS_BUILD_LABEL = '3.6.0-dev-70cdca3'; +var CORDOVA_JS_BUILD_LABEL = '3.7.0-dev-8f41e8d'; // file: src/scripts/require.js /*jshint -W079 */ @@ -1497,6 +1497,17 @@ module.exports = { cordova.addDocumentEventHandler('menubutton'); cordova.addDocumentEventHandler('searchbutton'); + function bindButtonChannel(buttonName) { + // generic button bind used for volumeup/volumedown buttons + var volumeButtonChannel = cordova.addDocumentEventHandler(buttonName + 'button'); + volumeButtonChannel.onHasSubscribersChange = function() { + exec(null, null, "App", "overrideButton", [buttonName, this.numHandlers == 1]); + }; + } + // Inject a listener for the volume buttons on the document. + bindButtonChannel('volumeup'); + bindButtonChannel('volumedown'); + // Let native code know we are all done on the JS side. // Native code will then un-hide the WebView. channel.onCordovaReady.subscribe(function() { @@ -1574,6 +1585,21 @@ module.exports = { exec(null, null, "App", "overrideBackbutton", [override]); }, + /** + * Override the default behavior of the Android volume button. + * If overridden, when the volume button is pressed, the "volume[up|down]button" + * JavaScript event will be fired. + * + * Note: The user should not have to call this method. Instead, when the user + * registers for the "volume[up|down]button" event, this is automatically done. + * + * @param button volumeup, volumedown + * @param override T=override, F=cancel override + */ + overrideButton:function(button, override) { + exec(null, null, "App", "overrideButton", [button, override]); + }, + /** * Exit and terminate the application. */ @@ -1667,11 +1693,11 @@ function handlePluginsObject(path, moduleList, finishPluginLoading) { function findCordovaPath() { var path = null; var scripts = document.getElementsByTagName('script'); - var term = 'cordova.js'; + var term = '/cordova.js'; for (var n = scripts.length-1; n>-1; n--) { var src = scripts[n].src.replace(/\?.*$/, ''); // Strip any query param (CB-6007). if (src.indexOf(term) == (src.length - term.length)) { - path = src.substring(0, src.length - term.length); + path = src.substring(0, src.length - term.length) + '/'; break; } } diff --git a/package.json b/package.json index ca620f7b..7f1b8d97 100644 --- a/package.json +++ b/package.json @@ -1,29 +1,29 @@ { - "name": "cordova-android", - "version": "4.0.0-dev", - "description": "cordova-android release", - "main": "bin/create", - "repository": { - "type": "git", - "url": "https://git-wip-us.apache.org/repos/asf/cordova-android.git" - }, - "keywords": [ - "android", - "cordova", - "apache" - ], - "scripts": { - "test": "jasmine-node --color spec" - }, - "author": "Apache Software Foundation", - "license": "Apache version 2.0", - "dependencies": { - "q": "^0.9.0", - "shelljs": "^0.2.6", - "which": "^1.0.5" - }, - "devDependencies": { - "jasmine-node": "~1", - "promise-matchers": "~0" - } + "name": "cordova-android", + "version": "4.0.0-dev", + "description": "cordova-android release", + "main": "bin/create", + "repository": { + "type": "git", + "url": "https://git-wip-us.apache.org/repos/asf/cordova-android.git" + }, + "keywords": [ + "android", + "cordova", + "apache" + ], + "scripts": { + "test": "jasmine-node --color spec" + }, + "author": "Apache Software Foundation", + "license": "Apache version 2.0", + "dependencies": { + "q": "^0.9.0", + "shelljs": "^0.2.6", + "which": "^1.0.5" + }, + "devDependencies": { + "jasmine-node": "~1", + "promise-matchers": "~0" + } } diff --git a/test/assets/www/htmlnotfound/error.html b/test/assets/www/htmlnotfound/error.html index e32cd296..3852efe6 100755 --- a/test/assets/www/htmlnotfound/error.html +++ b/test/assets/www/htmlnotfound/error.html @@ -14,6 +14,25 @@ "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.$ + under the License. --> -This is an error page. + + +
+ + +