Skip to content

in Release app (proguard config open),PersistentCookieStore can't get stored cookies, #688

@luotao001

Description

@luotao001

in Release app (proguard config open),PersistentCookieStore can't get stored cookies,..

PersistentCookieStore defaultStore = new PersistentCookieStore(BaseApplication.getContext());
client.setCookieStore(defaultStore);

in PersistentCookieStore.java:

protected Cookie decodeCookie(String cookieString) {
byte[] bytes = hexStringToByteArray(cookieString);
ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(bytes);
Cookie cookie = null;
try {
    ObjectInputStream objectInputStream = new ObjectInputStream(byteArrayInputStream);
    cookie = ((SerializableCookie) objectInputStream.readObject()).getCookie();
    Utils.showToast("decode cookie complete!");

} catch (Exception e) {

}
return cookie;
}

if I enable the proguard config, decodeCookie always return null;
and If disable pro guard config,everything is ok

how can I modify the proguard-project.txt??

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions