cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CB-5059) The android implementation of file transfer plugin should not depend on the concrete class android.webkit.CookieManager
Date Wed, 28 Jan 2015 04:36:34 GMT


ASF GitHub Bot commented on CB-5059:

Github user infil00p commented on a diff in the pull request:
    --- Diff: framework/src/org/apache/cordova/ ---
    @@ -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
    +       Unless required by applicable law or agreed to in writing,
    +       software distributed under the License is distributed on an
    +       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 --
    The problem with using Android APIs and adopting them as our own is that we have to support
stupid crap that isn't universal.  I'd rather add an API later that we needed than have some
extra cruft that we have to test.  We should work on having the bare minimum needed for FileTransfer
to work, and if a third-party API uses this, they can then submit a bug or send a pull request
to add something to the API.  Adding to an API is an API change, but it's not a breaking one.

> The android implementation of file transfer plugin should not depend on the concrete
class android.webkit.CookieManager
> -----------------------------------------------------------------------------------------------------------------------
>                 Key: CB-5059
>                 URL:
>             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(
> I/dalvikvm(5006):   at android.webkit.JniUtil.getDatabaseDirectory(
> I/dalvikvm(5006):   at android.webkit.CookieManagerClassic.nativeGetCookie(Native Method)
> I/dalvikvm(5006):   at android.webkit.CookieManagerClassic.getCookie(
> I/dalvikvm(5006):   at android.webkit.CookieManagerClassic.getCookie(
> I/dalvikvm(5006):   at org.apache.cordova.filetransfer.FileTransfer$

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message