CarrotChat v2.8.60.240131版本的 MD5 值为:2baf8b9f31830b86b5c5a85ae6b47e05
以下内容为反编译后的 h1.java 源代码,内容仅作参考
package ak.smack;
import ak.im.module.BaseField;
import ak.im.sdk.manager.ye;
import ak.im.utils.Log;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant;
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.xmlpull.v1.XmlPullParser;
public class h1 extends IQ {
private static boolean a;
private String f4360b;
private boolean f4361c;
private String f4362d;
private JSONObject f4363e;
private Map<String, String> f;
private List<String> g;
private long h;
private boolean i;
public static class a extends IQProvider {
@Override
public IQ parse(XmlPullParser xmlPullParser, int i) throws Exception {
h1 h1Var = new h1();
boolean z = false;
while (!z) {
int next = xmlPullParser.next();
if (next == 4) {
h1Var.parseResults(xmlPullParser);
} else if (next == 3 && xmlPullParser.getName().equals(BaseField.TYPE_USER)) {
z = true;
}
}
return h1Var;
}
}
public h1(String str, String str2, boolean z, boolean z2) {
super(BaseField.TYPE_USER, "http://akey.im/protocol/xmpp/iq/user#setsearchswitch");
if (z2) {
setType(IQ.Type.get);
} else {
setType(IQ.Type.set);
}
setTo(ye.getInstance().getServer().getXmppDomain());
setFrom(str);
this.f4360b = str2;
this.f4361c = z;
a = z2;
}
@Override
protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder iQChildElementXmlStringBuilder) {
iQChildElementXmlStringBuilder.append(">");
if (!a) {
JSONObject jSONObject = new JSONObject();
if (this.f4361c) {
jSONObject.put("phonesearch", (Object) this.f4360b);
jSONObject.put("akeyidsearch", (Object) "");
} else {
jSONObject.put("phonesearch", (Object) "");
jSONObject.put("akeyidsearch", (Object) this.f4360b);
}
iQChildElementXmlStringBuilder.optElement(HiAnalyticsConstant.Direction.REQUEST, jSONObject.toString());
} else {
Log.i("GetAndSetSearchMeWithAsimIdExtension", "Query");
}
return iQChildElementXmlStringBuilder;
}
public List<String> getNamelist() {
return this.g;
}
public Map<String, String> getResult_for_query_map() {
return this.f;
}
public String getResult_t() {
return this.f4362d;
}
public String getUserNameByJid(String str) {
return str.split("@")[0];
}
public long getVersionCode() {
return this.h;
}
public boolean isSuccess() {
return this.i;
}
protected void parseResults(XmlPullParser xmlPullParser) throws Exception {
try {
if (!a) {
this.f4362d = xmlPullParser.getText();
Log.d("GetAndSetSearchMeWithAsimIdExtension", "mResult:" + this.f4362d);
if ("success".equals(this.f4362d)) {
this.i = true;
} else {
this.h = Long.parseLong(this.f4362d);
}
} else {
this.f4363e = JSON.parseObject(xmlPullParser.getText());
this.f = new HashMap();
this.g = new ArrayList();
String string = this.f4363e.getString("phonesearch");
String string2 = this.f4363e.getString("akeyidsearch");
this.g.add("phonesearch");
this.g.add("akeyidsearch");
this.f.put("phonesearch", string);
this.f.put("akeyidsearch", string2);
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
public h1() {
super(BaseField.TYPE_USER, "http://akey.im/protocol/xmpp/iq/user#setsearchswitch");
}
}