diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-10-13 23:10:10 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-10-13 23:10:10 +0200 |
commit | 9a625ab0e6afdb706dd73cef932b42e63605aa1b (patch) | |
tree | ebb6b114416566e59661016d9d60689bbe8ca0d5 /src/main/java/de/pixart/messenger/entities | |
parent | d34d2d05ca371960294356be9735233b898c066a (diff) |
add more file information to FileParams (apk file app name; vcard contacts name)
Diffstat (limited to 'src/main/java/de/pixart/messenger/entities')
-rw-r--r-- | src/main/java/de/pixart/messenger/entities/Message.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Message.java b/src/main/java/de/pixart/messenger/entities/Message.java index af8c2aafa..c51fa1638 100644 --- a/src/main/java/de/pixart/messenger/entities/Message.java +++ b/src/main/java/de/pixart/messenger/entities/Message.java @@ -3,6 +3,7 @@ package de.pixart.messenger.entities; import android.content.ContentValues; import android.database.Cursor; import android.text.SpannableStringBuilder; +import android.util.Log; import com.vdurmont.emoji.EmojiManager; @@ -740,7 +741,14 @@ public class Message extends AbstractEntity { fileParams.width = parseInt(parts[1]); fileParams.height = parseInt(parts[2]); break; + case 6: + fileParams.url = parseUrl(parts[0]); + fileParams.size = parseLong(parts[1]); + fileParams.subject = parseString(parts[5]); + break; + } + Log.d(Config.LOGTAG, "FileParams: " + body); } return fileParams; } @@ -769,6 +777,14 @@ public class Message extends AbstractEntity { } } + private static String parseString(String value) { + try { + return value; + } catch (Exception e) { + return ""; + } + } + public void untie() { this.mNextMessage = null; this.mPreviousMessage = null; @@ -796,6 +812,7 @@ public class Message extends AbstractEntity { public int width = 0; public int height = 0; public int runtime = 0; + public String subject = ""; } public void setFingerprint(String fingerprint) { |