CarrotChat v2.8.60.240131版本的 MD5 值为:2baf8b9f31830b86b5c5a85ae6b47e05
以下内容为反编译后的 k.java 源代码,内容仅作参考
package ak.smack;
import ak.im.sdk.manager.ye;
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 a;
private String f4437b;
private boolean f4438c;
private String f4439d;
private String f4440e;
private JSONArray f;
private Map<String, String> g;
private List<String> h;
public static class a extends IQProvider {
@Override
public IQ parse(XmlPullParser xmlPullParser, int i) throws Exception {
k kVar = new k();
boolean z = false;
while (!z) {
int next = xmlPullParser.next();
if (next == 4) {
kVar.parseResults(xmlPullParser);
} else if (next == 3 && xmlPullParser.getName().equals("akeyid")) {
z = true;
}
}
return kVar;
}
}
public k(String str, String str2, boolean z, boolean z2) {
super("akeyid", "http://akey.im/protocol/xmpp/iq/setakeyid");
this.f4437b = null;
this.f4439d = null;
if (z) {
setType(IQ.Type.get);
} else {
setType(IQ.Type.set);
}
setTo(ye.getInstance().getServer().getXmppDomain());
setFrom(str);
this.f4437b = getUserNameByJid(str2);
this.f4439d = str2;
a = z;
this.f4438c = z2;
}
@Override
protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder iQChildElementXmlStringBuilder) {
iQChildElementXmlStringBuilder.append(">");
return iQChildElementXmlStringBuilder;
}
public List<String> getNamelist() {
return this.h;
}
public Map<String, String> getResult_for_query_map() {
return this.g;
}
public String getResult_t() {
return this.f4440e;
}
public String getUserNameByJid(String str) {
return (str == null || !str.contains("@")) ? str : str.split("@")[0];
}
protected void parseResults(XmlPullParser xmlPullParser) throws Exception {
try {
if (!a) {
this.f4440e = xmlPullParser.getText();
return;
}
this.f = new JSONArray(xmlPullParser.getText());
this.g = new HashMap();
this.h = new ArrayList();
for (int i = 0; i < this.f.length(); i++) {
String optString = this.f.optJSONObject(i).optString("name");
String optString2 = this.f.optJSONObject(i).optString("akeyid");
this.h.add(optString);
this.g.put(optString, optString2);
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
public k() {
super("akeyid", "http://akey.im/protocol/xmpp/iq/setakeyid");
this.f4437b = null;
this.f4439d = null;
}
}