cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fil...@apache.org
Subject [37/38] git commit: updated android, ios, bb libraries to 2.8.x branch. fixed a few assertions with project changes. removed blackberry support until create script can be finalized.
Date Thu, 23 May 2013 23:41:58 GMT
updated android, ios, bb libraries to 2.8.x branch. fixed a few assertions with project changes. removed blackberry support until create script can be finalized.


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

Branch: refs/heads/master2
Commit: 88ad654c85719dd9d83f16b9995a5cd295166e7b
Parents: d00f202
Author: Fil Maj <maj.fil@gmail.com>
Authored: Thu May 23 16:31:44 2013 -0700
Committer: Fil Maj <maj.fil@gmail.com>
Committed: Thu May 23 16:31:44 2013 -0700

----------------------------------------------------------------------
 lib/cordova-android/.reviewboardrc                 |    8 +
 lib/cordova-android/NOTICE                         |   14 +-
 lib/cordova-android/README.md                      |   34 +-
 lib/cordova-android/VERSION                        |    2 +-
 .../bin/templates/project/assets/www/index.html    |    2 +-
 lib/cordova-android/bin/update                     |   19 +-
 lib/cordova-android/bin/update.js                  |    8 +-
 lib/cordova-android/framework/AndroidManifest.xml  |    9 +-
 .../framework/assets/www/cordova.js                |  156 +-
 .../framework/assets/www/index.html                |    2 +-
 lib/cordova-android/framework/default.properties   |   14 -
 lib/cordova-android/framework/project.properties   |    2 +-
 lib/cordova-android/framework/res/xml/config.xml   |  146 +-
 .../framework/src/com/squareup/okhttp/Address.java |  111 +
 .../src/com/squareup/okhttp/Connection.java        |  291 +
 .../src/com/squareup/okhttp/ConnectionPool.java    |  273 +
 .../src/com/squareup/okhttp/HttpResponseCache.java |  693 +
 .../src/com/squareup/okhttp/OkHttpClient.java      |  216 +
 .../src/com/squareup/okhttp/OkResponseCache.java   |   38 +
 .../src/com/squareup/okhttp/ResponseSource.java    |   37 +
 .../framework/src/com/squareup/okhttp/Route.java   |   91 +
 .../src/com/squareup/okhttp/TunnelRequest.java     |   75 +
 .../okhttp/internal/AbstractOutputStream.java      |   45 +
 .../src/com/squareup/okhttp/internal/Base64.java   |  164 +
 .../com/squareup/okhttp/internal/DiskLruCache.java |  926 ++
 .../src/com/squareup/okhttp/internal/Dns.java      |   33 +
 .../internal/FaultRecoveringOutputStream.java      |  163 +
 .../squareup/okhttp/internal/NamedRunnable.java    |   40 +
 .../src/com/squareup/okhttp/internal/Platform.java |  389 +
 .../squareup/okhttp/internal/StrictLineReader.java |  208 +
 .../src/com/squareup/okhttp/internal/Util.java     |  327 +
 .../internal/http/AbstractHttpInputStream.java     |  107 +
 .../internal/http/AbstractHttpOutputStream.java    |   40 +
 .../okhttp/internal/http/HeaderParser.java         |  112 +
 .../okhttp/internal/http/HttpAuthenticator.java    |  175 +
 .../squareup/okhttp/internal/http/HttpDate.java    |   82 +
 .../squareup/okhttp/internal/http/HttpEngine.java  |  664 +
 .../okhttp/internal/http/HttpResponseCache.java    |  608 +
 .../okhttp/internal/http/HttpTransport.java        |  485 +
 .../internal/http/HttpURLConnectionImpl.java       |  556 +
 .../internal/http/HttpsURLConnectionImpl.java      |  461 +
 .../okhttp/internal/http/OkResponseCache.java      |   55 +
 .../internal/http/OkResponseCacheAdapter.java      |   53 +
 .../squareup/okhttp/internal/http/RawHeaders.java  |  424 +
 .../okhttp/internal/http/RequestHeaders.java       |  290 +
 .../okhttp/internal/http/ResponseHeaders.java      |  497 +
 .../internal/http/RetryableOutputStream.java       |   75 +
 .../okhttp/internal/http/RouteSelector.java        |  275 +
 .../okhttp/internal/http/SpdyTransport.java        |   96 +
 .../squareup/okhttp/internal/http/Transport.java   |   64 +
 .../http/UnknownLengthHttpInputStream.java         |   63 +
 .../internal/spdy/IncomingStreamHandler.java       |   36 +
 .../com/squareup/okhttp/internal/spdy/Ping.java    |   71 +
 .../squareup/okhttp/internal/spdy/Settings.java    |  174 +
 .../okhttp/internal/spdy/SpdyConnection.java       |  579 +
 .../squareup/okhttp/internal/spdy/SpdyReader.java  |  326 +
 .../squareup/okhttp/internal/spdy/SpdyStream.java  |  733 +
 .../squareup/okhttp/internal/spdy/SpdyWriter.java  |  176 +
 .../src/org/apache/cordova/AudioHandler.java       |   13 +-
 .../src/org/apache/cordova/CameraLauncher.java     |   61 +-
 .../framework/src/org/apache/cordova/Capture.java  |   13 +-
 .../framework/src/org/apache/cordova/Config.java   |   23 +-
 .../src/org/apache/cordova/CordovaActivity.java    | 1158 ++
 .../org/apache/cordova/CordovaChromeClient.java    |    4 +-
 .../src/org/apache/cordova/CordovaWebView.java     |    4 +-
 .../framework/src/org/apache/cordova/Device.java   |    2 +-
 .../framework/src/org/apache/cordova/DroidGap.java | 1136 +--
 .../src/org/apache/cordova/FileHelper.java         |   56 +-
 .../src/org/apache/cordova/FileTransfer.java       |   55 +-
 .../src/org/apache/cordova/FileUtils.java          |  121 +-
 .../cordova/IceCreamCordovaWebViewClient.java      |   48 +-
 .../cordova/LinearLayoutSoftKeyboardDetect.java    |    4 +-
 .../src/org/apache/cordova/Notification.java       |  146 +-
 .../src/org/apache/cordova/StandAlone.java         |   32 -
 .../src/org/apache/cordova/api/CordovaPlugin.java  |   14 +
 .../src/org/apache/cordova/api/DataResource.java   |  141 +
 .../apache/cordova/api/DataResourceContext.java    |   31 +
 .../src/org/apache/cordova/api/PluginManager.java  |   70 +-
 lib/cordova-android/test/proguard.cfg              |   40 -
 lib/cordova-android/test/res/xml/config.xml        |  135 +-
 lib/cordova-blackberry/.jshint                     |    3 +
 lib/cordova-blackberry/.jshintignore               |    1 +
 lib/cordova-blackberry/.npmignore                  |    2 +
 lib/cordova-blackberry/Jakefile                    |  148 +
 lib/cordova-blackberry/README.md                   |  193 +-
 lib/cordova-blackberry/VERSION                     |    2 +-
 lib/cordova-blackberry/bin/check_reqs              |   28 +
 lib/cordova-blackberry/bin/check_reqs.bat          |   21 +
 lib/cordova-blackberry/bin/create                  |   89 +-
 lib/cordova-blackberry/bin/create.bat              |   14 +-
 lib/cordova-blackberry/bin/create.js               |  251 +-
 lib/cordova-blackberry/bin/lib/localize.js         |   26 +
 lib/cordova-blackberry/bin/lib/utils.js            |  167 +
 .../bin/templates/dist/README.md                   |   90 -
 .../bin/templates/project/blackberry.xml           |  456 -
 .../bin/templates/project/build.xml                |  160 -
 .../bin/templates/project/cordova/build            |   35 +-
 .../bin/templates/project/cordova/build.bat        |   21 +
 .../bin/templates/project/cordova/clean            |    3 +
 .../bin/templates/project/cordova/clean.bat        |   21 +
 .../templates/project/cordova/lib/bar-builder.js   |   98 +
 .../bin/templates/project/cordova/lib/bar-conf.js  |   27 +
 .../templates/project/cordova/lib/bbwpignore.js    |  129 +
 .../bin/templates/project/cordova/lib/build        |  174 +
 .../bin/templates/project/cordova/lib/clean        |   24 +
 .../bin/templates/project/cordova/lib/cmdline.js   |   67 +
 .../bin/templates/project/cordova/lib/conf.js      |   47 +
 .../templates/project/cordova/lib/config-parser.js |  670 +
 .../project/cordova/lib/debugtoken-helper.js       |  211 +
 .../templates/project/cordova/lib/file-manager.js  |  208 +
 .../templates/project/cordova/lib/i18n-manager.js  |  146 +
 .../bin/templates/project/cordova/lib/localize.js  |  207 +
 .../bin/templates/project/cordova/lib/logger.js    |   38 +
 .../project/cordova/lib/native-packager.js         |  288 +
 .../project/cordova/lib/packager-utils.js          |  176 +
 .../project/cordova/lib/packager-validator.js      |  110 +
 .../bin/templates/project/cordova/lib/packager.js  |   73 +
 .../bin/templates/project/cordova/lib/plugin.js    |  197 +
 .../bin/templates/project/cordova/lib/run          |  204 +
 .../bin/templates/project/cordova/lib/session.js   |  120 +
 .../project/cordova/lib/signing-helper.js          |  127 +
 .../bin/templates/project/cordova/lib/target       |  189 +
 .../bin/templates/project/cordova/plugin           |   23 +
 .../bin/templates/project/cordova/plugin.bat       |   21 +
 .../bin/templates/project/cordova/run              |   42 +-
 .../bin/templates/project/cordova/run.bat          |   21 +
 .../bin/templates/project/cordova/target           |    3 +
 .../bin/templates/project/cordova/target.bat       |   21 +
 .../cordova/third_party/data2xml/data2xml.js       |   86 +
 .../project/cordova/third_party/wrench/wrench.js   |   78 +
 .../project/native/device/plugins/jnext/auth.txt   |    3 +
 .../bin/templates/project/native/device/wwe        |    2 +
 .../native/simulator/plugins/jnext/auth.txt        |    3 +
 .../bin/templates/project/native/simulator/wwe     |    2 +
 .../bin/templates/project/playbook.xml             |  338 -
 .../bin/templates/project/project.json             |    6 +
 .../bin/templates/project/project.properties       |  137 -
 .../bin/templates/project/qnx.xml                  |  336 -
 .../bin/templates/project/www/VERSION              |    2 +-
 .../bin/templates/project/www/config.xml           |   57 +-
 .../bin/templates/project/www/index.html           |    2 +-
 .../bin/templates/project/www/plugins.xml          |   35 -
 .../www/res/screen/blackberry/screen-225.png       |  Bin 16776 -> 0 bytes
 .../www/res/screen/blackberry/splash-1280x768.png  |  Bin 0 -> 60771 bytes
 .../www/res/screen/blackberry/splash-720x720.png   |  Bin 0 -> 50431 bytes
 .../www/res/screen/blackberry/splash-768x1280.png  |  Bin 0 -> 57145 bytes
 .../test/cordova/functional/debugtoken-helper.js   |  377 +
 .../bin/test/cordova/integration/create.js         |  158 +
 .../bin/test/cordova/integration/target.js         |  237 +
 .../bin/test/cordova/unit/config-bare-minimum.xml  |   21 +
 .../bin/test/cordova/unit/config-license.xml       |   10 +
 .../bin/test/cordova/unit/config.xml               |   53 +
 .../bin/test/cordova/unit/data/ascii_text.txt      |    1 +
 .../bin/test/cordova/unit/data/ucs2be_text.txt     |  Bin 0 -> 24 bytes
 .../bin/test/cordova/unit/data/ucs2le_text.txt     |  Bin 0 -> 24 bytes
 .../bin/test/cordova/unit/data/utf8_text.txt       |    1 +
 .../bin/test/cordova/unit/params-bad.json          |   10 +
 .../bin/test/cordova/unit/params.json              |    9 +
 .../bin/test/cordova/unit/spec/lib/bar-builder.js  |   34 +
 .../bin/test/cordova/unit/spec/lib/bbwpignore.js   |  135 +
 .../bin/test/cordova/unit/spec/lib/cmdline.js      |   77 +
 .../test/cordova/unit/spec/lib/config-parser.js    | 1411 ++
 .../bin/test/cordova/unit/spec/lib/file-manager.js |   67 +
 .../bin/test/cordova/unit/spec/lib/i18n-manager.js |  298 +
 .../bin/test/cordova/unit/spec/lib/logger.js       |  101 +
 .../test/cordova/unit/spec/lib/native-packager.js  |  347 +
 .../test/cordova/unit/spec/lib/packager-utils.js   |   65 +
 .../cordova/unit/spec/lib/packager-validator.js    |  277 +
 .../bin/test/cordova/unit/spec/lib/session.js      |  209 +
 .../test/cordova/unit/spec/lib/signing-helper.js   |  420 +
 .../bin/test/cordova/unit/spec/lib/test-data.js    |   87 +
 .../test/cordova/unit/spec/lib/test-utilities.js   |   82 +
 .../bin/test/cordova/unit/test.zip                 |  Bin 0 -> 4984 bytes
 .../bin/test/plugins/Accelerometer/index.js        |   81 +
 .../bin/test/plugins/Battery/index.js              |  103 +
 .../bin/test/plugins/Camera/index.js               |  298 +
 .../bin/test/plugins/Contacts/index.js             |  197 +
 .../bin/test/plugins/Device/index.js               |   76 +
 .../bin/test/plugins/Logger/index.js               |   51 +
 .../bin/test/plugins/NetworkStatus/index.js        |  118 +
 .../bin/test/plugins/Notification/index.js         |  119 +
 .../bin/test/plugins/SplashScreen/index.js         |   82 +
 lib/cordova-blackberry/build.xml                   |  342 -
 .../framework/bootstrap/index.html                 |   23 +
 .../framework/bootstrap/require.js                 |  251 +
 lib/cordova-blackberry/framework/bootstrap/ui.html |   73 +
 .../framework/ext-air/Cordova_Network/library.xml  |   40 -
 .../src/org/apache/cordova/network/Network.as      |   88 -
 .../framework/ext-qnx/org.apache.cordova/client.js |   16 -
 .../framework/ext-qnx/org.apache.cordova/index.js  |   34 -
 .../ext-qnx/org.apache.cordova/manifest.json       |    5 -
 lib/cordova-blackberry/framework/ext-qnx/readme.md |    1 -
 lib/cordova-blackberry/framework/ext/.classpath    |    7 -
 lib/cordova-blackberry/framework/ext/.project      |   29 -
 .../net.rim.browser.tools.debug.widget.prefs       |    3 -
 .../ext/.settings/org.eclipse.jdt.core.prefs       |   12 -
 .../framework/ext/BlackBerry_App_Descriptor.xml    |   36 -
 .../framework/ext/src/library.xml                  |   35 -
 .../src/org/apache/cordova/CordovaExtension.java   |  208 -
 .../cordova/accelerometer/Accelerometer.java       |  228 -
 .../ext/src/org/apache/cordova/api/IPlugin.java    |   71 -
 .../ext/src/org/apache/cordova/api/Plugin.java     |  114 -
 .../src/org/apache/cordova/api/PluginManager.java  |  168 -
 .../apache/cordova/api/PluginManagerFunction.java  |  240 -
 .../src/org/apache/cordova/api/PluginResult.java   |  152 -
 .../ext/src/org/apache/cordova/app/App.java        |  147 -
 .../src/org/apache/cordova/battery/Battery.java    |  210 -
 .../ext/src/org/apache/cordova/camera/Camera.java  |  470 -
 .../org/apache/cordova/camera/CameraOptions.java   |  193 -
 .../org/apache/cordova/camera/PhotoListener.java   |  107 -
 .../cordova/capture/AudioCaptureListener.java      |   80 -
 .../cordova/capture/AudioCaptureOperation.java     |  173 -
 .../org/apache/cordova/capture/AudioControl.java   |   75 -
 .../org/apache/cordova/capture/CameraControl.java  |   87 -
 .../org/apache/cordova/capture/CaptureControl.java |  169 -
 .../org/apache/cordova/capture/CaptureMode.java    |   87 -
 .../apache/cordova/capture/CaptureOperation.java   |  202 -
 .../cordova/capture/ImageCaptureListener.java      |   84 -
 .../cordova/capture/ImageCaptureOperation.java     |  161 -
 .../org/apache/cordova/capture/MediaCapture.java   |  502 -
 .../src/org/apache/cordova/capture/MediaQueue.java |   44 -
 .../cordova/capture/VideoCaptureListener.java      |  107 -
 .../cordova/capture/VideoCaptureOperation.java     |  124 -
 .../ext/src/org/apache/cordova/device/Device.java  |   70 -
 .../ext/src/org/apache/cordova/file/Entry.java     |   66 -
 .../ext/src/org/apache/cordova/file/File.java      |   84 -
 .../src/org/apache/cordova/file/FileManager.java   | 1051 --
 .../apache/cordova/geolocation/Geolocation.java    |  372 -
 .../cordova/geolocation/GeolocationListener.java   |  133 -
 .../cordova/geolocation/GeolocationResult.java     |   73 -
 .../cordova/geolocation/GeolocationStatus.java     |   36 -
 .../org/apache/cordova/geolocation/Position.java   |  133 -
 .../cordova/geolocation/PositionOptions.java       |   42 -
 .../cordova/globalization/Globalization.java       |  558 -
 .../cordova/globalization/GlobalizationError.java  |  115 -
 .../apache/cordova/globalization/Resources.java    |   99 -
 .../src/org/apache/cordova/globalization/Util.java |  721 -
 .../src/org/apache/cordova/http/FileTransfer.java  |  473 -
 .../org/apache/cordova/http/FileUploadResult.java  |   63 -
 .../src/org/apache/cordova/http/FileUploader.java  |  280 -
 .../ext/src/org/apache/cordova/http/HttpUtils.java |   66 -
 .../ext/src/org/apache/cordova/json4j/JSON.java    |  208 -
 .../src/org/apache/cordova/json4j/JSONArray.java   | 1123 --
 .../org/apache/cordova/json4j/JSONArtifact.java    |  118 -
 .../org/apache/cordova/json4j/JSONException.java   |   55 -
 .../src/org/apache/cordova/json4j/JSONObject.java  | 1367 --
 .../src/org/apache/cordova/json4j/JSONString.java  |   32 -
 .../org/apache/cordova/json4j/JSONStringer.java    |   58 -
 .../src/org/apache/cordova/json4j/JSONWriter.java  |  586 -
 .../cordova/json4j/internal/JSON4JNumber.java      |   22 -
 .../cordova/json4j/internal/JSON4JPBackReader.java |   47 -
 .../json4j/internal/JSON4JStringReader.java        |   54 -
 .../json4j/internal/JSON4JStringWriter.java        |   68 -
 .../apache/cordova/json4j/internal/NumberUtil.java |  109 -
 .../org/apache/cordova/json4j/internal/Parser.java |  338 -
 .../apache/cordova/json4j/internal/Serializer.java |  353 -
 .../cordova/json4j/internal/SerializerVerbose.java |  102 -
 .../org/apache/cordova/json4j/internal/Token.java  |  115 -
 .../apache/cordova/json4j/internal/Tokenizer.java  |  619 -
 .../src/org/apache/cordova/media/AudioPlayer.java  |  654 -
 .../ext/src/org/apache/cordova/media/Media.java    |  344 -
 .../cordova/network/ConnectionInfoAction.java      |  355 -
 .../src/org/apache/cordova/network/Network.java    |   66 -
 .../cordova/notification/ActivityDialog.java       |  146 -
 .../apache/cordova/notification/AlertAction.java   |   83 -
 .../apache/cordova/notification/AlertDialog.java   |   68 -
 .../apache/cordova/notification/BeepAction.java    |  160 -
 .../apache/cordova/notification/ConfirmAction.java |   85 -
 .../apache/cordova/notification/ConfirmDialog.java |  100 -
 .../apache/cordova/notification/Notification.java  |  135 -
 .../cordova/notification/ProgressDialog.java       |  182 -
 .../apache/cordova/notification/VibrateAction.java |   64 -
 .../ext/src/org/apache/cordova/pim/Contact.java    |  430 -
 .../ext/src/org/apache/cordova/ui/SpacerField.java |   71 -
 .../org/apache/cordova/util/ApplicationUtils.java  |  108 -
 .../ext/src/org/apache/cordova/util/FileUtils.java |  730 -
 .../ext/src/org/apache/cordova/util/Log.java       |   83 -
 .../src/org/apache/cordova/util/LogFunction.java   |   41 -
 .../ext/src/org/apache/cordova/util/Logger.java    |  155 -
 .../src/org/apache/cordova/util/StringUtils.java   |  103 -
 .../framework/lib/PluginResult.js                  |   55 +
 lib/cordova-blackberry/framework/lib/config.js     |   22 +
 .../framework/lib/config/default.js                |   76 +
 .../framework/lib/config/user.js                   |   49 +
 .../framework/lib/controllerWebView.js             |   72 +
 lib/cordova-blackberry/framework/lib/event.js      |   84 +
 .../framework/lib/events/applicationEvents.js      |   34 +
 .../framework/lib/events/deviceEvents.js           |   34 +
 lib/cordova-blackberry/framework/lib/exception.js  |   69 +
 lib/cordova-blackberry/framework/lib/framework.js  |  172 +
 lib/cordova-blackberry/framework/lib/jnext.js      |  185 +
 .../framework/lib/overlayWebView.js                |  143 +
 .../framework/lib/plugins/default.js               |   71 +
 .../framework/lib/plugins/event.js                 |   42 +
 .../framework/lib/policy/folderAccess.js           |  175 +
 .../framework/lib/policy/webkitOriginAccess.js     |  123 +
 .../framework/lib/policy/whitelist.js              |  317 +
 lib/cordova-blackberry/framework/lib/server.js     |  121 +
 lib/cordova-blackberry/framework/lib/utils.js      |  549 +
 .../framework/lib/webkitEvent.js                   |   87 +
 .../lib/webkitHandlers/networkResourceRequested.js |  126 +
 lib/cordova-blackberry/framework/lib/webview.js    |  271 +
 .../framework/test/unit/lib/config.js              |   30 +
 .../framework/test/unit/lib/controllerWebView.js   |  107 +
 .../framework/test/unit/lib/event.js               |  139 +
 .../test/unit/lib/events/applicationEvents.js      |   82 +
 .../framework/test/unit/lib/events/deviceEvents.js |   77 +
 .../framework/test/unit/lib/framework.js           |  429 +
 .../framework/test/unit/lib/overlayWebView.js      |  187 +
 .../framework/test/unit/lib/plugins/default.js     |  154 +
 .../framework/test/unit/lib/plugins/event.js       |   78 +
 .../test/unit/lib/policy/webkitOriginAccess.js     |  194 +
 .../framework/test/unit/lib/policy/whitelist.js    |  859 ++
 .../framework/test/unit/lib/server.js              |  293 +
 .../framework/test/unit/lib/utils.js               |  280 +
 .../lib/webkitHandlers/networkResourceRequested.js |  167 +
 .../framework/test/unit/lib/webview.js             |  334 +
 .../javascript/cordova.blackberry.js               |10904 ---------------
 .../javascript/cordova.blackberry10.js             | 6891 +++++++++
 lib/cordova-blackberry/package.json                |   33 +
 .../plugins/Accelerometer/plugin.xml               |   30 +
 .../Accelerometer/src/blackberry10/index.js        |   45 +
 lib/cordova-blackberry/plugins/Battery/plugin.xml  |   30 +
 .../plugins/Battery/src/blackberry10/index.js      |   58 +
 lib/cordova-blackberry/plugins/Camera/plugin.xml   |   30 +
 .../plugins/Camera/src/blackberry10/index.js       |  124 +
 lib/cordova-blackberry/plugins/Contacts/plugin.xml |   41 +
 .../Contacts/src/blackberry10/ContactActivity.js   |   26 +
 .../Contacts/src/blackberry10/ContactAddress.js    |   30 +
 .../Contacts/src/blackberry10/ContactError.js      |   30 +
 .../Contacts/src/blackberry10/ContactField.js      |   27 +
 .../src/blackberry10/ContactFindOptions.js         |   50 +
 .../Contacts/src/blackberry10/ContactName.js       |   39 +
 .../Contacts/src/blackberry10/ContactNews.js       |   26 +
 .../src/blackberry10/ContactOrganization.js        |   22 +
 .../Contacts/src/blackberry10/ContactPhoto.js      |   23 +
 .../Contacts/src/blackberry10/contactConsts.js     |  225 +
 .../Contacts/src/blackberry10/contactUtils.js      |  223 +
 .../plugins/Contacts/src/blackberry10/index.js     |  374 +
 lib/cordova-blackberry/plugins/Device/plugin.xml   |   30 +
 .../plugins/Device/src/blackberry10/index.js       |   60 +
 lib/cordova-blackberry/plugins/Logger/plugin.xml   |   30 +
 .../plugins/Logger/src/blackberry10/index.js       |   25 +
 .../plugins/NetworkStatus/plugin.xml               |   30 +
 .../NetworkStatus/src/blackberry10/index.js        |   59 +
 .../plugins/Notification/plugin.xml                |   30 +
 .../plugins/Notification/src/blackberry10/index.js |   91 +
 .../plugins/SplashScreen/plugin.xml                |   30 +
 .../plugins/SplashScreen/src/blackberry10/index.js |   28 +
 .../plugins/com.blackberry.jpps/plugin.xml         |   30 +
 .../src/blackberry10/native/device/libjpps.so      |  Bin 0 -> 138046 bytes
 .../src/blackberry10/native/simulator/libjpps.so   |  Bin 0 -> 224392 bytes
 .../plugins/com.blackberry.utils/plugin.xml        |   30 +
 .../src/blackberry10/native/device/libutils.so     |  Bin 0 -> 130206 bytes
 .../src/blackberry10/native/simulator/libutils.so  |  Bin 0 -> 183184 bytes
 .../plugin.xml                                     |   31 +
 .../src/blackberry10/native/Makefile               |    8 +
 .../src/blackberry10/native/arm/Makefile           |    8 +
 .../src/blackberry10/native/arm/so.le-v7/Makefile  |    1 +
 .../native/arm/so.le-v7/libpimcontacts.so          |  Bin 0 -> 170350 bytes
 .../src/blackberry10/native/common.mk              |   18 +
 .../src/blackberry10/native/contact_account.cpp    |   74 +
 .../src/blackberry10/native/contact_account.hpp    |   54 +
 .../blackberry10/native/device/libpimcontacts.so   |  Bin 0 -> 170350 bytes
 .../src/blackberry10/native/pim_contacts_js.cpp    |  174 +
 .../src/blackberry10/native/pim_contacts_js.hpp    |   45 +
 .../src/blackberry10/native/pim_contacts_qt.cpp    | 1611 +++
 .../src/blackberry10/native/pim_contacts_qt.hpp    |  148 +
 .../native/simulator/libpimcontacts.so             |  Bin 0 -> 265964 bytes
 .../src/blackberry10/native/x86/Makefile           |    8 +
 .../src/blackberry10/native/x86/so/Makefile        |    1 +
 .../blackberry10/native/x86/so/libpimcontacts.so   |  Bin 0 -> 265964 bytes
 lib/cordova-blackberry/scripts/lib/conf.js         |   21 +
 lib/cordova-blackberry/scripts/lib/utils.js        |  127 +
 lib/cordova-blackberry/scripts/test.js             |   58 +
 lib/cordova-ios/.reviewboardrc                     |    8 +
 lib/cordova-ios/CordovaLib/.gitignore              |    6 -
 lib/cordova-ios/CordovaLib/Classes/CDVCamera.h     |   12 +-
 lib/cordova-ios/CordovaLib/Classes/CDVCamera.m     |  181 +-
 lib/cordova-ios/CordovaLib/Classes/CDVCapture.m    |    2 -
 .../CordovaLib/Classes/CDVConfigParser.h           |    5 +-
 .../CordovaLib/Classes/CDVConfigParser.m           |   26 +
 .../CordovaLib/Classes/CDVInAppBrowser.h           |    5 +
 .../CordovaLib/Classes/CDVInAppBrowser.m           |  158 +-
 .../CordovaLib/Classes/CDVNotification.m           |   12 +-
 .../CordovaLib/Classes/CDVSplashScreen.m           |    7 +-
 lib/cordova-ios/CordovaLib/Classes/CDVWhitelist.h  |    1 +
 lib/cordova-ios/CordovaLib/Classes/CDVWhitelist.m  |   21 +-
 lib/cordova-ios/CordovaLib/VERSION                 |    2 +-
 lib/cordova-ios/CordovaLib/cordova.ios.js          | 6419 ---------
 lib/cordova-ios/CordovaLib/cordova.js              | 6453 +++++++++
 .../CordovaLibTests/CDVWhitelistTests.m            |   18 +
 .../CordovaLibTests/CordovaLibApp/config.xml       |  117 +-
 .../CordovaLibTests/CordovaLibApp/www/index.html   |    2 +-
 .../CordovaTests.xcodeproj/project.pbxproj         |   14 +-
 lib/cordova-ios/FirstRun.md                        |    2 +-
 lib/cordova-ios/bin/create                         |    4 +-
 .../project/__TESTING__.xcodeproj/project.pbxproj  |   14 +-
 .../bin/templates/project/__TESTING__/.gitignore   |    6 -
 .../Resources/de.lproj/Localizable.strings         |    2 +
 .../Resources/en.lproj/Localizable.strings         |    2 +
 .../Resources/es.lproj/Localizable.strings         |    2 +
 .../Resources/se.lproj/Localizable.strings         |    2 +
 .../bin/templates/project/__TESTING__/config.xml   |  119 +-
 .../bin/templates/project/cordova/build            |   51 -
 .../bin/templates/project/cordova/clean            |   44 +
 .../bin/templates/project/cordova/emulate          |   20 +-
 .../templates/project/cordova/lib/install-device   |   30 +
 .../templates/project/cordova/lib/install-emulator |  130 +
 .../bin/templates/project/cordova/lib/list-devices |   22 +
 .../project/cordova/lib/list-emulator-images       |   34 +
 .../project/cordova/lib/list-started-emulators     |   36 +
 .../templates/project/cordova/lib/sim.applescript  |   14 +
 .../templates/project/cordova/lib/start-emulator   |   35 +
 .../bin/templates/project/cordova/release          |   51 -
 lib/cordova-ios/bin/templates/project/cordova/run  |   97 +-
 .../bin/templates/project/cordova/version          |   40 +
 .../bin/templates/project/www/index.html           |    2 +-
 platforms.js                                       |    2 +-
 spec/cordova-cli/platform.spec.js                  |    7 +-
 spec/cordova-cli/plugin.spec.js                    |   18 -
 .../platform-script/android/android_parser.spec.js |    2 +-
 spec/platform-script/ios/ios_parser.spec.js        |    2 +-
 src/plugin.js                                      |    3 +-
 424 files changed, 48895 insertions(+), 40176 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-android/.reviewboardrc
