You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by na...@apache.org on 2014/04/03 08:07:44 UTC
[1/4] git commit: CB-6388: Handle binary data correctly in LOAD_URL
bridge
Repository: cordova-amazon-fireos
Updated Branches:
refs/heads/master 5e9cb8fbb -> 9375b4103
CB-6388: Handle binary data correctly in LOAD_URL bridge
Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/736f44bb
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/736f44bb
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/736f44bb
Branch: refs/heads/master
Commit: 736f44bbc2c663d1211bba59cfa6479ecd52205d
Parents: c303a63
Author: Ian Clelland <ic...@chromium.org>
Authored: Wed Apr 2 12:08:27 2014 -0400
Committer: Archana Naik <na...@lab126.com>
Committed: Wed Apr 2 13:31:04 2014 -0700
----------------------------------------------------------------------
.../apache/cordova/NativeToJsMessageQueue.java | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/736f44bb/framework/src/org/apache/cordova/NativeToJsMessageQueue.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/NativeToJsMessageQueue.java b/framework/src/org/apache/cordova/NativeToJsMessageQueue.java
index 9b61f98..56c9a55 100755
--- a/framework/src/org/apache/cordova/NativeToJsMessageQueue.java
+++ b/framework/src/org/apache/cordova/NativeToJsMessageQueue.java
@@ -494,9 +494,22 @@ public class NativeToJsMessageQueue {
.append(success)
.append(",")
.append(status)
- .append(",[")
- .append(pluginResult.getMessage())
- .append("],")
+ .append(",[");
+ switch (pluginResult.getMessageType()) {
+ case PluginResult.MESSAGE_TYPE_BINARYSTRING:
+ sb.append("atob('")
+ .append(pluginResult.getMessage())
+ .append("')");
+ break;
+ case PluginResult.MESSAGE_TYPE_ARRAYBUFFER:
+ sb.append("cordova.require('cordova/base64').toArrayBuffer('")
+ .append(pluginResult.getMessage())
+ .append("')");
+ break;
+ default:
+ sb.append(pluginResult.getMessage());
+ }
+ sb.append("],")
.append(pluginResult.getKeepCallback())
.append(");");
}
[2/4] git commit: Fix CB-6048: Set launchMode=singleTop so tapping
app icon does not always restart app
Posted by na...@apache.org.
Fix CB-6048: Set launchMode=singleTop so tapping app icon does not always restart app
Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/c303a636
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/c303a636
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/c303a636
Branch: refs/heads/master
Commit: c303a636ac6d8671d805561458158ec6fff414b8
Parents: bece02e
Author: Michal Mocny <mm...@gmail.com>
Authored: Tue Apr 1 11:33:40 2014 -0400
Committer: Archana Naik <na...@lab126.com>
Committed: Wed Apr 2 13:31:04 2014 -0700
----------------------------------------------------------------------
bin/templates/project/AndroidManifest.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/c303a636/bin/templates/project/AndroidManifest.xml
----------------------------------------------------------------------
diff --git a/bin/templates/project/AndroidManifest.xml b/bin/templates/project/AndroidManifest.xml
index 48a378c..e8a8583 100644
--- a/bin/templates/project/AndroidManifest.xml
+++ b/bin/templates/project/AndroidManifest.xml
@@ -32,7 +32,7 @@
<application android:icon="@drawable/icon" android:label="@string/app_name"
android:hardwareAccelerated="true">
- <activity android:name="__ACTIVITY__" android:label="@string/app_name"
+ <activity android:name="__ACTIVITY__" android:label="@string/app_name" android:launchMode="singleTop"
android:theme="@android:style/Theme.Black.NoTitleBar"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale">
<intent-filter>
[4/4] git commit: [CB-6392]Addig amazon-fireos platform fails with
not so good error reporting Fixes 2 issues while adding amazon-fireos
platform after fresh cordova install. 1. create.js updated to create "libs"
folder before copying it to the project's
Posted by na...@apache.org.
[CB-6392]Addig amazon-fireos platform fails with not so good error reporting
Fixes 2 issues while adding amazon-fireos platform after fresh cordova install.
1. create.js updated to create "libs" folder before copying it to the project's platform folder. Also, checking for awv_interface.jar existance is moved to create_project().
2. check_reqs.js no longer checks for awv_interface.jar.
Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/9375b410
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/9375b410
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/9375b410
Branch: refs/heads/master
Commit: 9375b4103c2cfd32f308a8bedfafc04b0eaacdf0
Parents: 736f44b
Author: Archana Naik <na...@lab126.com>
Authored: Wed Apr 2 13:06:51 2014 -0700
Committer: Archana Naik <na...@lab126.com>
Committed: Wed Apr 2 23:04:25 2014 -0700
----------------------------------------------------------------------
bin/lib/check_reqs.js | 8 +-------
bin/lib/create.js | 16 +++++++++++++---
2 files changed, 14 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/9375b410/bin/lib/check_reqs.js
----------------------------------------------------------------------
diff --git a/bin/lib/check_reqs.js b/bin/lib/check_reqs.js
index 215d1b5..b15a9b6 100644
--- a/bin/lib/check_reqs.js
+++ b/bin/lib/check_reqs.js
@@ -26,7 +26,6 @@ var shell = require('shelljs'),
fs = require('fs'),
ROOT = path.join(__dirname, '..', '..');
-var awv_interface='awv_interface.jar';
// Get valid target from framework/project.properties
module.exports.get_target = function() {
@@ -80,12 +79,7 @@ module.exports.check_android = function() {
return d.promise.then(function(output) {
if (!output.match(valid_target)) {
return Q.reject(new Error('Please install Android target ' + valid_target.split('-')[1] + ' (the Android newest SDK). Make sure you have the latest Android tools installed as well. Run \"android\" from your command-line to install/update any missing SDKs or tools.'));
- } else {
- var awv_interface_expected_path=path.join(ROOT, 'framework','libs');
- if (!fs.existsSync(path.join(awv_interface_expected_path,awv_interface))) {
- Q.reject(new Error('awv_interface.jar not found in ' + awv_interface_expected_path +' folder. \nPlease download the AmazonWebView SDK from http://developer.amazon.com/sdk/fire/IntegratingAWV.html#installawv and copy the awv_interface.jar file to this folder:' + awv_interface_expected_path + ' and re-run cordova platform add amazon-fireos command.'));
- }
- }
+ }
return Q();
}, function(stderr) {
if (stderr.match(/command\snot\sfound/)) {
http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/9375b410/bin/lib/create.js
----------------------------------------------------------------------
diff --git a/bin/lib/create.js b/bin/lib/create.js
index 676d5aa..1eacdfb 100755
--- a/bin/lib/create.js
+++ b/bin/lib/create.js
@@ -133,7 +133,8 @@ function copyScripts(projectPath) {
exports.createProject = function(project_path, package_name, project_name, project_template_dir, use_shared_project, use_cli_template) {
var VERSION = fs.readFileSync(path.join(ROOT, 'VERSION'), 'utf-8').trim();
-
+ var awv_interface='awv_interface.jar';
+
// Set default values for path, package and name
project_path = typeof project_path !== 'undefined' ? project_path : "CordovaExample";
project_path = path.relative(process.cwd(), project_path);
@@ -158,12 +159,21 @@ exports.createProject = function(project_path, package_name, project_name, proje
if (!/[a-zA-Z0-9_]+\.[a-zA-Z0-9_](.[a-zA-Z0-9_])*/.test(package_name)) {
return Q.reject('Package name must look like: com.company.Name');
}
-
+
+ var awv_interface_expected_path=path.join(ROOT, 'framework','libs');
+ console.log('awv_path : ' + awv_interface_expected_path);
+ if (!fs.existsSync(awv_interface_expected_path)) {
+ shell.mkdir('-p', awv_interface_expected_path);
+ }
+
+ if (!fs.existsSync(path.join(awv_interface_expected_path,awv_interface))) {
+ return Q.reject(new Error('awv_interface.jar not found in ' + awv_interface_expected_path +' folder. \nPlease download the AmazonWebView SDK from http://developer.amazon.com/sdk/fire/IntegratingAWV.html#installawv and copy the awv_interface.jar file to this folder:' + awv_interface_expected_path + ' and re-run cordova platform add amazon-fireos command.'));
+ }
// Check that requirements are met and proper targets are installed
return check_reqs.run()
.then(function() {
// Log the given values for the project
- console.log('Creating Cordova project for the Android platform:');
+ console.log('Creating Cordova project for the amazon-fireos platform:');
console.log('\tPath: ' + project_path);
console.log('\tPackage: ' + package_name);
console.log('\tName: ' + project_name);
[3/4] git commit: Remove incorrect usage of AlertDialog.Builder.create
Posted by na...@apache.org.
Remove incorrect usage of AlertDialog.Builder.create
AlertDialog.Builder.show() will create an AlertDialog before it show. This is the source code snippet:
/**
* Creates a {@link AlertDialog} with the arguments supplied to this builder and
* {@link Dialog#show()}'s the dialog.
*/
public AlertDialog show() {
AlertDialog dialog = create();
dialog.show();
return dialog;
}
github: close #96
Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/bece02e8
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/bece02e8
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/bece02e8
Branch: refs/heads/master
Commit: bece02e894f67f11d1c46f4d865123b5d5ed9e97
Parents: 5e9cb8f
Author: hadeslee <ha...@vip.qq.com>
Authored: Fri Mar 21 12:06:23 2014 +0800
Committer: Archana Naik <na...@lab126.com>
Committed: Wed Apr 2 13:31:04 2014 -0700
----------------------------------------------------------------------
framework/src/org/apache/cordova/CordovaChromeClient.java | 3 ---
1 file changed, 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/bece02e8/framework/src/org/apache/cordova/CordovaChromeClient.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaChromeClient.java b/framework/src/org/apache/cordova/CordovaChromeClient.java
index 86e20f3..6de43b6 100755
--- a/framework/src/org/apache/cordova/CordovaChromeClient.java
+++ b/framework/src/org/apache/cordova/CordovaChromeClient.java
@@ -150,7 +150,6 @@ public class CordovaChromeClient extends AmazonWebChromeClient {
return true;
}
});
- dlg.create();
dlg.show();
return true;
}
@@ -203,7 +202,6 @@ public class CordovaChromeClient extends AmazonWebChromeClient {
return true;
}
});
- dlg.create();
dlg.show();
return true;
}
@@ -300,7 +298,6 @@ public class CordovaChromeClient extends AmazonWebChromeClient {
res.cancel();
}
});
- dlg.create();
dlg.show();
}
return true;