summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-12-01 11:49:43 +0000
committerBen Murdoch <benm@google.com>2011-12-01 13:43:41 +0000
commitd3f18b805e19251a188476415bc18818e247f555 (patch)
treecd6207e55c8d5011b7a6f4a6dac4ab861a022c4b /core
parent41a5774a99215025628b83db54c45f84b876678e (diff)
downloadframeworks_base-d3f18b805e19251a188476415bc18818e247f555.zip
frameworks_base-d3f18b805e19251a188476415bc18818e247f555.tar.gz
frameworks_base-d3f18b805e19251a188476415bc18818e247f555.tar.bz2
Fix crash with HTML5 video.
Add missing check for native HTTP stack inside CookieManager.getCookie(WebAddress) and CookieManager.setCookie(WebAddress) - private APIs that now will throw an exception as the legacy cookie table no longer exists with WebViewDatabase version 11. Bug: 5690908 Change-Id: I51ae848d03b04d6021d314dda4a199675e38ab02
Diffstat (limited to 'core')
-rw-r--r--core/java/android/webkit/CookieManager.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/java/android/webkit/CookieManager.java b/core/java/android/webkit/CookieManager.java
index d6e36bb..9fa5593 100644
--- a/core/java/android/webkit/CookieManager.java
+++ b/core/java/android/webkit/CookieManager.java
@@ -345,6 +345,11 @@ public final class CookieManager {
* a system private class.
*/
public synchronized void setCookie(WebAddress uri, String value) {
+ if (JniUtil.useChromiumHttpStack()) {
+ nativeSetCookie(uri.toString(), value, false);
+ return;
+ }
+
if (value != null && value.length() > MAX_COOKIE_LENGTH) {
return;
}
@@ -500,6 +505,10 @@ public final class CookieManager {
* is a system private class.
*/
public synchronized String getCookie(WebAddress uri) {
+ if (JniUtil.useChromiumHttpStack()) {
+ return nativeGetCookie(uri.toString(), false);
+ }
+
if (!mAcceptCookie || uri == null) {
return null;
}
@@ -573,6 +582,8 @@ public final class CookieManager {
* {@hide} Too late to release publically.
*/
public void waitForCookieOperationsToComplete() {
+ // Note that this function is applicable for both the java
+ // and native http stacks, and works correctly with either.
synchronized (this) {
while (pendingCookieOperations > 0) {
try {