diff options
author | Tao Bai <michaelbai@google.com> | 2014-09-12 12:46:55 -0700 |
---|---|---|
committer | Tao Bai <michaelbai@google.com> | 2014-09-12 16:13:10 -0700 |
commit | 934dfe5246cd151ffd60eb6277088f58f657b81c (patch) | |
tree | ce54e1027d2b591ed5567c45992481ba55673199 /src/com/android/browser/Tab.java | |
parent | 126b5b3a771fbcf1a4acd1700c8cfa22975f22df (diff) | |
download | packages_apps_Browser-934dfe5246cd151ffd60eb6277088f58f657b81c.zip packages_apps_Browser-934dfe5246cd151ffd60eb6277088f58f657b81c.tar.gz packages_apps_Browser-934dfe5246cd151ffd60eb6277088f58f657b81c.tar.bz2 |
Accept third party cookies if cookie setting is enabled by user
BUG:17474704
Change-Id: I8f9f17887cf65c1c5465b576dcf094784266b15b
Diffstat (limited to 'src/com/android/browser/Tab.java')
-rw-r--r-- | src/com/android/browser/Tab.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/com/android/browser/Tab.java b/src/com/android/browser/Tab.java index d463045..03b0faa 100644 --- a/src/com/android/browser/Tab.java +++ b/src/com/android/browser/Tab.java @@ -48,6 +48,7 @@ import android.view.View; import android.view.ViewStub; import android.webkit.ClientCertRequest; import android.webkit.ConsoleMessage; +import android.webkit.CookieManager; import android.webkit.GeolocationPermissions; import android.webkit.GeolocationPermissions.Callback; import android.webkit.HttpAuthHandler; @@ -1975,4 +1976,12 @@ class Tab implements PictureListener { setSecurityState(SecurityState.SECURITY_STATE_MIXED); } } + + public void setAcceptThirdPartyCookies(boolean accept) { + CookieManager cookieManager = CookieManager.getInstance(); + if (mMainView != null) + cookieManager.setAcceptThirdPartyCookies(mMainView, accept); + if (mSubView != null) + cookieManager.setAcceptThirdPartyCookies(mSubView, accept); + } } |