mirror of
https://github.com/deltachat/deltachat-android.git
synced 2025-10-04 18:29:17 +02:00
Set WebView proxy to 0.0.0.0 when possible (#2539)
* Set WebView proxy to 0.0.0.0 when possible * add DcHttpResponse to wrapper * use new DcHttpResponse to show images in email-html-view * null-encoding is fine for WebResourceResponse() --------- Co-authored-by: B. Petersen <r10s@b44t.com>
This commit is contained in:
parent
f130336c2f
commit
0e657eed56
5 changed files with 146 additions and 0 deletions
22
src/com/b44t/messenger/DcHttpResponse.java
Normal file
22
src/com/b44t/messenger/DcHttpResponse.java
Normal file
|
@ -0,0 +1,22 @@
|
|||
package com.b44t.messenger;
|
||||
|
||||
public class DcHttpResponse {
|
||||
|
||||
public DcHttpResponse(long httpResponseCPtr) {
|
||||
this.httpResponseCPtr = httpResponseCPtr;
|
||||
}
|
||||
|
||||
@Override protected void finalize() throws Throwable {
|
||||
super.finalize();
|
||||
unrefHttpResponseCPtr();
|
||||
httpResponseCPtr = 0;
|
||||
}
|
||||
|
||||
public native String getMimetype ();
|
||||
public native String getEncoding ();
|
||||
public native byte[] getBlob ();
|
||||
|
||||
// working with raw c-data
|
||||
private long httpResponseCPtr; // CAVE: the name is referenced in the JNI
|
||||
private native void unrefHttpResponseCPtr();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue