You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2012/08/16 15:38:04 UTC

android commit: Fix API Level linter errors in CordovaWebView.java

Updated Branches:
  refs/heads/master ee07cbecb -> e42913ae8


Fix API Level linter errors in CordovaWebView.java


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

Branch: refs/heads/master
Commit: e42913ae8ab2aafea8217ee05c9bfcbe6c324a44
Parents: ee07cbe
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Aug 16 09:36:43 2012 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Thu Aug 16 09:36:43 2012 -0400

----------------------------------------------------------------------
 .../src/org/apache/cordova/CordovaWebView.java     |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/e42913ae/framework/src/org/apache/cordova/CordovaWebView.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaWebView.java b/framework/src/org/apache/cordova/CordovaWebView.java
index f7f2be6..03d916e 100755
--- a/framework/src/org/apache/cordova/CordovaWebView.java
+++ b/framework/src/org/apache/cordova/CordovaWebView.java
@@ -32,6 +32,8 @@ import org.apache.cordova.api.LOG;
 import org.apache.cordova.api.PluginManager;
 import org.xmlpull.v1.XmlPullParserException;
 
+import android.annotation.SuppressLint;
+import android.annotation.TargetApi;
 import android.content.Context;
 import android.content.Intent;
 import android.content.res.XmlResourceParser;
@@ -157,7 +159,8 @@ public class CordovaWebView extends WebView {
      * @param defStyle
      * @param privateBrowsing
      */
-    public CordovaWebView(Context context, AttributeSet attrs, int defStyle, boolean privateBrowsing) {
+	@TargetApi(11)
+	public CordovaWebView(Context context, AttributeSet attrs, int defStyle, boolean privateBrowsing) {
         super(context, attrs, defStyle, privateBrowsing);
         if (CordovaInterface.class.isInstance(context))
         {
@@ -190,6 +193,7 @@ public class CordovaWebView extends WebView {
      * Initialize webview.
      */
     @SuppressWarnings("deprecation")
+    @SuppressLint("NewApi")
     private void setup() {
 
         this.setInitialScale(0);