cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject android commit: CB-8026: Bumping up Android Version and setting it up to allow third-party cookies. This might change later.
Date Fri, 09 Jan 2015 19:31:44 GMT
Repository: cordova-android
Updated Branches:
  refs/heads/master c3610aa43 -> 15e19489e


CB-8026: Bumping up Android Version and setting it up to allow third-party cookies.  This
might change later.


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

Branch: refs/heads/master
Commit: 15e19489e3c312718802fb7ea774f11dcf4217b9
Parents: c3610aa
Author: Joe Bowser <bowserj@apache.org>
Authored: Fri Jan 9 11:30:13 2015 -0800
Committer: Joe Bowser <bowserj@apache.org>
Committed: Fri Jan 9 11:31:29 2015 -0800

----------------------------------------------------------------------
 framework/project.properties                         |  2 +-
 framework/src/org/apache/cordova/CordovaWebView.java | 10 +++++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/15e19489/framework/project.properties
----------------------------------------------------------------------
diff --git a/framework/project.properties b/framework/project.properties
index 9fe04f3..57bcb9a 100644
--- a/framework/project.properties
+++ b/framework/project.properties
@@ -10,7 +10,7 @@
 # Indicates whether an apk should be generated for each density.
 split.density=false
 # Project target.
-target=android-19
+target=android-21
 apk-configurations=
 renderscript.opt.level=O0
 android.library=true

http://git-wip-us.apache.org/repos/asf/cordova-android/blob/15e19489/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 9fc480c..5323d08 100755
--- a/framework/src/org/apache/cordova/CordovaWebView.java
+++ b/framework/src/org/apache/cordova/CordovaWebView.java
@@ -50,6 +50,7 @@ import android.webkit.WebSettings;
 import android.webkit.WebView;
 import android.webkit.WebSettings.LayoutAlgorithm;
 import android.webkit.WebViewClient;
+import android.webkit.CookieManager;
 import android.widget.FrameLayout;
 
 /*
@@ -191,7 +192,14 @@ public class CordovaWebView extends WebView {
         settings.setJavaScriptEnabled(true);
         settings.setJavaScriptCanOpenWindowsAutomatically(true);
         settings.setLayoutAlgorithm(LayoutAlgorithm.NORMAL);
-        
+
+        // Enable third-party cookies if on Lolipop. TODO: Make this configurable
+        if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
+        {
+            CookieManager cookieManager = CookieManager.getInstance();
+            cookieManager.setAcceptThirdPartyCookies(this, true);
+        }
+
         // Set the nav dump for HTC 2.x devices (disabling for ICS, deprecated entirely for
Jellybean 4.2)
         try {
             Method gingerbread_getMethod =  WebSettings.class.getMethod("setNavDump", new
Class[] { boolean.class });


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


Mime
View raw message