mirror of
https://github.com/deltachat/deltachat-android.git
synced 2025-10-03 17:59:39 +02:00
avoid causing and logging exception in getWebxdcInfo if getWebxdcInfoJson returns empty string
This commit is contained in:
parent
1566ea87d3
commit
16e89bb58a
1 changed files with 3 additions and 2 deletions
|
@ -142,11 +142,12 @@ public class DcMsg {
|
|||
public native byte[] getWebxdcBlob (String filename);
|
||||
public JSONObject getWebxdcInfo () {
|
||||
try {
|
||||
return new JSONObject(getWebxdcInfoJson());
|
||||
String json = getWebxdcInfoJson();
|
||||
if (json != null && !json.isEmpty()) return new JSONObject(json);
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
return new JSONObject();
|
||||
}
|
||||
return new JSONObject();
|
||||
}
|
||||
public native String getWebxdcHref ();
|
||||
public native boolean isForwarded ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue