CarrotChat v2.8.80.240429版本的 MD5 值为:fdf98761f01e715a89df24b85b0d206e
以下内容为反编译后的 h1.java 源代码,内容仅作参考
package y0;
import ak.im.module.BaseField;
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 f48307i;
private String f48308a;
private boolean f48309b;
private String f48310c;
private JSONObject f48311d;
private Map<String, String> f48312e;
private List<String> f48313f;
private long f48314g;
private boolean f48315h;
public static class a extends IQProvider {
@Override
public IQ parse(XmlPullParser xmlPullParser, int i10) throws Exception {
h1 h1Var = new h1();
boolean z10 = false;
while (!z10) {
int next = xmlPullParser.next();
if (next == 4) {
h1Var.parseResults(xmlPullParser);
} else if (next == 3 && xmlPullParser.getName().equals(BaseField.TYPE_USER)) {
z10 = true;
}
}
return h1Var;
}
}
public h1(String str, String str2, boolean z10, boolean z11) {
super(BaseField.TYPE_USER, "http://akey.im/protocol/xmpp/iq/user#setsearchswitch");
if (z11) {
setType(IQ.Type.get);
} else {
setType(IQ.Type.set);
}
setTo(ak.im.sdk.manager.f1.getInstance().getServer().getXmppDomain());
setFrom(str);
this.f48308a = str2;
this.f48309b = z10;
f48307i = z11;
}
@Override
protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder iQChildElementXmlStringBuilder) {
iQChildElementXmlStringBuilder.append(">");
if (!f48307i) {
JSONObject jSONObject = new JSONObject();
if (this.f48309b) {
jSONObject.put("phonesearch", (Object) this.f48308a);
jSONObject.put("akeyidsearch", (Object) "");
} else {
jSONObject.put("phonesearch", (Object) "");
jSONObject.put("akeyidsearch", (Object) this.f48308a);
}
iQChildElementXmlStringBuilder.optElement(HiAnalyticsConstant.Direction.REQUEST, jSONObject.toString());
} else {
Log.i("GetAndSetSearchMeWithAsimIdExtension", "Query");
}
return iQChildElementXmlStringBuilder;
}
public List<String> getNamelist() {
return this.f48313f;
}
public Map<String, String> getResult_for_query_map() {
return this.f48312e;
}
public String getResult_t() {
return this.f48310c;
}
public String getUserNameByJid(String str) {
return str.split("@")[0];
}
public long getVersionCode() {
return this.f48314g;
}
public boolean isSuccess() {
return this.f48315h;
}
protected void parseResults(XmlPullParser xmlPullParser) throws Exception {
try {
if (!f48307i) {
this.f48310c = xmlPullParser.getText();
Log.d("GetAndSetSearchMeWithAsimIdExtension", "mResult:" + this.f48310c);
if ("success".equals(this.f48310c)) {
this.f48315h = true;
} else {
this.f48314g = Long.parseLong(this.f48310c);
}
} else {
this.f48311d = JSON.parseObject(xmlPullParser.getText());
this.f48312e = new HashMap();
this.f48313f = new ArrayList();
String string = this.f48311d.getString("phonesearch");
String string2 = this.f48311d.getString("akeyidsearch");
this.f48313f.add("phonesearch");
this.f48313f.add("akeyidsearch");
this.f48312e.put("phonesearch", string);
this.f48312e.put("akeyidsearch", string2);
}
} catch (Exception e10) {
e10.printStackTrace();
}
}
public h1() {
super(BaseField.TYPE_USER, "http://akey.im/protocol/xmpp/iq/user#setsearchswitch");
}
}