CarrotChat v2.8.60.240131版本的 MD5 值为:2baf8b9f31830b86b5c5a85ae6b47e05
以下内容为反编译后的 x5.java 源代码,内容仅作参考
package ak.smack;
import ak.im.sdk.manager.ye;
import ak.im.utils.Log;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.provider.IQProvider;
import org.json.JSONException;
import org.json.JSONObject;
import org.xmlpull.v1.XmlPullParser;
public class x5 extends IQ {
private static boolean a;
private String f4791b;
private String f4792c;
private String f4793d;
private JSONObject f4794e;
private String f;
private boolean g;
private String h;
boolean i;
public static class a extends IQProvider {
@Override
public IQ parse(XmlPullParser xmlPullParser, int i) throws Exception {
x5 x5Var = new x5();
Log.i("UnBindSecurityPhoneExtension", "parset :" + xmlPullParser.toString());
boolean z = false;
while (!z) {
int next = xmlPullParser.next();
if (next == 4) {
x5Var.parseResults(xmlPullParser);
} else if (next == 3 && xmlPullParser.getName().equals("cancelsecurityphone")) {
z = true;
}
}
return x5Var;
}
}
public x5(String str, String str2, String str3, boolean z) {
super("cancelsecurityphone", "http://akey.im/protocol/xmpp/iq/cancelsecurityphone");
this.f4791b = "success";
a = z;
this.i = true;
if (z) {
setType(IQ.Type.get);
} else {
setType(IQ.Type.set);
this.f4792c = str2;
this.f4793d = str3;
}
setTo(ye.getInstance().getServer().getXmppDomain());
setFrom(str);
}
@Override
protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder iQChildElementXmlStringBuilder) {
iQChildElementXmlStringBuilder.append(">");
JSONObject jSONObject = new JSONObject();
try {
if (!a) {
jSONObject.put("smscode", this.f4792c);
jSONObject.put("reqid", this.f4793d);
}
} catch (JSONException e2) {
e2.printStackTrace();
}
if (!a) {
iQChildElementXmlStringBuilder.optElement(HiAnalyticsConstant.Direction.REQUEST, jSONObject.toString());
}
return iQChildElementXmlStringBuilder;
}
public String getResult_reqId() {
return this.h;
}
public boolean isSuccess() {
return this.g;
}
protected void parseResults(XmlPullParser xmlPullParser) throws Exception {
try {
if (!a) {
String text = xmlPullParser.getText();
this.f = text;
if (this.f4791b.equals(text)) {
this.g = true;
}
} else {
JSONObject jSONObject = new JSONObject(xmlPullParser.getText());
this.f4794e = jSONObject;
if (jSONObject != null) {
this.h = jSONObject.getString("reqid");
this.g = true;
}
}
} catch (Exception e2) {
e2.printStackTrace();
this.g = false;
}
}
public void setSuccess(boolean z) {
this.g = z;
}
public x5() {
super("cancelsecurityphone", "http://akey.im/protocol/xmpp/iq/cancelsecurityphone");
this.f4791b = "success";
}
}