Kate Mobile v109.1版本的 MD5 值为:fcd76ded5f363ecbfac46035a4ed2a23
以下内容为反编译后的 Attachment.java 源代码,内容仅作参考
package com.perm.kate.api;
import com.perm.utils.ErrorReporter;
import java.io.Serializable;
import java.util.ArrayList;
import org.json.JSONArray;
import org.json.JSONObject;
public class Attachment implements Serializable {
private static final long serialVersionUID = 1;
public Album album;
public Audio audio;
public Comment comment;
public Document document;
public Geo geo;
public Gift gift;
public Link link;
public Message message;
public Note note;
public Page page;
public Photo photo;
public VkPoll poll;
public Sticker sticker;
public String type;
public User user;
public Video video;
public WallMessage wallMessage;
public static ArrayList parseAttachments(JSONArray jSONArray, long j, long j2, JSONObject jSONObject) {
ArrayList arrayList;
String str;
int i;
int i2;
String str2;
String str3;
ArrayList arrayList2;
Object obj;
String string;
String str4;
JSONArray jSONArray2 = jSONArray;
String str5 = "album";
String str6 = "gift";
String str7 = "page";
String str8 = "story";
String str9 = "note";
String str10 = "event";
String str11 = "graffiti";
String str12 = "podcast";
String str13 = "market";
String str14 = "market_album";
String str15 = "audio";
String str16 = "wall_reply";
String str17 = "ugc_sticker";
ArrayList arrayList3 = new ArrayList();
if (jSONArray2 != null) {
ArrayList arrayList4 = arrayList3;
int length = jSONArray.length();
String str18 = "sticker";
int i3 = 0;
while (i3 < length) {
try {
obj = jSONArray2.get(i3);
} catch (Throwable th) {
th = th;
str = str11;
i = i3;
i2 = length;
}
if (obj instanceof JSONObject) {
JSONObject jSONObject2 = (JSONObject) obj;
Attachment attachment = new Attachment();
i2 = length;
try {
string = jSONObject2.getString("type");
attachment.type = string;
} catch (Throwable th2) {
th = th2;
str = str11;
i = i3;
}
if (string.equals("photo")) {
str = str11;
i = i3;
} else {
try {
i = i3;
try {
} catch (Throwable th3) {
th = th3;
str = str11;
str2 = str7;
str3 = str17;
str7 = str8;
str17 = str9;
str8 = str6;
str6 = str10;
str10 = str5;
str5 = str12;
str12 = str15;
arrayList2 = arrayList4;
th.printStackTrace();
ErrorReporter.report(th);
i3 = i + 1;
jSONArray2 = jSONArray;
arrayList4 = arrayList2;
str15 = str12;
str9 = str17;
length = i2;
str11 = str;
str17 = str3;
str12 = str5;
str5 = str10;
str10 = str6;
str6 = str8;
str8 = str7;
str7 = str2;
}
} catch (Throwable th4) {
th = th4;
str = str11;
i = i3;
}
if (attachment.type.equals("posted_photo")) {
str = str11;
} else {
if (attachment.type.equals(str11)) {
try {
attachment.type = "doc";
attachment.document = Graffiti.parse(jSONObject2.getJSONObject(str11));
} catch (Throwable th5) {
th = th5;
str = str11;
str2 = str7;
str3 = str17;
str7 = str8;
str17 = str9;
str8 = str6;
arrayList2 = arrayList4;
str6 = str10;
str10 = str5;
str5 = str12;
str12 = str15;
th.printStackTrace();
ErrorReporter.report(th);
i3 = i + 1;
jSONArray2 = jSONArray;
arrayList4 = arrayList2;
str15 = str12;
str9 = str17;
length = i2;
str11 = str;
str17 = str3;
str12 = str5;
str5 = str10;
str10 = str6;
str6 = str8;
str8 = str7;
str7 = str2;
}
} else if (attachment.type.equals("link")) {
attachment.link = Link.parse(jSONObject2.getJSONObject("link"));
} else if (attachment.type.equals(str15)) {
attachment.audio = Audio.parse(jSONObject2.getJSONObject(str15));
} else if (attachment.type.equals(str9)) {
attachment.note = Note.parse(jSONObject2.getJSONObject(str9));
} else if (attachment.type.equals("video")) {
attachment.video = Video.parseForAttachments(jSONObject2.getJSONObject("video"));
} else {
if (attachment.type.equals("poll")) {
try {
VkPoll parse = VkPoll.parse(jSONObject2.getJSONObject("poll"));
attachment.poll = parse;
str4 = str9;
str = str11;
try {
if (parse.owner_id == 0) {
try {
parse.owner_id = j;
} catch (Throwable th6) {
th = th6;
str2 = str7;
str3 = str17;
arrayList2 = arrayList4;
str7 = str8;
str17 = str4;
str8 = str6;
str6 = str10;
str10 = str5;
str5 = str12;
str12 = str15;
th.printStackTrace();
ErrorReporter.report(th);
i3 = i + 1;
jSONArray2 = jSONArray;
arrayList4 = arrayList2;
str15 = str12;
str9 = str17;
length = i2;
str11 = str;
str17 = str3;
str12 = str5;
str5 = str10;
str10 = str6;
str6 = str8;
str8 = str7;
str7 = str2;
}
}
} catch (Throwable th7) {
th = th7;
str2 = str7;
str3 = str17;
arrayList2 = arrayList4;
str7 = str8;
str17 = str4;
str8 = str6;
str6 = str10;
str10 = str5;
str5 = str12;
str12 = str15;
th.printStackTrace();
ErrorReporter.report(th);
i3 = i + 1;
jSONArray2 = jSONArray;
arrayList4 = arrayList2;
str15 = str12;
str9 = str17;
length = i2;
str11 = str;
str17 = str3;
str12 = str5;
str5 = str10;
str10 = str6;
str6 = str8;
str8 = str7;
str7 = str2;
}
} catch (Throwable th8) {
th = th8;
str4 = str9;
str = str11;
}
} else {
str4 = str9;
str = str11;
try {
} catch (Throwable th9) {
th = th9;
}
if (attachment.type.equals("doc")) {
attachment.document = Document.parse(jSONObject2.getJSONObject("doc"));
} else if (attachment.type.equals("audio_message")) {
attachment.type = str15;
attachment.audio = AudioMessage.parse(jSONObject2.getJSONObject("audio_message"));
} else if (attachment.type.equals("wall")) {
attachment.wallMessage = WallMessage.parse(jSONObject2.getJSONObject("wall"));
} else if (attachment.type.equals(str7)) {
attachment.page = Page.parseFromAttachment(jSONObject2.getJSONObject(str7));
} else if (attachment.type.equals(str6)) {
attachment.gift = Gift.parse(jSONObject2.getJSONObject(str6));
} else if (attachment.type.equals(str5)) {
attachment.album = Album.parseFromAttachment(jSONObject2.getJSONObject(str5));
} else {
String str19 = str18;
try {
} catch (Throwable th10) {
th = th10;
str18 = str19;
str2 = str7;
str3 = str17;
str7 = str8;
str17 = str4;
str8 = str6;
str6 = str10;
str10 = str5;
str5 = str12;
str12 = str15;
arrayList2 = arrayList4;
th.printStackTrace();
ErrorReporter.report(th);
i3 = i + 1;
jSONArray2 = jSONArray;
arrayList4 = arrayList2;
str15 = str12;
str9 = str17;
length = i2;
str11 = str;
str17 = str3;
str12 = str5;
str5 = str10;
str10 = str6;
str6 = str8;
str8 = str7;
str7 = str2;
}
if (attachment.type.equals(str19)) {
try {
attachment.sticker = Sticker.parse(jSONObject2.getJSONObject(str19));
str18 = str19;
} catch (Throwable th11) {
th = th11;
str18 = str19;
str2 = str7;
str3 = str17;
arrayList2 = arrayList4;
str7 = str8;
str17 = str4;
str8 = str6;
str6 = str10;
str10 = str5;
str5 = str12;
str12 = str15;
th.printStackTrace();
ErrorReporter.report(th);
i3 = i + 1;
jSONArray2 = jSONArray;
arrayList4 = arrayList2;
str15 = str12;
str9 = str17;
length = i2;
str11 = str;
str17 = str3;
str12 = str5;
str5 = str10;
str10 = str6;
str6 = str8;
str8 = str7;
str7 = str2;
}
} else {
String str20 = str17;
try {
} catch (Throwable th12) {
th = th12;
str18 = str19;
}
if (attachment.type.equals(str20)) {
try {
attachment.type = str19;
attachment.sticker = Sticker.parse(jSONObject2.getJSONObject(str20));
str18 = str19;
} catch (Throwable th13) {
th = th13;
str18 = str19;
}
} else {
str18 = str19;
String str21 = str16;
try {
if (attachment.type.equals(str21)) {
try {
attachment.comment = Comment.parseFromAttachments(jSONObject2.getJSONObject(str21));
str16 = str21;
} catch (Throwable th14) {
th = th14;
str16 = str21;
}
} else {
str16 = str21;
String str22 = str14;
try {
if (attachment.type.equals(str22)) {
try {
MarketAlbum parse2 = MarketAlbum.parse(jSONObject2.getJSONObject(str22));
attachment.type = "link";
Link link = new Link();
attachment.link = link;
str14 = str22;
try {
StringBuilder sb = new StringBuilder();
str17 = str4;
try {
sb.append("https://m.vk.com/market");
str3 = str20;
String str23 = str5;
try {
sb.append(parse2.owner_id);
sb.append("?section=album_");
sb.append(parse2.id);
link.url = sb.toString();
attachment.link.title = parse2.title;
str2 = str7;
str5 = str12;
arrayList2 = arrayList4;
str7 = str8;
str12 = str15;
str8 = str6;
str6 = str10;
str10 = str23;
arrayList2.add(attachment);
} catch (Throwable th15) {
th = th15;
str2 = str7;
str5 = str12;
arrayList2 = arrayList4;
str7 = str8;
str12 = str15;
str8 = str6;
str6 = str10;
str10 = str23;
}
} catch (Throwable th16) {
th = th16;
}
} catch (Throwable th17) {
th = th17;
}
} catch (Throwable th18) {
th = th18;
str14 = str22;
}
} else {
str14 = str22;
str17 = str4;
str3 = str20;
String str24 = str5;
try {
String str25 = str13;
try {
if (attachment.type.equals(str25)) {
try {
JSONObject optJSONObject = jSONObject2.optJSONObject(str25);
if (optJSONObject == null) {
str13 = str25;
str2 = str7;
str5 = str12;
arrayList2 = arrayList4;
str7 = str8;
str12 = str15;
str8 = str6;
str6 = str10;
str10 = str24;
} else {
MarketItem parse3 = MarketItem.parse(optJSONObject);
attachment.type = "link";
Link link2 = new Link();
attachment.link = link2;
StringBuilder sb2 = new StringBuilder();
str13 = str25;
try {
sb2.append("http://m.vk.com/product");
String str26 = str6;
str2 = str7;
try {
sb2.append(parse3.owner_id);
sb2.append("_");
sb2.append(parse3.id);
link2.url = sb2.toString();
attachment.link.title = parse3.title;
str7 = str8;
str6 = str10;
str8 = str26;
str10 = str24;
str5 = str12;
arrayList2 = arrayList4;
str12 = str15;
arrayList2.add(attachment);
} catch (Throwable th19) {
th = th19;
str7 = str8;
str6 = str10;
str8 = str26;
str10 = str24;
str5 = str12;
arrayList2 = arrayList4;
}
} catch (Throwable th20) {
th = th20;
str2 = str7;
str7 = str8;
str8 = str6;
str5 = str12;
arrayList2 = arrayList4;
str6 = str10;
str10 = str24;
str12 = str15;
th.printStackTrace();
ErrorReporter.report(th);
i3 = i + 1;
jSONArray2 = jSONArray;
arrayList4 = arrayList2;
str15 = str12;
str9 = str17;
length = i2;
str11 = str;
str17 = str3;
str12 = str5;
str5 = str10;
str10 = str6;
str6 = str8;
str8 = str7;
str7 = str2;
}
}
} catch (Throwable th21) {
th = th21;
str13 = str25;
}
} else {
str13 = str25;
String str27 = str6;
str2 = str7;
try {
str5 = str12;
try {
if (attachment.type.equals(str5)) {
attachment.type = str15;
Audio parse4 = Audio.parse(jSONObject2.getJSONObject(str5));
attachment.audio = parse4;
parse4.setPodcast();
str7 = str8;
str6 = str10;
} else {
str6 = str10;
try {
if (attachment.type.equals(str6)) {
JSONObject jSONObject3 = jSONObject2.getJSONObject(str6);
attachment.type = "link";
Link link3 = new Link();
attachment.link = link3;
link3.url = "http://m.vk.com/club" + jSONObject3.optInt("id");
attachment.link.title = jSONObject3.optString("text");
str7 = str8;
} else {
str7 = str8;
try {
if (attachment.type.equals(str7)) {
Story parse5 = Story.parse(jSONObject2.getJSONObject(str7));
attachment.type = "link";
Link link4 = new Link();
attachment.link = link4;
str8 = str27;
try {
StringBuilder sb3 = new StringBuilder();
str10 = str24;
try {
sb3.append("http://m.vk.com/story");
str12 = str15;
sb3.append(parse5.owner_id);
sb3.append("_");
sb3.append(parse5.id);
link4.url = sb3.toString();
arrayList2 = arrayList4;
arrayList2.add(attachment);
} catch (Throwable th22) {
th = th22;
str12 = str15;
arrayList2 = arrayList4;
th.printStackTrace();
ErrorReporter.report(th);
i3 = i + 1;
jSONArray2 = jSONArray;
arrayList4 = arrayList2;
str15 = str12;
str9 = str17;
length = i2;
str11 = str;
str17 = str3;
str12 = str5;
str5 = str10;
str10 = str6;
str6 = str8;
str8 = str7;
str7 = str2;
}
} catch (Throwable th23) {
th = th23;
str10 = str24;
str12 = str15;
arrayList2 = arrayList4;
th.printStackTrace();
ErrorReporter.report(th);
i3 = i + 1;
jSONArray2 = jSONArray;
arrayList4 = arrayList2;
str15 = str12;
str9 = str17;
length = i2;
str11 = str;
str17 = str3;
str12 = str5;
str5 = str10;
str10 = str6;
str6 = str8;
str8 = str7;
str7 = str2;
}
} else {
str8 = str27;
str10 = str24;
str12 = str15;
arrayList2 = arrayList4;
}
} catch (Throwable th24) {
th = th24;
str8 = str27;
str10 = str24;
str12 = str15;
arrayList2 = arrayList4;
th.printStackTrace();
ErrorReporter.report(th);
i3 = i + 1;
jSONArray2 = jSONArray;
arrayList4 = arrayList2;
str15 = str12;
str9 = str17;
length = i2;
str11 = str;
str17 = str3;
str12 = str5;
str5 = str10;
str10 = str6;
str6 = str8;
str8 = str7;
str7 = str2;
}
}
} catch (Throwable th25) {
th = th25;
str7 = str8;
}
}
str8 = str27;
str10 = str24;
str12 = str15;
arrayList2 = arrayList4;
arrayList2.add(attachment);
} catch (Throwable th26) {
th = th26;
str7 = str8;
str6 = str10;
}
} catch (Throwable th27) {
th = th27;
str7 = str8;
str6 = str10;
str8 = str27;
str10 = str24;
str5 = str12;
str12 = str15;
arrayList2 = arrayList4;
th.printStackTrace();
ErrorReporter.report(th);
i3 = i + 1;
jSONArray2 = jSONArray;
arrayList4 = arrayList2;
str15 = str12;
str9 = str17;
length = i2;
str11 = str;
str17 = str3;
str12 = str5;
str5 = str10;
str10 = str6;
str6 = str8;
str8 = str7;
str7 = str2;
}
}
} catch (Throwable th28) {
th = th28;
str13 = str25;
str2 = str7;
str5 = str12;
str7 = str8;
str12 = str15;
str8 = str6;
str6 = str10;
str10 = str24;
arrayList2 = arrayList4;
th.printStackTrace();
ErrorReporter.report(th);
i3 = i + 1;
jSONArray2 = jSONArray;
arrayList4 = arrayList2;
str15 = str12;
str9 = str17;
length = i2;
str11 = str;
str17 = str3;
str12 = str5;
str5 = str10;
str10 = str6;
str6 = str8;
str8 = str7;
str7 = str2;
}
} catch (Throwable th29) {
th = th29;
}
}
} catch (Throwable th30) {
th = th30;
str14 = str22;
str17 = str4;
str3 = str20;
str2 = str7;
str7 = str8;
str8 = str6;
str6 = str10;
str10 = str5;
str5 = str12;
str12 = str15;
arrayList2 = arrayList4;
th.printStackTrace();
ErrorReporter.report(th);
i3 = i + 1;
jSONArray2 = jSONArray;
arrayList4 = arrayList2;
str15 = str12;
str9 = str17;
length = i2;
str11 = str;
str17 = str3;
str12 = str5;
str5 = str10;
str10 = str6;
str6 = str8;
str8 = str7;
str7 = str2;
}
}
} catch (Throwable th31) {
th = th31;
str16 = str21;
}
str17 = str4;
str3 = str20;
str2 = str7;
arrayList2 = arrayList4;
str7 = str8;
str8 = str6;
str6 = str10;
str10 = str5;
str5 = str12;
str12 = str15;
th.printStackTrace();
ErrorReporter.report(th);
}
str17 = str4;
str3 = str20;
str2 = str7;
arrayList2 = arrayList4;
str7 = str8;
str8 = str6;
str6 = str10;
str10 = str5;
str5 = str12;
str12 = str15;
arrayList2.add(attachment);
}
}
}
str2 = str7;
str3 = str17;
arrayList2 = arrayList4;
str7 = str8;
str17 = str4;
str8 = str6;
str6 = str10;
str10 = str5;
str5 = str12;
str12 = str15;
arrayList2.add(attachment);
}
str = str11;
str2 = str7;
str3 = str17;
str7 = str8;
str17 = str9;
str8 = str6;
arrayList2 = arrayList4;
str6 = str10;
str10 = str5;
str5 = str12;
str12 = str15;
arrayList2.add(attachment);
}
}
str2 = str7;
str3 = str17;
str7 = str8;
str17 = str9;
str8 = str6;
str6 = str10;
str10 = str5;
str5 = str12;
str12 = str15;
JSONObject optJSONObject2 = jSONObject2.optJSONObject("photo");
if (optJSONObject2 != null) {
attachment.photo = Photo.parse(optJSONObject2);
}
arrayList2 = arrayList4;
arrayList2.add(attachment);
} else {
str = str11;
i = i3;
i2 = length;
str2 = str7;
str3 = str17;
str7 = str8;
str17 = str9;
str8 = str6;
arrayList2 = arrayList4;
str6 = str10;
str10 = str5;
str5 = str12;
str12 = str15;
}
i3 = i + 1;
jSONArray2 = jSONArray;
arrayList4 = arrayList2;
str15 = str12;
str9 = str17;
length = i2;
str11 = str;
str17 = str3;
str12 = str5;
str5 = str10;
str10 = str6;
str6 = str8;
str8 = str7;
str7 = str2;
}
arrayList = arrayList4;
} else {
arrayList = arrayList3;
}
if (jSONObject != null) {
Attachment attachment2 = new Attachment();
attachment2.type = "geo";
attachment2.geo = Geo.parse(jSONObject);
arrayList.add(attachment2);
}
return arrayList;
}
}