CarrotChat v2.8.80.240429版本的 MD5 值为:fdf98761f01e715a89df24b85b0d206e
以下内容为反编译后的 k.java 源代码,内容仅作参考
package y0;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.provider.IQProvider;
import org.json.JSONArray;
import org.xmlpull.v1.XmlPullParser;
public class k extends IQ {
private static boolean f48432h;
private String f48433a;
private boolean f48434b;
private String f48435c;
private String f48436d;
private JSONArray f48437e;
private Map<String, String> f48438f;
private List<String> f48439g;
public static class a extends IQProvider {
@Override
public IQ parse(XmlPullParser xmlPullParser, int i10) throws Exception {
k kVar = new k();
boolean z10 = false;
while (!z10) {
int next = xmlPullParser.next();
if (next == 4) {
kVar.parseResults(xmlPullParser);
} else if (next == 3 && xmlPullParser.getName().equals("akeyid")) {
z10 = true;
}
}
return kVar;
}
}
public k(String str, String str2, boolean z10, boolean z11) {
super("akeyid", "http://akey.im/protocol/xmpp/iq/setakeyid");
this.f48433a = null;
this.f48435c = null;
if (z10) {
setType(IQ.Type.get);
} else {
setType(IQ.Type.set);
}
setTo(ak.im.sdk.manager.f1.getInstance().getServer().getXmppDomain());
setFrom(str);
this.f48433a = getUserNameByJid(str2);
this.f48435c = str2;
f48432h = z10;
this.f48434b = z11;
}
@Override
protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder iQChildElementXmlStringBuilder) {
iQChildElementXmlStringBuilder.append(">");
return iQChildElementXmlStringBuilder;
}
public List<String> getNamelist() {
return this.f48439g;
}
public Map<String, String> getResult_for_query_map() {
return this.f48438f;
}
public String getResult_t() {
return this.f48436d;
}
public String getUserNameByJid(String str) {
if (str != null && str.contains("@")) {
return str.split("@")[0];
}
return str;
}
protected void parseResults(XmlPullParser xmlPullParser) throws Exception {
try {
if (!f48432h) {
this.f48436d = xmlPullParser.getText();
return;
}
this.f48437e = new JSONArray(xmlPullParser.getText());
this.f48438f = new HashMap();
this.f48439g = new ArrayList();
for (int i10 = 0; i10 < this.f48437e.length(); i10++) {
String optString = this.f48437e.optJSONObject(i10).optString("name");
String optString2 = this.f48437e.optJSONObject(i10).optString("akeyid");
this.f48439g.add(optString);
this.f48438f.put(optString, optString2);
}
} catch (Exception e10) {
e10.printStackTrace();
}
}
public k() {
super("akeyid", "http://akey.im/protocol/xmpp/iq/setakeyid");
this.f48433a = null;
this.f48435c = null;
}
}