[ https://issues.apache.org/jira/browse/CB-5059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14294686#comment-14294686 ]
ASF GitHub Bot commented on CB-5059: ------------------------------------ Github user dpogue commented on a diff in the pull request: https://github.com/apache/cordova-android/pull/151#discussion_r23664825 --- Diff: framework/src/org/apache/cordova/ICordovaCookieManager.java --- @@ -0,0 +1,45 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +package org.apache.cordova; + +public interface ICordovaCookieManager { --- End diff -- My plan was to make it mostly API-compatible with existing CookieManagers so that it would be easier to migrate existing plugins rather than trying to figure out a different API. One other issue is that the XWalkCookieManager doesn't appear to have setThirdPartyCookiesEnabled(): https://github.com/crosswalk-project/crosswalk/blob/master/runtime/android/core_internal/src/org/xwalk/core/internal/XWalkCookieManager.java If those aren't concerns (I guess XWalkCordovaCookieManager could just ignore setThirdPartyCookiesEnabled?), then I'll shrink down the interface. > The android implementation of file transfer plugin should not depend on the > concrete class android.webkit.CookieManager > ----------------------------------------------------------------------------------------------------------------------- > > Key: CB-5059 > URL: https://issues.apache.org/jira/browse/CB-5059 > Project: Apache Cordova > Issue Type: Improvement > Components: Plugin File Transfer > Affects Versions: Master > Environment: cordova-android, git branch 3.0.x > Reporter: Junmin > Fix For: Master > > > The android implementation of file transfer plugin leverages the class > android.webkit.CookieManager, which depends on the concrete web > infrastructure android.webkit.WebView. This dependence ruins the portability > of the plugin. For example, it could not run on a substantial implementation > of CordovaWebView which based on a android third party component(such as > chromium for android). > Following is the crash log when initializing the CookieManager without > android.webkit.WebView: > I/dalvikvm(5006): java.lang.IllegalStateException: Call > CookieSyncManager::createInstance() or create a webview before using this > class > I/dalvikvm(5006): at > android.webkit.JniUtil.checkInitialized(JniUtil.java:44) > I/dalvikvm(5006): at > android.webkit.JniUtil.getDatabaseDirectory(JniUtil.java:65) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.nativeGetCookie(Native Method) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:109) > I/dalvikvm(5006): at > android.webkit.CookieManagerClassic.getCookie(CookieManagerClassic.java:96) > I/dalvikvm(5006): at > org.apache.cordova.filetransfer.FileTransfer$4.run(FileTransfer.java:747) -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org