CarrotChat v2.8.60.240131版本的 MD5 值为:2baf8b9f31830b86b5c5a85ae6b47e05
以下内容为反编译后的 v4.java 源代码,内容仅作参考
package ak.smack;
import ak.im.module.User;
import ak.im.sdk.manager.nf;
import ak.im.sdk.manager.ye;
import ak.im.utils.Log;
import com.asim.protobuf.Akeychat;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.provider.IQProvider;
import org.xmlpull.v1.XmlPullParser;
public class v4 extends IQ {
private final String a;
private Map<String, User> f4739b;
private ArrayList<String> f4740c;
public static class a extends IQProvider {
private final String a = "QueryUserIQ.Provider";
@Override
public IQ parse(XmlPullParser xmlPullParser, int i) throws Exception {
v4 v4Var = new v4();
Log.i("QueryUserIQ.Provider", "start parse io result in vcard");
boolean z = false;
while (!z) {
int next = xmlPullParser.next();
if (next == 4) {
v4Var.parseResults(xmlPullParser);
} else if (next == 3 && xmlPullParser.getName().equals("getfriends")) {
z = true;
}
}
return v4Var;
}
}
public v4(ArrayList<String> arrayList) {
super("getfriends", "http://akey.im/protocol/xmpp/iq/getfriends");
this.a = "QueryUserIQ";
this.f4739b = new HashMap();
setType(IQ.Type.get);
setTo(ye.getInstance().getServer().getXmppDomain());
setFrom(ye.getInstance().getUsername() + "@" + ye.getInstance().getServer().getXmppDomain());
this.f4740c = arrayList;
}
@Override
protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder iQChildElementXmlStringBuilder) {
iQChildElementXmlStringBuilder.append(">");
if (this.f4740c != null) {
Akeychat.FriendsGetRequest.b newBuilder = Akeychat.FriendsGetRequest.newBuilder();
newBuilder.addAllUsername(this.f4740c);
iQChildElementXmlStringBuilder.optElement(HiAnalyticsConstant.Direction.REQUEST, ak.comm.d.encodeBytes(newBuilder.build().toByteArray()));
}
return iQChildElementXmlStringBuilder;
}
public User getUser(String str) {
return this.f4739b.get(str);
}
public Map<String, User> getmUserMap() {
return this.f4739b;
}
protected void parseResults(XmlPullParser xmlPullParser) throws Exception {
Log.w("QueryUserIQ", "start parse result in vcard");
for (Akeychat.UserPublicSyncResponse userPublicSyncResponse : Akeychat.FriendsGetResponse.parseFrom(ak.comm.d.decode(xmlPullParser.getText())).getFriendsList()) {
User generateAFriend = nf.getInstance().generateAFriend(userPublicSyncResponse);
if (generateAFriend != null) {
this.f4739b.put(generateAFriend.getName(), generateAFriend);
}
}
Log.w("QueryUserIQ", "end parse result in vcard");
}
public v4() {
super("getfriends", "http://akey.im/protocol/xmpp/iq/getfriends");
this.a = "QueryUserIQ";
this.f4739b = new HashMap();
}
}