From 483babe3bce1c714c1ee2bcae94c45f1761a8d79 Mon Sep 17 00:00:00 2001 From: Marcel Kinard Date: Mon, 9 Jun 2014 15:50:20 -0400 Subject: [PATCH 1/4] Add documentation referencing other implementation. --- framework/src/org/apache/cordova/CordovaChromeClient.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/framework/src/org/apache/cordova/CordovaChromeClient.java b/framework/src/org/apache/cordova/CordovaChromeClient.java index 54c8948f..2edabf15 100755 --- a/framework/src/org/apache/cordova/CordovaChromeClient.java +++ b/framework/src/org/apache/cordova/CordovaChromeClient.java @@ -107,6 +107,7 @@ public class CordovaChromeClient extends WebChromeClient { * @param url * @param message * @param result + * @see Other implementation in the Dialogs plugin. */ @Override public boolean onJsAlert(WebView view, String url, String message, final JsResult result) { @@ -150,6 +151,7 @@ public class CordovaChromeClient extends WebChromeClient { * @param url * @param message * @param result + * @see Other implementation in the Dialogs plugin. */ @Override public boolean onJsConfirm(WebView view, String url, String message, final JsResult result) { @@ -204,6 +206,7 @@ public class CordovaChromeClient extends WebChromeClient { * @param message * @param defaultValue * @param result + * @see Other implementation in the Dialogs plugin. */ @Override public boolean onJsPrompt(WebView view, String url, String message, String defaultValue, JsPromptResult result) { From 663a919ed1eb5e24c22e7ee6b0e74a29ff76345c Mon Sep 17 00:00:00 2001 From: Joe Bowser Date: Thu, 12 Jun 2014 11:47:41 -0700 Subject: [PATCH 2/4] CB-4404: Changing where android:windowSoftInputMode is in the manifest so it works --- bin/templates/project/AndroidManifest.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/templates/project/AndroidManifest.xml b/bin/templates/project/AndroidManifest.xml index 315a4dd0..5336be31 100644 --- a/bin/templates/project/AndroidManifest.xml +++ b/bin/templates/project/AndroidManifest.xml @@ -17,8 +17,8 @@ specific language governing permissions and limitations under the License. --> - + From 141bbfb05134bdd11e262d879bbd253bf4479519 Mon Sep 17 00:00:00 2001 From: Joe Bowser Date: Thu, 12 Jun 2014 17:51:22 -0700 Subject: [PATCH 3/4] CB-5971: This would have been a good first bug, too bad --- bin/lib/create.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/bin/lib/create.js b/bin/lib/create.js index dbdb84f3..f99d1da9 100755 --- a/bin/lib/create.js +++ b/bin/lib/create.js @@ -145,14 +145,32 @@ exports.createProject = function(project_path, package_name, project_name, proje return Q.reject('Project already exists! Delete and recreate'); } + //Make the package conform to Java package types 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'); } + //Enforce underscore limitation + if (/[_]+[a-zA-Z0-9_]*/.test(package_name)) { + return Q.reject("Package name can't begin with an underscore"); + } + + //Enforce stupid name error if (project_name === 'CordovaActivity') { return Q.reject('Project name cannot be CordovaActivity'); } + //Classes in Java don't begin with numbers + if (/[0-9]+[a-zA-Z0-9]/.test(project_name)) { + return Q.reject('Project name must not begin with a number'); + } + + //Class is a reserved word + if(/[C|c]+lass+[\s|\.]/.test(package_name) && !/[a-zA-Z0-9_]+[C|c]+lass/.test(package_name)) + { + return Q.reject('class is a reserved word'); + } + // Check that requirements are met and proper targets are installed return check_reqs.run() .then(function() { From 297f862ccc20de9506a5d5296f98ce5724dc43c0 Mon Sep 17 00:00:00 2001 From: Andrew Grieve Date: Mon, 23 Jun 2014 14:18:54 -0400 Subject: [PATCH 4/4] Delete explicit activity.finish() in back button handling. No change in behaviour. The default handling calls through to Activity.onBackPressed(), which by default results in activity.finish(), but can be customized by the app. --- framework/src/org/apache/cordova/CordovaWebView.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/framework/src/org/apache/cordova/CordovaWebView.java b/framework/src/org/apache/cordova/CordovaWebView.java index bb51a7a9..3b3f80d3 100755 --- a/framework/src/org/apache/cordova/CordovaWebView.java +++ b/framework/src/org/apache/cordova/CordovaWebView.java @@ -775,12 +775,6 @@ public class CordovaWebView extends WebView { return true; } // If not, then invoke default behavior - else { - //this.activityState = ACTIVITY_EXITING; - //return false; - // If they hit back button when app is initializing, app should exit instead of hang until initialization (CB2-458) - this.cordova.getActivity().finish(); - } } } }