CarrotChat v2.8.80.240429版本的 MD5 值为:fdf98761f01e715a89df24b85b0d206e
以下内容为反编译后的 c2.java 源代码,内容仅作参考
package y0;
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 f48106a;
private String f48107b;
private String f48108c;
private boolean f48109d;
private long f48110e;
boolean f48111f;
public static class a extends IQProvider {
@Override
public IQ parse(XmlPullParser xmlPullParser, int i10) throws Exception {
c2 c2Var = new c2();
Log.i("MessageNoticeVoiceExtension", "parset :" + xmlPullParser.toString());
boolean z10 = false;
while (!z10) {
int next = xmlPullParser.next();
if (next == 4) {
c2Var.parseResults(xmlPullParser);
} else if (next == 3 && xmlPullParser.getName().equals("pushsoundswitch")) {
z10 = true;
}
}
return c2Var;
}
}
public c2(String str, String str2) {
super("pushsoundswitch", "http://akey.im/protocol/xmpp/iq/userprop#setpushsoundswitch");
this.f48106a = str;
this.f48111f = true;
this.f48107b = str2;
setType(IQ.Type.set);
setTo(ak.im.sdk.manager.f1.getInstance().getServer().getXmppDomain());
setFrom(this.f48106a);
}
@Override
protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder iQChildElementXmlStringBuilder) {
iQChildElementXmlStringBuilder.append(">");
if (this.f48111f) {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("pushsoundswitch", this.f48107b);
} catch (JSONException e10) {
e10.printStackTrace();
}
iQChildElementXmlStringBuilder.optElement(HiAnalyticsConstant.Direction.REQUEST, jSONObject.toString());
}
return iQChildElementXmlStringBuilder;
}
public long getVersionCode() {
return this.f48110e;
}
public String getmSetResult() {
return this.f48108c;
}
public boolean isSuccess() {
return this.f48109d;
}
protected void parseResults(XmlPullParser xmlPullParser) {
Log.d("MessageNoticeVoiceExtension", "parser.getText() :" + xmlPullParser.getText());
try {
String text = xmlPullParser.getText();
this.f48108c = text;
if ("success".equals(text)) {
this.f48109d = true;
} else {
this.f48110e = Long.parseLong(this.f48108c);
}
} catch (Exception e10) {
Log.e("MessageNoticeVoiceExtension", "Exception :", e10);
}
}
public c2() {
super("pushsoundswitch", "http://akey.im/protocol/xmpp/iq/userprop#setpushsoundswitch");
}
}