cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject android commit: Make Cordova pass the Lint step
Date Tue, 11 Aug 2015 20:28:17 GMT
Repository: cordova-android
Updated Branches:
  refs/heads/master 892b87586 -> 9e400911f


Make Cordova pass the Lint step


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

Branch: refs/heads/master
Commit: 9e400911f5f2cb711bd5f102d06017f4c707ea68
Parents: 892b875
Author: Joe Bowser <bowserj@apache.org>
Authored: Mon Aug 10 16:43:41 2015 -0700
Committer: Joe Bowser <bowserj@apache.org>
Committed: Mon Aug 10 16:43:41 2015 -0700

----------------------------------------------------------------------
 framework/build.gradle                           | 19 +++----------------
 .../src/org/apache/cordova/CordovaActivity.java  |  2 ++
 .../cordova/engine/SystemCookieManager.java      |  3 +++
 .../cordova/engine/SystemWebViewEngine.java      |  2 +-
 4 files changed, 9 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/9e400911/framework/build.gradle
----------------------------------------------------------------------
diff --git a/framework/build.gradle b/framework/build.gradle
index 57ef3c4..e4c182e 100644
--- a/framework/build.gradle
+++ b/framework/build.gradle
@@ -23,23 +23,10 @@ buildscript {
         mavenCentral()
     }
 
-    // Switch the Android Gradle plugin version requirement depending on the
-    // installed version of Gradle. This dependency is documented at
-    // http://tools.android.com/tech-docs/new-build-system/version-compatibility
-    // and https://issues.apache.org/jira/browse/CB-8143
-    if (gradle.gradleVersion >= "2.2") {
-        dependencies {
-            classpath 'com.android.tools.build:gradle:1.0.0+'
-        }
-    } else if (gradle.gradleVersion >= "2.1") {
-        dependencies {
-            classpath 'com.android.tools.build:gradle:0.14.0+'
-        }
-    } else {
-        dependencies {
-            classpath 'com.android.tools.build:gradle:0.12.0+'
-        }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:1.0.0+'
     }
+
 }
 
 apply plugin: 'android-library'

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/9e400911/framework/src/org/apache/cordova/CordovaActivity.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaActivity.java b/framework/src/org/apache/cordova/CordovaActivity.java
index 5c3bc50..cf055c6 100755
--- a/framework/src/org/apache/cordova/CordovaActivity.java
+++ b/framework/src/org/apache/cordova/CordovaActivity.java
@@ -26,6 +26,7 @@ import org.json.JSONObject;
 
 import android.app.Activity;
 import android.app.AlertDialog;
+import android.annotation.SuppressLint;
 import android.content.DialogInterface;
 import android.content.Intent;
 import android.content.res.Configuration;
@@ -330,6 +331,7 @@ public class CordovaActivity extends Activity {
         }
     }
 
+    @SuppressLint("NewApi")
     @Override
     public void startActivityForResult(Intent intent, int requestCode, Bundle options) {
         // Capture requestCode here so that it is captured in the setActivityResultCallback()
case.

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/9e400911/framework/src/org/apache/cordova/engine/SystemCookieManager.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/engine/SystemCookieManager.java b/framework/src/org/apache/cordova/engine/SystemCookieManager.java
index ae55dfe..b88909e 100644
--- a/framework/src/org/apache/cordova/engine/SystemCookieManager.java
+++ b/framework/src/org/apache/cordova/engine/SystemCookieManager.java
@@ -19,6 +19,7 @@
 
 package org.apache.cordova.engine;
 
+import android.annotation.TargetApi;
 import android.os.Build;
 import android.webkit.CookieManager;
 import android.webkit.WebView;
@@ -30,6 +31,8 @@ class SystemCookieManager implements ICordovaCookieManager {
     protected final WebView webView;
     private final CookieManager cookieManager;
 
+    //Added because lint can't see the conditional RIGHT ABOVE this
+    @TargetApi(Build.VERSION_CODES.LOLLIPOP)
     public SystemCookieManager(WebView webview) {
         webView = webview;
         cookieManager = CookieManager.getInstance();

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/9e400911/framework/src/org/apache/cordova/engine/SystemWebViewEngine.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/engine/SystemWebViewEngine.java b/framework/src/org/apache/cordova/engine/SystemWebViewEngine.java
index 221a884..5e6e4b6 100755
--- a/framework/src/org/apache/cordova/engine/SystemWebViewEngine.java
+++ b/framework/src/org/apache/cordova/engine/SystemWebViewEngine.java
@@ -135,7 +135,7 @@ public class SystemWebViewEngine implements CordovaWebViewEngine {
         return webView;
     }
 
-    @SuppressLint("SetJavaScriptEnabled")
+    @SuppressLint({"NewApi", "SetJavaScriptEnabled"})
     @SuppressWarnings("deprecation")
     private void initWebViewSettings() {
         webView.setInitialScale(0);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message