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

This commit is contained in:
Joe Bowser 2015-01-09 11:30:13 -08:00
parent c3610aa43c
commit 15e19489e3
2 changed files with 10 additions and 2 deletions

View File

@ -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

View File

@ -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 });