CarrotChat v2.8.60.240131版本的 MD5 值为:2baf8b9f31830b86b5c5a85ae6b47e05
以下内容为反编译后的 c2.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 c2 extends IQ {
private String a;
private String f4230b;
private String f4231c;
private boolean f4232d;
private long f4233e;
boolean f;
public static class a extends IQProvider {
@Override
public IQ parse(XmlPullParser xmlPullParser, int i) throws Exception {
c2 c2Var = new c2();
Log.i("MessageNoticeVoiceExtension", "parset :" + xmlPullParser.toString());
boolean z = false;
while (!z) {
int next = xmlPullParser.next();
if (next == 4) {
c2Var.parseResults(xmlPullParser);
} else if (next == 3 && xmlPullParser.getName().equals("pushsoundswitch")) {
z = true;
}
}
return c2Var;
}
}
public c2(String str, String str2) {
super("pushsoundswitch", "http://akey.im/protocol/xmpp/iq/userprop#setpushsoundswitch");
this.a = str;
this.f = true;
this.f4230b = str2;
setType(IQ.Type.set);
setTo(ye.getInstance().getServer().getXmppDomain());
setFrom(this.a);
}
@Override
protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder iQChildElementXmlStringBuilder) {
iQChildElementXmlStringBuilder.append(">");
if (this.f) {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("pushsoundswitch", this.f4230b);
} catch (JSONException e2) {
e2.printStackTrace();
}
iQChildElementXmlStringBuilder.optElement(HiAnalyticsConstant.Direction.REQUEST, jSONObject.toString());
}
return iQChildElementXmlStringBuilder;
}
public long getVersionCode() {
return this.f4233e;
}
public String getmSetResult() {
return this.f4231c;
}
public boolean isSuccess() {
return this.f4232d;
}
protected void parseResults(XmlPullParser xmlPullParser) {
Log.d("MessageNoticeVoiceExtension", "parser.getText() :" + xmlPullParser.getText());
try {
String text = xmlPullParser.getText();
this.f4231c = text;
if ("success".equals(text)) {
this.f4232d = true;
} else {
this.f4233e = Long.parseLong(this.f4231c);
}
} catch (Exception e2) {
Log.e("MessageNoticeVoiceExtension", "Exception :", e2);
}
}
public c2() {
super("pushsoundswitch", "http://akey.im/protocol/xmpp/iq/userprop#setpushsoundswitch");
}
}