CarrotChat v2.8.80.240429版本的 MD5 值为:fdf98761f01e715a89df24b85b0d206e
以下内容为反编译后的 w4.java 源代码,内容仅作参考
package y0;
import ak.im.sdk.manager.bf;
import ak.im.utils.Log;
import android.text.TextUtils;
import com.asim.protobuf.Akeychat;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.provider.IQProvider;
import org.jxmpp.jid.impl.JidCreate;
import org.jxmpp.stringprep.XmppStringprepException;
import org.xmlpull.v1.XmlPullParser;
public class w4 extends IQ {
private boolean f48978a;
private Akeychat.FriendE2EKeyBundleQueryResponse f48979b;
private String f48980c;
String f48981d;
String f48982e;
public static class a extends IQProvider {
@Override
public IQ parse(XmlPullParser xmlPullParser, int i10) throws Exception {
w4 w4Var = new w4();
boolean z10 = false;
while (!z10) {
int next = xmlPullParser.next();
if (next == 4) {
w4Var.parseResults(xmlPullParser);
} else if (next == 3 && xmlPullParser.getName().equals("friendkeysbundlequery")) {
z10 = true;
}
}
return w4Var;
}
}
public w4(String str) {
super("friendkeysbundlequery", "http://akey.im/protocol/xmpp/iq/friendkeysbundlequery");
setType(IQ.Type.get);
try {
setTo(JidCreate.from(ak.im.sdk.manager.f1.getInstance().getServer().getXmppDomain()));
setFrom(JidCreate.from(bf.getInstance().getUserMe().getJID()));
} catch (XmppStringprepException e10) {
e10.printStackTrace();
}
if (ak.im.utils.q5.isContainsSplicer(str)) {
Log.i("QueryUGKeyBundleIQ", "# username is " + str);
String[] split = str.split("#");
Akeychat.ServerSyncResponseV2 serverById = ak.im.sdk.manager.f1.getInstance().getServerById(split[1]);
if (serverById != null) {
this.f48981d = split[0];
this.f48982e = serverById.getDomain();
} else {
this.f48981d = "";
Log.i("QueryUGKeyBundleIQ", "serverById is null");
}
} else {
this.f48981d = str;
}
this.f48978a = true;
}
@Override
protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder iQChildElementXmlStringBuilder) {
iQChildElementXmlStringBuilder.append(">");
if (!this.f48978a) {
String str = this.f48980c;
if (str != null) {
iQChildElementXmlStringBuilder.optElement("result", str);
}
} else {
Akeychat.FriendE2EKeyBundleQueryRequest.b newBuilder = Akeychat.FriendE2EKeyBundleQueryRequest.newBuilder();
newBuilder.setUsername(this.f48981d);
if (!TextUtils.isEmpty(this.f48982e)) {
newBuilder.setDomain(this.f48982e);
}
iQChildElementXmlStringBuilder.optElement(HiAnalyticsConstant.Direction.REQUEST, e.e.encodeBytes(newBuilder.build().toByteArray()));
}
return iQChildElementXmlStringBuilder;
}
public Akeychat.FriendE2EKeyBundleQueryResponse getProtoResponse() {
return this.f48979b;
}
protected void parseResults(XmlPullParser xmlPullParser) throws Exception {
try {
String text = xmlPullParser.getText();
this.f48980c = text;
this.f48979b = Akeychat.FriendE2EKeyBundleQueryResponse.parseFrom(e.e.decode(text));
} catch (Exception e10) {
e10.printStackTrace();
Log.w("QueryUGKeyBundleIQ", "encounter excp in parse results" + e10.getMessage());
}
}
public w4() {
super("friendkeysbundlequery", "http://akey.im/protocol/xmpp/iq/friendkeysbundlequery");
setType(IQ.Type.get);
this.f48978a = false;
}
}