CarrotChat v2.8.80.240429版本的 MD5 值为:fdf98761f01e715a89df24b85b0d206e
以下内容为反编译后的 a5.java 源代码,内容仅作参考
package y0;
import ak.im.module.Group;
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 f48054a;
private String f48055b;
private String f48056c;
private String f48057d;
private String[] f48058e;
private String[] f48059f;
private String[] f48060g;
private boolean f48061h;
private String f48062i;
private SparseArray<Long> f48063j;
private long f48064k;
private String f48065l;
public String f48066m;
public static class a extends IQProvider {
@Override
public IQ parse(XmlPullParser xmlPullParser, int i10) throws Exception {
a5 a5Var = new a5();
boolean z10 = false;
while (!z10) {
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")) {
z10 = true;
}
}
return a5Var;
}
}
public a5(String[] strArr, String[] strArr2, String[] strArr3) {
super("mucroom", "http://akey.im/protocol/xmpp/iq/mucroom#reply");
this.f48054a = "mucroomname";
this.f48055b = Group.ROOM_NAME;
this.f48056c = "requester";
this.f48057d = "reply";
this.f48064k = -1L;
this.f48058e = strArr;
this.f48059f = strArr2;
this.f48060g = strArr3;
setType(IQ.Type.set);
setTo(ak.im.sdk.manager.f1.getInstance().getServer().getXmppDomain());
}
protected void a(XmlPullParser xmlPullParser) throws Exception {
try {
this.f48063j = new SparseArray<>(5);
String nextText = xmlPullParser.nextText();
this.f48065l = nextText;
JSONArray parseArray = JSON.parseArray(nextText);
for (int i10 = 0; i10 < parseArray.size(); i10++) {
JSONObject jSONObject = parseArray.getJSONObject(i10);
this.f48063j.put(jSONObject.getString(this.f48055b).hashCode(), jSONObject.getLong(Group.VERSION_CODE));
}
} catch (Exception e10) {
Log.w("ReplyJoinGroupExtension", "encounter excp in parse g-v-c:" + e10.getMessage());
}
}
protected void b(XmlPullParser xmlPullParser) throws Exception {
try {
this.f48064k = Long.parseLong(xmlPullParser.nextText());
} catch (Exception e10) {
Log.w("ReplyJoinGroupExtension", "encounter excp in parse m-l-v-c:" + e10.getMessage());
}
}
@Override
protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder iQChildElementXmlStringBuilder) {
iQChildElementXmlStringBuilder.append(">");
JSONArray jSONArray = new JSONArray();
if (this.f48058e != null) {
for (int i10 = 0; i10 < this.f48058e.length; i10++) {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put(this.f48054a, (Object) this.f48058e[i10]);
jSONObject.put(this.f48056c, (Object) this.f48059f[i10]);
jSONObject.put(this.f48057d, (Object) this.f48060g[i10]);
} catch (JSONException e10) {
e10.printStackTrace();
}
jSONArray.add(jSONObject);
}
iQChildElementXmlStringBuilder.optElement(HiAnalyticsConstant.Direction.REQUEST, jSONArray);
} else {
String str = this.f48065l;
if (str != null) {
iQChildElementXmlStringBuilder.optElement(Group.VERSION_CODE, str.toString());
}
long j10 = this.f48064k;
if (j10 != -1) {
iQChildElementXmlStringBuilder.optElement(Group.LIST_VERSION_CODE, Long.valueOf(j10));
}
String str2 = this.f48062i;
if (str2 != null) {
iQChildElementXmlStringBuilder.optElement("result", str2);
}
}
return iQChildElementXmlStringBuilder;
}
public long getmGroupVersionCode(String str) {
SparseArray<Long> sparseArray = this.f48063j;
if (sparseArray != null) {
return sparseArray.get(str.hashCode()).longValue();
}
return -1L;
}
public long getmListVersionCode() {
return this.f48064k;
}
public String getmResult() {
return this.f48062i;
}
public boolean isSuccess() {
return this.f48061h;
}
protected void parseResults(XmlPullParser xmlPullParser) throws Exception {
try {
this.f48062i = xmlPullParser.nextText();
} catch (Exception e10) {
Log.w("ReplyJoinGroupExtension", "encounter excp in parse results" + e10.getMessage());
}
}
public void setmListVersionCode(long j10) {
this.f48064k = j10;
}
public a5() {
super("mucroom", "http://akey.im/protocol/xmpp/iq/mucroom#reply");
this.f48054a = "mucroomname";
this.f48055b = Group.ROOM_NAME;
this.f48056c = "requester";
this.f48057d = "reply";
this.f48064k = -1L;
}
}