----------------------------------------------------------------------
diff --git a/lib/cordova-android/.reviewboardrc b/lib/cordova-android/.reviewboardrc
new file mode 100644
index 0000000..30e9587
--- /dev/null
+++ b/lib/cordova-android/.reviewboardrc
@@ -0,0 +1,8 @@
+#
+# Settings for post-review (used for uploading diffs to reviews.apache.org).
+#
+GUESS_FIELDS = True
+OPEN_BROWSER = True
+TARGET_GROUPS = 'cordova'
+REVIEWBOARD_URL = 'http://reviews.apache.org'
+

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-android/NOTICE
----------------------------------------------------------------------
diff --git a/lib/cordova-android/NOTICE b/lib/cordova-android/NOTICE
index b2157b6..b8172a6 100644
--- a/lib/cordova-android/NOTICE
+++ b/lib/cordova-android/NOTICE
@@ -1,5 +1,17 @@
 Apache Cordova
 Copyright 2012 The Apache Software Foundation
 
-This product includes software developed by
+This product includes software developed at
 The Apache Software Foundation (http://www.apache.org)
+
+=========================================================================
+==  NOTICE file corresponding to the section 4 d of                    ==
+==  the Apache License, Version 2.0,                                   ==
+==  in this case for the Android-specific code.                        ==
+=========================================================================
+
+Android Code
+Copyright 2005-2008 The Android Open Source Project
+
+This product includes software developed as part of
+The Android Open Source Project (http://source.android.com).

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-android/README.md
----------------------------------------------------------------------
diff --git a/lib/cordova-android/README.md b/lib/cordova-android/README.md
index 5d2f7de..a785943 100755
--- a/lib/cordova-android/README.md
+++ b/lib/cordova-android/README.md
@@ -16,23 +16,7 @@ Requires
 - Android SDK [http://developer.android.com](http://developer.android.com)
 - Apache Commons Codec [http://commons.apache.org/codec/](http://commons.apache.org/codec/)
 
-Test Requirements
----
-- JUnit - [https://github.com/KentBeck/junit](https://github.com/KentBeck/junit)
  
-Building
----
-
-To create your `cordova.jar` file, copy the commons codec:
-
-    mv commons-codec-1.7.jar framework/libs
-
-then run in the framework directory:
-
-    android update project -p . -t android-17
-    ant jar
-
-
 Cordova Android Developer Tools
 ---
 
@@ -93,6 +77,22 @@ Importing a Cordova Android Project into Eclipse
 5. Right click on the project root: Run as > Run Configurations
 6. Click on the Target tab and select Manual (this way you can choose the emulator or device to build to)
 
+Building without the Tooling
+---
+Note: The Developer Tools handle this.  This is only to be done if the tooling fails, or if 
+you are developing directly against the framework.
+
+
+To create your `cordova.jar` file, copy the commons codec:
+
+    mv commons-codec-1.7.jar framework/libs
+
+then run in the framework directory:
+
+    android update project -p . -t android-17
+    ant jar
+
+
 Running Tests
 ----
 Please see details under test/README.md.
@@ -101,5 +101,5 @@ Further Reading
 ---
 
 - [http://developer.android.com](http://developer.android.com)
-- [http://incubator.apache.org/cordova/](http://incubator.apache.org/cordova/)
+- [http://cordova.apache.org/](http://cordova.apache.org)
 - [http://wiki.apache.org/cordova/](http://wiki.apache.org/cordova/)

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-android/VERSION
----------------------------------------------------------------------
diff --git a/lib/cordova-android/VERSION b/lib/cordova-android/VERSION
index 24ba9a3..1277c83 100644
--- a/lib/cordova-android/VERSION
+++ b/lib/cordova-android/VERSION
@@ -1 +1 @@
-2.7.0
+2.8.0rc1

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-android/bin/templates/cordova/lib/cordova
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/cordova/lib/cordova b/lib/cordova-android/bin/templates/cordova/lib/cordova
old mode 100644
new mode 100755

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-android/bin/templates/cordova/lib/install-device
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/cordova/lib/install-device b/lib/cordova-android/bin/templates/cordova/lib/install-device
old mode 100644
new mode 100755

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-android/bin/templates/cordova/lib/install-emulator
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/cordova/lib/install-emulator b/lib/cordova-android/bin/templates/cordova/lib/install-emulator
old mode 100644
new mode 100755

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-android/bin/templates/cordova/lib/list-devices
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/cordova/lib/list-devices b/lib/cordova-android/bin/templates/cordova/lib/list-devices
old mode 100644
new mode 100755

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-android/bin/templates/cordova/lib/list-emulator-images
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/cordova/lib/list-emulator-images b/lib/cordova-android/bin/templates/cordova/lib/list-emulator-images
old mode 100644
new mode 100755

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-android/bin/templates/cordova/lib/list-started-emulators
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/cordova/lib/list-started-emulators b/lib/cordova-android/bin/templates/cordova/lib/list-started-emulators
old mode 100644
new mode 100755

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-android/bin/templates/cordova/lib/start-emulator
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/cordova/lib/start-emulator b/lib/cordova-android/bin/templates/cordova/lib/start-emulator
old mode 100644
new mode 100755

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-android/bin/templates/cordova/version
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/cordova/version b/lib/cordova-android/bin/templates/cordova/version
old mode 100644
new mode 100755

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-android/bin/templates/project/assets/www/index.html
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/templates/project/assets/www/index.html b/lib/cordova-android/bin/templates/project/assets/www/index.html
index 564ce18..e84fbd7 100644
--- a/lib/cordova-android/bin/templates/project/assets/www/index.html
+++ b/lib/cordova-android/bin/templates/project/assets/www/index.html
@@ -33,7 +33,7 @@
                 <p class="event received">Device is Ready</p>
             </div>
         </div>
-        <script type="text/javascript" src="cordova-2.7.0.js"></script>
+        <script type="text/javascript" src="cordova.js"></script>
         <script type="text/javascript" src="js/index.js"></script>
         <script type="text/javascript">
             app.initialize();

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-android/bin/update
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/update b/lib/cordova-android/bin/update
index 0e86886..9a968b1 100755
--- a/lib/cordova-android/bin/update
+++ b/lib/cordova-android/bin/update
@@ -45,9 +45,9 @@ fi
 
 # cleanup after exit and/or on error
 function on_exit {
-    if [ -f "$BUILD_PATH"/framework/assets/www/cordova-$VERSION.js ]
+    if [ -f "$BUILD_PATH"/framework/assets/www/cordova.js ]
     then
-        rm "$BUILD_PATH"/framework/assets/www/cordova-$VERSION.js
+        rm "$BUILD_PATH"/framework/assets/www/cordova.js
     fi
     if [ -f "$BUILD_PATH"/framework/cordova-$VERSION.jar ]
     then
@@ -122,18 +122,25 @@ fi
 # copy cordova.js, cordova.jar and res/xml
 if [ -d "$BUILD_PATH"/framework ]
 then
-    cp "$BUILD_PATH"/framework/assets/www/cordova-$VERSION.js "$PROJECT_PATH"/assets/www/cordova-$VERSION.js
+    cp "$BUILD_PATH"/framework/assets/www/cordova.js "$PROJECT_PATH"/assets/www/cordova.js
     cp "$BUILD_PATH"/framework/cordova-$VERSION.jar "$PROJECT_PATH"/libs/cordova-$VERSION.jar
 else
-    cp "$BUILD_PATH"/cordova-$VERSION.js "$PROJECT_PATH"/assets/www/cordova-$VERSION.js
+    cp "$BUILD_PATH"/cordova.js "$PROJECT_PATH"/assets/www/cordova.js
     cp "$BUILD_PATH"/cordova-$VERSION.jar "$PROJECT_PATH"/libs/cordova-$VERSION.jar
 fi
 
 # creating cordova folder and copying run/build/log/launch scripts
+mkdir "$PROJECT_PATH"/cordova
+mkdir "$PROJECT_PATH"/cordova/lib
 cp "$BUILD_PATH"/bin/templates/cordova/appinfo.jar "$PROJECT_PATH"/cordova/appinfo.jar
-cp "$BUILD_PATH"/bin/templates/cordova/cordova "$PROJECT_PATH"/cordova/cordova
 cp "$BUILD_PATH"/bin/templates/cordova/build "$PROJECT_PATH"/cordova/build
-cp "$BUILD_PATH"/bin/templates/cordova/release "$PROJECT_PATH"/cordova/release
 cp "$BUILD_PATH"/bin/templates/cordova/clean "$PROJECT_PATH"/cordova/clean
 cp "$BUILD_PATH"/bin/templates/cordova/log "$PROJECT_PATH"/cordova/log
 cp "$BUILD_PATH"/bin/templates/cordova/run "$PROJECT_PATH"/cordova/run
+cp "$BUILD_PATH"/bin/templates/cordova/lib/cordova "$PROJECT_PATH"/cordova/lib/cordova
+cp "$BUILD_PATH"/bin/templates/cordova/lib/install-device "$PROJECT_PATH"/cordova/lib/install-device
+cp "$BUILD_PATH"/bin/templates/cordova/lib/install-emulator "$PROJECT_PATH"/cordova/lib/install-emulator
+cp "$BUILD_PATH"/bin/templates/cordova/lib/list-devices "$PROJECT_PATH"/cordova/lib/list-devices
+cp "$BUILD_PATH"/bin/templates/cordova/lib/list-emulator-images "$PROJECT_PATH"/cordova/lib/list-emulator-images
+cp "$BUILD_PATH"/bin/templates/cordova/lib/list-started-emulators "$PROJECT_PATH"/cordova/lib/list-started-emulators
+cp "$BUILD_PATH"/bin/templates/cordova/lib/start-emulator "$PROJECT_PATH"/cordova/lib/start-emulator

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-android/bin/update.js
----------------------------------------------------------------------
diff --git a/lib/cordova-android/bin/update.js b/lib/cordova-android/bin/update.js
index 244dcc1..748d602 100644
--- a/lib/cordova-android/bin/update.js
+++ b/lib/cordova-android/bin/update.js
@@ -183,11 +183,17 @@ if(fso.FolderExists(ROOT + '\\framework')) {
 createAppInfoJar();
 WScript.Echo("Copying cordova command tools...");
 exec('%comspec% /c copy "'+ROOT+'"\\bin\\templates\\cordova\\appinfo.jar ' + PROJECT_PATH + '\\cordova\\appinfo.jar /Y');
-exec('%comspec% /c copy "'+ROOT+'"\\bin\\templates\\cordova\\cordova.js ' + PROJECT_PATH + '\\cordova\\cordova.js /Y');
 exec('%comspec% /c copy "'+ROOT+'"\\bin\\templates\\cordova\\cordova.bat ' + PROJECT_PATH + '\\cordova\\cordova.bat /Y');
 exec('%comspec% /c copy "'+ROOT+'"\\bin\\templates\\cordova\\clean.bat ' + PROJECT_PATH + '\\cordova\\clean.bat /Y');
 exec('%comspec% /c copy "'+ROOT+'"\\bin\\templates\\cordova\\build.bat ' + PROJECT_PATH + '\\cordova\\build.bat /Y');
 exec('%comspec% /c copy "'+ROOT+'"\\bin\\templates\\cordova\\log.bat ' + PROJECT_PATH + '\\cordova\\log.bat /Y');
 exec('%comspec% /c copy "'+ROOT+'"\\bin\\templates\\cordova\\run.bat ' + PROJECT_PATH + '\\cordova\\run.bat /Y');
+exec('%comspec% /c copy "'+ROOT+'"\\bin\\templates\\cordova\\lib\\cordova.js ' + PROJECT_PATH + '\\cordova\\lib\\cordova.js /Y');
+exec('%comspec% /c copy "'+ROOT+'"\\bin\\templates\\cordova\\lib\\install-device.bat ' + PROJECT_PATH + '\\cordova\\lib\\install-device.bat /Y');
+exec('%comspec% /c copy "'+ROOT+'"\\bin\\templates\\cordova\\lib\\install-emulator.bat ' + PROJECT_PATH + '\\cordova\\lib\\install-emulator.bat /Y');
+exec('%comspec% /c copy "'+ROOT+'"\\bin\\templates\\cordova\\lib\\list-emulator-images.bat ' + PROJECT_PATH + '\\cordova\\lib\\list-emulator-images.bat /Y');
+exec('%comspec% /c copy "'+ROOT+'"\\bin\\templates\\cordova\\lib\\list-devices.bat ' + PROJECT_PATH + '\\cordova\\lib\\list-devices.bat /Y');
+exec('%comspec% /c copy "'+ROOT+'"\\bin\\templates\\cordova\\lib\\list-started-emulators.bat ' + PROJECT_PATH + '\\cordova\\lib\\list-started-emulators.bat /Y');
+exec('%comspec% /c copy "'+ROOT+'"\\bin\\templates\\cordova\\lib\\start-emulator.bat ' + PROJECT_PATH + '\\cordova\\lib\\start-emulator.bat /Y');
 
 cleanup();

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-android/framework/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/lib/cordova-android/framework/AndroidManifest.xml b/lib/cordova-android/framework/AndroidManifest.xml
index 8405172..f1336ea 100755
--- a/lib/cordova-android/framework/AndroidManifest.xml
+++ b/lib/cordova-android/framework/AndroidManifest.xml
@@ -50,16 +50,11 @@
 
     <application android:icon="@drawable/icon" android:label="@string/app_name"
         android:debuggable="true">
-        <activity android:name=".StandAlone" android:windowSoftInputMode="adjustPan"
-               android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
         <activity android:name="org.apache.cordova.DroidGap" android:label="@string/app_name"
                   android:configChanges="orientation|keyboardHidden">
             <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
     </application>

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-android/framework/assets/www/cordova.js
----------------------------------------------------------------------
diff --git a/lib/cordova-android/framework/assets/www/cordova.js b/lib/cordova-android/framework/assets/www/cordova.js
index 2941307..3730047 100644
--- a/lib/cordova-android/framework/assets/www/cordova.js
+++ b/lib/cordova-android/framework/assets/www/cordova.js
@@ -1,9 +1,5 @@
 // Platform: android
-
-// commit d0ffb852378ff018bac2f3b12c38098a19b8ce00
-
-// File generated at :: Thu Apr 18 2013 15:10:54 GMT-0400 (EDT)
-
+// 2.8.0rc1-0-g22bc4d8
 /*
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
@@ -22,26 +18,36 @@
  specific language governing permissions and limitations
  under the License.
 */
-
 ;(function() {
-
+var CORDOVA_JS_BUILD_LABEL = '2.8.0rc1-0-g22bc4d8';
 // file: lib/scripts/require.js
 
 var require,
     define;
 
 (function () {
-    var modules = {};
+    var modules = {},
     // Stack of moduleIds currently being built.
-    var requireStack = [];
+        requireStack = [],
     // Map of module ID -> index into requireStack of modules currently being built.
-    var inProgressModules = {};
+        inProgressModules = {},
+        SEPERATOR = ".";
+
+
 
     function build(module) {
-        var factory = module.factory;
+        var factory = module.factory,
+            localRequire = function (id) {
+                var resultantId = id;
+                //Its a relative path, so lop off the last portion and add the id (minus "./")
+                if (id.charAt(0) === ".") {
+                    resultantId = module.id.slice(0, module.id.lastIndexOf(SEPERATOR)) + SEPERATOR + id.slice(2);
+                }
+                return require(resultantId);
+            };
         module.exports = {};
         delete module.factory;
-        factory(require, module.exports, module);
+        factory(localRequire, module.exports, module);
         return module.exports;
     }
 
@@ -1314,8 +1320,6 @@ var CaptureAudioOptions = function(){
     this.limit = 1;
     // Maximum duration of a single sound clip in seconds.
     this.duration = 0;
-    // The selected audio mode. Must match with one of the elements in supportedAudioModes array.
-    this.mode = null;
 };
 
 module.exports = CaptureAudioOptions;
@@ -1356,8 +1360,6 @@ define("cordova/plugin/CaptureImageOptions", function(require, exports, module)
 var CaptureImageOptions = function(){
     // Upper limit of images user can take. Value must be equal or greater than 1.
     this.limit = 1;
-    // The selected image mode. Must match with one of the elements in supportedImageModes array.
-    this.mode = null;
 };
 
 module.exports = CaptureImageOptions;
@@ -1375,8 +1377,6 @@ var CaptureVideoOptions = function(){
     this.limit = 1;
     // Maximum duration of a single video clip in seconds.
     this.duration = 0;
-    // The selected video mode. Must match with one of the elements in supportedVideoModes array.
-    this.mode = null;
 };
 
 module.exports = CaptureVideoOptions;
@@ -5081,12 +5081,16 @@ function Device() {
 
     channel.onCordovaReady.subscribe(function() {
         me.getInfo(function(info) {
+            var buildLabel = info.cordova;
+            if (buildLabel != CORDOVA_JS_BUILD_LABEL) {
+                buildLabel += ' JS=' + CORDOVA_JS_BUILD_LABEL;
+            }
             me.available = true;
             me.platform = info.platform;
             me.version = info.version;
             me.name = info.name;
             me.uuid = info.uuid;
-            me.cordova = info.cordova;
+            me.cordova = buildLabel;
             me.model = info.model;
             channel.onCordovaInfoReady.fire();
         },function(e) {
@@ -5843,10 +5847,13 @@ var exec    = require('cordova/exec');
 var utils   = require('cordova/utils');
 
 var UseConsole   = true;
+var UseLogger    = true;
 var Queued       = [];
 var DeviceReady  = false;
 var CurrentLevel;
 
+var originalConsole = console;
+
 /**
  * Logging levels
  */
@@ -5907,8 +5914,7 @@ logger.level = function (value) {
  * Getter/Setter for the useConsole functionality
  *
  * When useConsole is true, the logger will log via the
- * browser 'console' object.  Otherwise, it will use the
- * native Logger plugin.
+ * browser 'console' object.
  */
 logger.useConsole = function (value) {
     if (arguments.length) UseConsole = !!value;
@@ -5933,6 +5939,18 @@ logger.useConsole = function (value) {
 };
 
 /**
+ * Getter/Setter for the useLogger functionality
+ *
+ * When useLogger is true, the logger will log via the
+ * native Logger plugin.
+ */
+logger.useLogger = function (value) {
+    // Enforce boolean
+    if (arguments.length) UseLogger = !!value;
+    return UseLogger;
+};
+
+/**
  * Logs a message at the LOG level.
  *
  * Parameters passed after message are used applied to
@@ -6001,24 +6019,26 @@ logger.logLevel = function(level /* , ... */) {
         return;
     }
 
-    // if not using the console, use the native logger
-    if (!UseConsole) {
+    // Log using the native logger if that is enabled
+    if (UseLogger) {
         exec(null, null, "Logger", "logLevel", [level, message]);
-        return;
     }
 
-    // make sure console is not using logger
-    if (console.__usingCordovaLogger) {
-        throw new Error("console and logger are too intertwingly");
-    }
+    // Log using the console if that is enabled
+    if (UseConsole) {
+        // make sure console is not using logger
+        if (console.__usingCordovaLogger) {
+            throw new Error("console and logger are too intertwingly");
+        }
 
-    // log to the console
-    switch (level) {
-        case logger.LOG:   console.log(message); break;
-        case logger.ERROR: console.log("ERROR: " + message); break;
-        case logger.WARN:  console.log("WARN: "  + message); break;
-        case logger.INFO:  console.log("INFO: "  + message); break;
-        case logger.DEBUG: console.log("DEBUG: " + message); break;
+        // log to the console
+        switch (level) {
+            case logger.LOG:   originalConsole.log(message); break;
+            case logger.ERROR: originalConsole.log("ERROR: " + message); break;
+            case logger.WARN:  originalConsole.log("WARN: "  + message); break;
+            case logger.INFO:  originalConsole.log("INFO: "  + message); break;
+            case logger.DEBUG: originalConsole.log("DEBUG: " + message); break;
+        }
     }
 };
 
@@ -6279,7 +6299,7 @@ module.exports = {
         // Some platforms take an array of button label names.
         // Other platforms take a comma separated list.
         // For compatibility, we convert to the desired type based on the platform.
-        if (platform.id == "android" || platform.id == "ios" || platform.id == "windowsphone") {
+        if (platform.id == "android" || platform.id == "ios" || platform.id == "windowsphone" || platform.id == "blackberry10") {
             if (typeof _buttonLabels === 'string') {
                 var buttonLabelString = _buttonLabels;
                 _buttonLabels = _buttonLabels.split(","); // not crazy about changing the var type here
@@ -6303,12 +6323,14 @@ module.exports = {
      * @param {Function} resultCallback     The callback that is called when user clicks on a button.
      * @param {String} title                Title of the dialog (default: "Prompt")
      * @param {Array} buttonLabels          Array of strings for the button labels (default: ["OK","Cancel"])
+     * @param {String} defaultText          Textbox input value (default: "Default text")
      */
-    prompt: function(message, resultCallback, title, buttonLabels) {
+    prompt: function(message, resultCallback, title, buttonLabels, defaultText) {
         var _message = (message || "Prompt message");
         var _title = (title || "Prompt");
         var _buttonLabels = (buttonLabels || ["OK","Cancel"]);
-        exec(resultCallback, null, "Notification", "prompt", [_message, _title, _buttonLabels]);
+        var _defaultText = (defaultText || "Default text");
+        exec(resultCallback, null, "Notification", "prompt", [_message, _title, _buttonLabels, _defaultText]);
     },
 
     /**
@@ -6650,9 +6672,7 @@ function UUIDcreatePart(length) {
 
 });
 
-
 window.cordova = require('cordova');
-
 // file: lib/scripts/bootstrap.js
 
 (function (context) {
@@ -6768,7 +6788,7 @@ require('cordova/channel').onNativeReady.fire();
     // See plugman's plugin_loader.js for the details of this object.
     // This function is only called if the really is a plugins array that isn't empty.
     // Otherwise the XHR response handler will just call finishPluginLoading().
-    function handlePluginsObject(modules) {
+    function handlePluginsObject(modules, path) {
         // First create the callback for when all plugins are loaded.
         var mapper = context.cordova.require('cordova/modulemapper');
         onScriptLoadingComplete = function() {
@@ -6802,35 +6822,49 @@ require('cordova/channel').onNativeReady.fire();
 
         // Now inject the scripts.
         for (var i = 0; i < modules.length; i++) {
-            injectScript(modules[i].file);
+            injectScript(path + modules[i].file);
         }
     }
 
-
+    // Find the root of the app
+    var path = '';
+    var scripts = document.getElementsByTagName('script');
+    var term = 'cordova.js';
+    for (var n = scripts.length-1; n>-1; n--) {
+        var src = scripts[n].src;
+        if (src.indexOf(term) == (src.length - term.length)) {
+            path = src.substring(0, src.length - term.length);
+            break;
+        }
+    }
     // Try to XHR the cordova_plugins.json file asynchronously.
-    try { // we commented we were going to try, so let us actually try and catch
-        var xhr = new context.XMLHttpRequest();
-        xhr.onload = function() {
-            // If the response is a JSON string which composes an array, call handlePluginsObject.
-            // If the request fails, or the response is not a JSON array, just call finishPluginLoading.
-            var obj = JSON.parse(this.responseText);
-            if (obj && obj instanceof Array && obj.length > 0) {
-                handlePluginsObject(obj);
-            } else {
-                finishPluginLoading();
-            }
-        };
-        xhr.onerror = function() {
+    var xhr = new XMLHttpRequest();
+    xhr.onload = function() {
+        // If the response is a JSON string which composes an array, call handlePluginsObject.
+        // If the request fails, or the response is not a JSON array, just call finishPluginLoading.
+        var obj;
+        try {
+            obj = (this.status == 0 || this.status == 200) && this.responseText && JSON.parse(this.responseText);
+        } catch (err) {
+            // obj will be undefined.
+        }
+        if (Array.isArray(obj) && obj.length > 0) {
+            handlePluginsObject(obj, path);
+        } else {
             finishPluginLoading();
-        };
-        xhr.open('GET', 'cordova_plugins.json', true); // Async
+        }
+    };
+    xhr.onerror = function() {
+        finishPluginLoading();
+    };
+    var plugins_json = path + 'cordova_plugins.json';
+    try { // we commented we were going to try, so let us actually try and catch
+        xhr.open('GET', plugins_json, true); // Async
         xhr.send();
-    }
-    catch(err){
+    } catch(err){
         finishPluginLoading();
     }
 }(window));
 
 
-
 })();
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-android/framework/assets/www/index.html
----------------------------------------------------------------------
diff --git a/lib/cordova-android/framework/assets/www/index.html b/lib/cordova-android/framework/assets/www/index.html
index 7723a7b..57ad752 100644
--- a/lib/cordova-android/framework/assets/www/index.html
+++ b/lib/cordova-android/framework/assets/www/index.html
@@ -19,7 +19,7 @@
 <html>
   <head>
     <title></title>
-    <script src="cordova-2.7.0.js"></script>
+    <script src="cordova.js"></script>
   </head>
   <body>
 

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-android/framework/default.properties
----------------------------------------------------------------------
diff --git a/lib/cordova-android/framework/default.properties b/lib/cordova-android/framework/default.properties
deleted file mode 100644
index d4e24dc..0000000
--- a/lib/cordova-android/framework/default.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-# This file is automatically generated by Android Tools.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-#
-# This file must be checked in Version Control Systems.
-#
-# To customize properties used by the Ant build system use,
-# "build.properties", and override values to adapt the script to your
-# project structure.
-
-# Indicates whether an apk should be generated for each density.
-split.density=false
-# Project target.
-target=android-14
-apk-configurations=

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-android/framework/project.properties
----------------------------------------------------------------------
diff --git a/lib/cordova-android/framework/project.properties b/lib/cordova-android/framework/project.properties
index d556741..2f39d91 100644
--- a/lib/cordova-android/framework/project.properties
+++ b/lib/cordova-android/framework/project.properties
@@ -10,7 +10,7 @@
 # Indicates whether an apk should be generated for each density.
 split.density=false
 # Project target.
-target=Google Inc.:Google APIs:17
+target=android-17
 apk-configurations=
 renderscript.opt.level=O0
 android.library=true

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

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-android/framework/src/com/squareup/okhttp/Address.java
----------------------------------------------------------------------
diff --git a/lib/cordova-android/framework/src/com/squareup/okhttp/Address.java b/lib/cordova-android/framework/src/com/squareup/okhttp/Address.java
new file mode 100644
index 0000000..cd41ac9
--- /dev/null
+++ b/lib/cordova-android/framework/src/com/squareup/okhttp/Address.java
@@ -0,0 +1,111 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * 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;
+
+import java.net.Proxy;
+import java.net.UnknownHostException;
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.SSLSocketFactory;
+
+import static com.squareup.okhttp.internal.Util.equal;
+
+/**
+ * A specification for a connection to an origin server. For simple connections,
+ * this is the server's hostname and port. If an explicit proxy is requested (or
+ * {@link Proxy#NO_PROXY no proxy} is explicitly requested), this also includes
+ * that proxy information. For secure connections the address also includes the
+ * SSL socket factory and hostname verifier.
+ *
+ * <p>HTTP requests that share the same {@code Address} may also share the same
+ * {@link Connection}.
+ */
+public final class Address {
+  final Proxy proxy;
+  final String uriHost;
+  final int uriPort;
+  final SSLSocketFactory sslSocketFactory;
+  final HostnameVerifier hostnameVerifier;
+
+  public Address(String uriHost, int uriPort, SSLSocketFactory sslSocketFactory,
+      HostnameVerifier hostnameVerifier, Proxy proxy) throws UnknownHostException {
+    if (uriHost == null) throw new NullPointerException("uriHost == null");
+    if (uriPort <= 0) throw new IllegalArgumentException("uriPort <= 0: " + uriPort);
+    this.proxy = proxy;
+    this.uriHost = uriHost;
+    this.uriPort = uriPort;
+    this.sslSocketFactory = sslSocketFactory;
+    this.hostnameVerifier = hostnameVerifier;
+  }
+
+  /** Returns the hostname of the origin server. */
+  public String getUriHost() {
+    return uriHost;
+  }
+
+  /**
+   * Returns the port of the origin server; typically 80 or 443. Unlike
+   * may {@code getPort()} accessors, this method never returns -1.
+   */
+  public int getUriPort() {
+    return uriPort;
+  }
+
+  /**
+   * Returns the SSL socket factory, or null if this is not an HTTPS
+   * address.
+   */
+  public SSLSocketFactory getSslSocketFactory() {
+    return sslSocketFactory;
+  }
+
+  /**
+   * Returns the hostname verifier, or null if this is not an HTTPS
+   * address.
+   */
+  public HostnameVerifier getHostnameVerifier() {
+    return hostnameVerifier;
+  }
+
+  /**
+   * Returns this address's explicitly-specified HTTP proxy, or null to
+   * delegate to the HTTP client's proxy selector.
+   */
+  public Proxy getProxy() {
+    return proxy;
+  }
+
+  @Override public boolean equals(Object other) {
+    if (other instanceof Address) {
+      Address that = (Address) other;
+      return equal(this.proxy, that.proxy)
+          && this.uriHost.equals(that.uriHost)
+          && this.uriPort == that.uriPort
+          && equal(this.sslSocketFactory, that.sslSocketFactory)
+          && equal(this.hostnameVerifier, that.hostnameVerifier);
+    }
+    return false;
+  }
+
+  @Override public int hashCode() {
+    int result = 17;
+    result = 31 * result + uriHost.hashCode();
+    result = 31 * result + uriPort;
+    result = 31 * result + (sslSocketFactory != null ? sslSocketFactory.hashCode() : 0);
+    result = 31 * result + (hostnameVerifier != null ? hostnameVerifier.hashCode() : 0);
+    result = 31 * result + (proxy != null ? proxy.hashCode() : 0);
+    return result;
+  }
+}

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-android/framework/src/com/squareup/okhttp/Connection.java
----------------------------------------------------------------------
diff --git a/lib/cordova-android/framework/src/com/squareup/okhttp/Connection.java b/lib/cordova-android/framework/src/com/squareup/okhttp/Connection.java
new file mode 100644
index 0000000..6a6c84d
--- /dev/null
+++ b/lib/cordova-android/framework/src/com/squareup/okhttp/Connection.java
@@ -0,0 +1,291 @@
+/*
+ *  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 com.squareup.okhttp;
+
+import com.squareup.okhttp.internal.Platform;
+import com.squareup.okhttp.internal.http.HttpAuthenticator;
+import com.squareup.okhttp.internal.http.HttpEngine;
+import com.squareup.okhttp.internal.http.HttpTransport;
+import com.squareup.okhttp.internal.http.RawHeaders;
+import com.squareup.okhttp.internal.http.SpdyTransport;
+import com.squareup.okhttp.internal.spdy.SpdyConnection;
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.Closeable;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.Proxy;
+import java.net.Socket;
+import java.net.URL;
+import java.util.Arrays;
+import javax.net.ssl.SSLSocket;
+
+import static java.net.HttpURLConnection.HTTP_OK;
+import static java.net.HttpURLConnection.HTTP_PROXY_AUTH;
+
+/**
+ * Holds the sockets and streams of an HTTP, HTTPS, or HTTPS+SPDY connection,
+ * which may be used for multiple HTTP request/response exchanges. Connections
+ * may be direct to the origin server or via a proxy.
+ *
+ * <p>Typically instances of this class are created, connected and exercised
+ * automatically by the HTTP client. Applications may use this class to monitor
+ * HTTP connections as members of a {@link ConnectionPool connection pool}.
+ *
+ * <p>Do not confuse this class with the misnamed {@code HttpURLConnection},
+ * which isn't so much a connection as a single request/response exchange.
+ *
+ * <h3>Modern TLS</h3>
+ * There are tradeoffs when selecting which options to include when negotiating
+ * a secure connection to a remote host. Newer TLS options are quite useful:
+ * <ul>
+ * <li>Server Name Indication (SNI) enables one IP address to negotiate secure
+ * connections for multiple domain names.
+ * <li>Next Protocol Negotiation (NPN) enables the HTTPS port (443) to be used
+ * for both HTTP and SPDY transports.
+ * </ul>
+ * Unfortunately, older HTTPS servers refuse to connect when such options are
+ * presented. Rather than avoiding these options entirely, this class allows a
+ * connection to be attempted with modern options and then retried without them
+ * should the attempt fail.
+ */
+public final class Connection implements Closeable {
+  private static final byte[] NPN_PROTOCOLS = new byte[] {
+      6, 's', 'p', 'd', 'y', '/', '3',
+      8, 'h', 't', 't', 'p', '/', '1', '.', '1'
+  };
+  private static final byte[] SPDY3 = new byte[] {
+      's', 'p', 'd', 'y', '/', '3'
+  };
+  private static final byte[] HTTP_11 = new byte[] {
+      'h', 't', 't', 'p', '/', '1', '.', '1'
+  };
+
+  private final Route route;
+
+  private Socket socket;
+  private InputStream in;
+  private OutputStream out;
+  private boolean connected = false;
+  private SpdyConnection spdyConnection;
+  private int httpMinorVersion = 1; // Assume HTTP/1.1
+  private long idleStartTimeNs;
+
+  public Connection(Route route) {
+    this.route = route;
+  }
+
+  public void connect(int connectTimeout, int readTimeout, TunnelRequest tunnelRequest)
+      throws IOException {
+    if (connected) {
+      throw new IllegalStateException("already connected");
+    }
+    connected = true;
+    socket = (route.proxy.type() != Proxy.Type.HTTP) ? new Socket(route.proxy) : new Socket();
+    socket.connect(route.inetSocketAddress, connectTimeout);
+    socket.setSoTimeout(readTimeout);
+    in = socket.getInputStream();
+    out = socket.getOutputStream();
+
+    if (route.address.sslSocketFactory != null) {
+      upgradeToTls(tunnelRequest);
+    }
+
+    // Use MTU-sized buffers to send fewer packets.
+    int mtu = Platform.get().getMtu(socket);
+    in = new BufferedInputStream(in, mtu);
+    out = new BufferedOutputStream(out, mtu);
+  }
+
+  /**
+   * Create an {@code SSLSocket} and perform the TLS handshake and certificate
+   * validation.
+   */
+  private void upgradeToTls(TunnelRequest tunnelRequest) throws IOException {
+    Platform platform = Platform.get();
+
+    // Make an SSL Tunnel on the first message pair of each SSL + proxy connection.
+    if (requiresTunnel()) {
+      makeTunnel(tunnelRequest);
+    }
+
+    // Create the wrapper over connected socket.
+    socket = route.address.sslSocketFactory
+        .createSocket(socket, route.address.uriHost, route.address.uriPort, true /* autoClose */);
+    SSLSocket sslSocket = (SSLSocket) socket;
+    if (route.modernTls) {
+      platform.enableTlsExtensions(sslSocket, route.address.uriHost);
+    } else {
+      platform.supportTlsIntolerantServer(sslSocket);
+    }
+
+    if (route.modernTls) {
+      platform.setNpnProtocols(sslSocket, NPN_PROTOCOLS);
+    }
+
+    // Force handshake. This can throw!
+    sslSocket.startHandshake();
+
+    // Verify that the socket's certificates are acceptable for the target host.
+    if (!route.address.hostnameVerifier.verify(route.address.uriHost, sslSocket.getSession())) {
+      throw new IOException("Hostname '" + route.address.uriHost + "' was not verified");
+    }
+
+    out = sslSocket.getOutputStream();
+    in = sslSocket.getInputStream();
+
+    byte[] selectedProtocol;
+    if (route.modernTls
+        && (selectedProtocol = platform.getNpnSelectedProtocol(sslSocket)) != null) {
+      if (Arrays.equals(selectedProtocol, SPDY3)) {
+        sslSocket.setSoTimeout(0); // SPDY timeouts are set per-stream.
+        spdyConnection = new SpdyConnection.Builder(route.address.getUriHost(), true, in, out)
+            .build();
+      } else if (!Arrays.equals(selectedProtocol, HTTP_11)) {
+        throw new IOException(
+            "Unexpected NPN transport " + new String(selectedProtocol, "ISO-8859-1"));
+      }
+    }
+  }
+
+  /** Returns true if {@link #connect} has been attempted on this connection. */
+  public boolean isConnected() {
+    return connected;
+  }
+
+  @Override public void close() throws IOException {
+    socket.close();
+  }
+
+  /** Returns the route used by this connection. */
+  public Route getRoute() {
+    return route;
+  }
+
+  /**
+   * Returns the socket that this connection uses, or null if the connection
+   * is not currently connected.
+   */
+  public Socket getSocket() {
+    return socket;
+  }
+
+  /** Returns true if this connection is alive. */
+  public boolean isAlive() {
+    return !socket.isClosed() && !socket.isInputShutdown() && !socket.isOutputShutdown();
+  }
+
+  public void resetIdleStartTime() {
+    if (spdyConnection != null) {
+      throw new IllegalStateException("spdyConnection != null");
+    }
+    this.idleStartTimeNs = System.nanoTime();
+  }
+
+  /** Returns true if this connection is idle. */
+  public boolean isIdle() {
+    return spdyConnection == null || spdyConnection.isIdle();
+  }
+
+  /**
+   * Returns true if this connection has been idle for longer than
+   * {@code keepAliveDurationNs}.
+   */
+  public boolean isExpired(long keepAliveDurationNs) {
+    return isIdle() && System.nanoTime() - getIdleStartTimeNs() > keepAliveDurationNs;
+  }
+
+  /**
+   * Returns the time in ns when this connection became idle. Undefined if
+   * this connection is not idle.
+   */
+  public long getIdleStartTimeNs() {
+    return spdyConnection == null ? idleStartTimeNs : spdyConnection.getIdleStartTimeNs();
+  }
+
+  /** Returns the transport appropriate for this connection. */
+  public Object newTransport(HttpEngine httpEngine) throws IOException {
+    return (spdyConnection != null) ? new SpdyTransport(httpEngine, spdyConnection)
+        : new HttpTransport(httpEngine, out, in);
+  }
+
+  /**
+   * Returns true if this is a SPDY connection. Such connections can be used
+   * in multiple HTTP requests simultaneously.
+   */
+  public boolean isSpdy() {
+    return spdyConnection != null;
+  }
+
+  public SpdyConnection getSpdyConnection() {
+    return spdyConnection;
+  }
+
+  /**
+   * Returns the minor HTTP version that should be used for future requests on
+   * this connection. Either 0 for HTTP/1.0, or 1 for HTTP/1.1. The default
+   * value is 1 for new connections.
+   */
+  public int getHttpMinorVersion() {
+    return httpMinorVersion;
+  }
+
+  public void setHttpMinorVersion(int httpMinorVersion) {
+    this.httpMinorVersion = httpMinorVersion;
+  }
+
+  /**
+   * Returns true if the HTTP connection needs to tunnel one protocol over
+   * another, such as when using HTTPS through an HTTP proxy. When doing so,
+   * we must avoid buffering bytes intended for the higher-level protocol.
+   */
+  public boolean requiresTunnel() {
+    return route.address.sslSocketFactory != null && route.proxy.type() == Proxy.Type.HTTP;
+  }
+
+  /**
+   * To make an HTTPS connection over an HTTP proxy, send an unencrypted
+   * CONNECT request to create the proxy connection. This may need to be
+   * retried if the proxy requires authorization.
+   */
+  private void makeTunnel(TunnelRequest tunnelRequest) throws IOException {
+    RawHeaders requestHeaders = tunnelRequest.getRequestHeaders();
+    while (true) {
+      out.write(requestHeaders.toBytes());
+      RawHeaders responseHeaders = RawHeaders.fromBytes(in);
+
+      switch (responseHeaders.getResponseCode()) {
+        case HTTP_OK:
+          return;
+        case HTTP_PROXY_AUTH:
+          requestHeaders = new RawHeaders(requestHeaders);
+          URL url = new URL("https", tunnelRequest.host, tunnelRequest.port, "/");
+          boolean credentialsFound = HttpAuthenticator.processAuthHeader(HTTP_PROXY_AUTH,
+              responseHeaders, requestHeaders, route.proxy, url);
+          if (credentialsFound) {
+            continue;
+          } else {
+            throw new IOException("Failed to authenticate with proxy");
+          }
+        default:
+          throw new IOException(
+              "Unexpected response code for CONNECT: " + responseHeaders.getResponseCode());
+      }
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-android/framework/src/com/squareup/okhttp/ConnectionPool.java
----------------------------------------------------------------------
diff --git a/lib/cordova-android/framework/src/com/squareup/okhttp/ConnectionPool.java b/lib/cordova-android/framework/src/com/squareup/okhttp/ConnectionPool.java
new file mode 100644
index 0000000..933bd73
--- /dev/null
+++ b/lib/cordova-android/framework/src/com/squareup/okhttp/ConnectionPool.java
@@ -0,0 +1,273 @@
+/*
+ *  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 com.squareup.okhttp;
+
+import com.squareup.okhttp.internal.Platform;
+import com.squareup.okhttp.internal.Util;
+import java.net.SocketException;
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Manages reuse of HTTP and SPDY connections for reduced network latency. HTTP
+ * requests that share the same {@link com.squareup.okhttp.Address} may share a
+ * {@link com.squareup.okhttp.Connection}. This class implements the policy of
+ * which connections to keep open for future use.
+ *
+ * <p>The {@link #getDefault() system-wide default} uses system properties for
+ * tuning parameters:
+ * <ul>
+ *     <li>{@code http.keepAlive} true if HTTP and SPDY connections should be
+ *         pooled at all. Default is true.
+ *     <li>{@code http.maxConnections} maximum number of idle connections to
+ *         each to keep in the pool. Default is 5.
+ *     <li>{@code http.keepAliveDuration} Time in milliseconds to keep the
+ *         connection alive in the pool before closing it. Default is 5 minutes.
+ *         This property isn't used by {@code HttpURLConnection}.
+ * </ul>
+ *
+ * <p>The default instance <i>doesn't</i> adjust its configuration as system
+ * properties are changed. This assumes that the applications that set these
+ * parameters do so before making HTTP connections, and that this class is
+ * initialized lazily.
+ */
+public class ConnectionPool {
+  private static final int MAX_CONNECTIONS_TO_CLEANUP = 2;
+  private static final long DEFAULT_KEEP_ALIVE_DURATION_MS = 5 * 60 * 1000; // 5 min
+
+  private static final ConnectionPool systemDefault;
+
+  static {
+    String keepAlive = System.getProperty("http.keepAlive");
+    String keepAliveDuration = System.getProperty("http.keepAliveDuration");
+    String maxIdleConnections = System.getProperty("http.maxConnections");
+    long keepAliveDurationMs = keepAliveDuration != null ? Long.parseLong(keepAliveDuration)
+        : DEFAULT_KEEP_ALIVE_DURATION_MS;
+    if (keepAlive != null && !Boolean.parseBoolean(keepAlive)) {
+      systemDefault = new ConnectionPool(0, keepAliveDurationMs);
+    } else if (maxIdleConnections != null) {
+      systemDefault = new ConnectionPool(Integer.parseInt(maxIdleConnections), keepAliveDurationMs);
+    } else {
+      systemDefault = new ConnectionPool(5, keepAliveDurationMs);
+    }
+  }
+
+  /** The maximum number of idle connections for each address. */
+  private final int maxIdleConnections;
+  private final long keepAliveDurationNs;
+
+  private final LinkedList<Connection> connections = new LinkedList<Connection>();
+
+  /** We use a single background thread to cleanup expired connections. */
+  private final ExecutorService executorService =
+      new ThreadPoolExecutor(0, 1, 60L, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>());
+  private final Callable<Void> connectionsCleanupCallable = new Callable<Void>() {
+    @Override public Void call() throws Exception {
+      List<Connection> expiredConnections = new ArrayList<Connection>(MAX_CONNECTIONS_TO_CLEANUP);
+      int idleConnectionCount = 0;
+      synchronized (ConnectionPool.this) {
+        for (ListIterator<Connection> i = connections.listIterator(connections.size());
+            i.hasPrevious(); ) {
+          Connection connection = i.previous();
+          if (!connection.isAlive() || connection.isExpired(keepAliveDurationNs)) {
+            i.remove();
+            expiredConnections.add(connection);
+            if (expiredConnections.size() == MAX_CONNECTIONS_TO_CLEANUP) break;
+          } else if (connection.isIdle()) {
+            idleConnectionCount++;
+          }
+        }
+
+        for (ListIterator<Connection> i = connections.listIterator(connections.size());
+            i.hasPrevious() && idleConnectionCount > maxIdleConnections; ) {
+          Connection connection = i.previous();
+          if (connection.isIdle()) {
+            expiredConnections.add(connection);
+            i.remove();
+            --idleConnectionCount;
+          }
+        }
+      }
+      for (Connection expiredConnection : expiredConnections) {
+        Util.closeQuietly(expiredConnection);
+      }
+      return null;
+    }
+  };
+
+  public ConnectionPool(int maxIdleConnections, long keepAliveDurationMs) {
+    this.maxIdleConnections = maxIdleConnections;
+    this.keepAliveDurationNs = keepAliveDurationMs * 1000 * 1000;
+  }
+
+  /**
+   * Returns a snapshot of the connections in this pool, ordered from newest to
+   * oldest. Waits for the cleanup callable to run if it is currently scheduled.
+   */
+  List<Connection> getConnections() {
+    waitForCleanupCallableToRun();
+    synchronized (this) {
+      return new ArrayList<Connection>(connections);
+    }
+  }
+
+  /**
+   * Blocks until the executor service has processed all currently enqueued
+   * jobs.
+   */
+  private void waitForCleanupCallableToRun() {
+    try {
+      executorService.submit(new Runnable() {
+        @Override public void run() {
+        }
+      }).get();
+    } catch (Exception e) {
+      throw new AssertionError();
+    }
+  }
+
+  public static ConnectionPool getDefault() {
+    return systemDefault;
+  }
+
+  /** Returns total number of connections in the pool. */
+  public synchronized int getConnectionCount() {
+    return connections.size();
+  }
+
+  /** Returns total number of spdy connections in the pool. */
+  public synchronized int getSpdyConnectionCount() {
+    int total = 0;
+    for (Connection connection : connections) {
+      if (connection.isSpdy()) total++;
+    }
+    return total;
+  }
+
+  /** Returns total number of http connections in the pool. */
+  public synchronized int getHttpConnectionCount() {
+    int total = 0;
+    for (Connection connection : connections) {
+      if (!connection.isSpdy()) total++;
+    }
+    return total;
+  }
+
+  /** Returns a recycled connection to {@code address}, or null if no such connection exists. */
+  public synchronized Connection get(Address address) {
+    Connection foundConnection = null;
+    for (ListIterator<Connection> i = connections.listIterator(connections.size());
+        i.hasPrevious(); ) {
+      Connection connection = i.previous();
+      if (!connection.getRoute().getAddress().equals(address)
+          || !connection.isAlive()
+          || System.nanoTime() - connection.getIdleStartTimeNs() >= keepAliveDurationNs) {
+        continue;
+      }
+      i.remove();
+      if (!connection.isSpdy()) {
+        try {
+          Platform.get().tagSocket(connection.getSocket());
+        } catch (SocketException e) {
+          Util.closeQuietly(connection);
+          // When unable to tag, skip recycling and close
+          Platform.get().logW("Unable to tagSocket(): " + e);
+          continue;
+        }
+      }
+      foundConnection = connection;
+      break;
+    }
+
+    if (foundConnection != null && foundConnection.isSpdy()) {
+      connections.addFirst(foundConnection); // Add it back after iteration.
+    }
+
+    executorService.submit(connectionsCleanupCallable);
+    return foundConnection;
+  }
+
+  /**
+   * Gives {@code connection} to the pool. The pool may store the connection,
+   * or close it, as its policy describes.
+   *
+   * <p>It is an error to use {@code connection} after calling this method.
+   */
+  public void recycle(Connection connection) {
+    executorService.submit(connectionsCleanupCallable);
+
+    if (connection.isSpdy()) {
+      return;
+    }
+
+    if (!connection.isAlive()) {
+      Util.closeQuietly(connection);
+      return;
+    }
+
+    try {
+      Platform.get().untagSocket(connection.getSocket());
+    } catch (SocketException e) {
+      // When unable to remove tagging, skip recycling and close.
+      Platform.get().logW("Unable to untagSocket(): " + e);
+      Util.closeQuietly(connection);
+      return;
+    }
+
+    synchronized (this) {
+      connections.addFirst(connection);
+      connection.resetIdleStartTime();
+    }
+  }
+
+  /**
+   * Shares the SPDY connection with the pool. Callers to this method may
+   * continue to use {@code connection}.
+   */
+  public void maybeShare(Connection connection) {
+    executorService.submit(connectionsCleanupCallable);
+    if (!connection.isSpdy()) {
+      // Only SPDY connections are sharable.
+      return;
+    }
+    if (connection.isAlive()) {
+      synchronized (this) {
+        connections.addFirst(connection);
+      }
+    }
+  }
+
+  /** Close and remove all connections in the pool. */
+  public void evictAll() {
+    List<Connection> connections;
+    synchronized (this) {
+      connections = new ArrayList<Connection>(this.connections);
+      this.connections.clear();
+    }
+
+    for (Connection connection : connections) {
+      Util.closeQuietly(connection);
+    }
+  }
+}


Mime
View raw message