CarrotChat v2.8.60.240131版本的 MD5 值为:2baf8b9f31830b86b5c5a85ae6b47e05
以下内容为反编译后的 a5.java 源代码,内容仅作参考
package ak.smack;
import ak.im.module.Group;
import ak.im.sdk.manager.ye;
import ak.im.utils.Log;
import android.util.SparseArray;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONException;
import com.alibaba.fastjson.JSONObject;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.provider.IQProvider;
import org.xmlpull.v1.XmlPullParser;
public class a5 extends IQ {
private String a;
private String f4197b;
private String f4198c;
private String f4199d;
private String[] f4200e;
private String[] f;
private String[] g;
private boolean h;
private String i;
private SparseArray<Long> j;
private long k;
private String l;
public String m;
public static class a extends IQProvider {
@Override
public IQ parse(XmlPullParser xmlPullParser, int i) throws Exception {
a5 a5Var = new a5();
boolean z = false;
while (!z) {
int next = xmlPullParser.next();
if (next == 2) {
String name = xmlPullParser.getName();
if ("result".equals(name)) {
a5Var.parseResults(xmlPullParser);
} else if ("versioncodelist".equals(name)) {
a5Var.a(xmlPullParser);
} else if (Group.LIST_VERSION_CODE.equals(name)) {
a5Var.b(xmlPullParser);
}
} else if (next == 3 && xmlPullParser.getName().equals("mucroom")) {
z = true;
}
}
return a5Var;
}
}
public a5(String[] strArr, String[] strArr2, String[] strArr3) {
super("mucroom", "http://akey.im/protocol/xmpp/iq/mucroom#reply");
this.a = "mucroomname";
this.f4197b = Group.ROOM_NAME;
this.f4198c = "requester";
this.f4199d = "reply";
this.k = -1L;
this.f4200e = strArr;
this.f = strArr2;
this.g = strArr3;
setType(IQ.Type.set);
setTo(ye.getInstance().getServer().getXmppDomain());
}
protected void a(XmlPullParser xmlPullParser) throws Exception {
try {
this.j = new SparseArray<>(5);
String nextText = xmlPullParser.nextText();
this.l = nextText;
JSONArray parseArray = JSON.parseArray(nextText);
for (int i = 0; i < parseArray.size(); i++) {
JSONObject jSONObject = parseArray.getJSONObject(i);
String string = jSONObject.getString(this.f4197b);
this.j.put(string.hashCode(), jSONObject.getLong(Group.VERSION_CODE));
}
} catch (Exception e2) {
Log.w("ReplyJoinGroupExtension", "encounter excp in parse g-v-c:" + e2.getMessage());
}
}
protected void b(XmlPullParser xmlPullParser) throws Exception {
try {
this.k = Long.parseLong(xmlPullParser.nextText());
} catch (Exception e2) {
Log.w("ReplyJoinGroupExtension", "encounter excp in parse m-l-v-c:" + e2.getMessage());
}
}
@Override
protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder iQChildElementXmlStringBuilder) {
iQChildElementXmlStringBuilder.append(">");
JSONArray jSONArray = new JSONArray();
if (this.f4200e != null) {
for (int i = 0; i < this.f4200e.length; i++) {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put(this.a, (Object) this.f4200e[i]);
jSONObject.put(this.f4198c, (Object) this.f[i]);
jSONObject.put(this.f4199d, (Object) this.g[i]);
} catch (JSONException e2) {
e2.printStackTrace();
}
jSONArray.add(jSONObject);
}
iQChildElementXmlStringBuilder.optElement(HiAnalyticsConstant.Direction.REQUEST, jSONArray);
} else {
String str = this.l;
if (str != null) {
iQChildElementXmlStringBuilder.optElement(Group.VERSION_CODE, str.toString());
}
long j = this.k;
if (j != -1) {
iQChildElementXmlStringBuilder.optElement(Group.LIST_VERSION_CODE, Long.valueOf(j));
}
String str2 = this.i;
if (str2 != null) {
iQChildElementXmlStringBuilder.optElement("result", str2);
}
}
return iQChildElementXmlStringBuilder;
}
public long getmGroupVersionCode(String str) {
SparseArray<Long> sparseArray = this.j;
if (sparseArray != null) {
return sparseArray.get(str.hashCode()).longValue();
}
return -1L;
}
public long getmListVersionCode() {
return this.k;
}
public String getmResult() {
return this.i;
}
public boolean isSuccess() {
return this.h;
}
protected void parseResults(XmlPullParser xmlPullParser) throws Exception {
try {
this.i = xmlPullParser.nextText();
} catch (Exception e2) {
Log.w("ReplyJoinGroupExtension", "encounter excp in parse results" + e2.getMessage());
}
}
public void setmListVersionCode(long j) {
this.k = j;
}
public a5() {
super("mucroom", "http://akey.im/protocol/xmpp/iq/mucroom#reply");
this.a = "mucroomname";
this.f4197b = Group.ROOM_NAME;
this.f4198c = "requester";
this.f4199d = "reply";
this.k = -1L;
}
}