mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
add missing webxdc api
This commit is contained in:
@@ -74,7 +74,9 @@ public class WebxdcActivity extends WebViewActivity implements DcEventCenter.DcE
|
||||
private DcMsg dcAppMsg;
|
||||
private String baseURL;
|
||||
private String sourceCodeUrl = "";
|
||||
private String selfAddr = "";
|
||||
private String selfAddr;
|
||||
private int sendUpdateMaxSize;
|
||||
private int sendUpdateInterval;
|
||||
private boolean internetAccess = false;
|
||||
private boolean hideActionBar = false;
|
||||
|
||||
@@ -199,7 +201,9 @@ public class WebxdcActivity extends WebViewActivity implements DcEventCenter.DcE
|
||||
|
||||
final JSONObject info = this.dcAppMsg.getWebxdcInfo();
|
||||
internetAccess = JsonUtils.optBoolean(info, "internet_access");
|
||||
selfAddr = JsonUtils.optString(info, "self_addr");
|
||||
selfAddr = info.optString("self_addr");
|
||||
sendUpdateMaxSize = info.optInt("send_update_max_size");
|
||||
sendUpdateInterval = info.optInt("send_update_interval");
|
||||
|
||||
toggleFakeProxy(!internetAccess);
|
||||
|
||||
@@ -494,6 +498,16 @@ public class WebxdcActivity extends WebViewActivity implements DcEventCenter.DcE
|
||||
}
|
||||
|
||||
class InternalJSApi {
|
||||
@JavascriptInterface
|
||||
public int sendUpdateMaxSize() {
|
||||
return WebxdcActivity.this.sendUpdateMaxSize;
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public int sendUpdateInterval() {
|
||||
return WebxdcActivity.this.sendUpdateInterval;
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public String selfAddr() {
|
||||
return WebxdcActivity.this.selfAddr;
|
||||
|
||||
Reference in New Issue
Block a user