思特奇智慧酒店云平台 v0.0.5版本的 MD5 值为:dedb172bb322639d79d7e0e26262fb5c
以下内容为反编译后的 NetInterface.java 源代码,内容仅作参考
package com.sitech.oncon.api.core.im.network;
import android.content.Context;
import android.os.Build;
import android.text.TextUtils;
import androidx.core.app.NotificationManagerCompat;
import com.baidu.platform.comapi.map.MapBundleKey;
import com.huawei.hms.push.constant.RemoteMessageConst;
import com.sitech.core.util.Log;
import com.sitech.oncon.api.ChatNodisturb;
import com.sitech.oncon.api.ChatTop;
import com.sitech.oncon.api.SIXmppAccout;
import com.sitech.oncon.api.SIXmppGroupInfo;
import com.sitech.oncon.api.SIXmppGroupJoinInfo;
import com.sitech.oncon.api.SIXmppMessage;
import com.sitech.oncon.api.SIXmppThreadInfo;
import com.sitech.oncon.api.core.im.core.IMConfig;
import com.sitech.oncon.api.core.im.core.OnconIMCore;
import com.sitech.oncon.api.core.im.core.UserNetInfo;
import com.sitech.oncon.api.core.im.data.IMDataDBHelper;
import com.sitech.oncon.api.core.im.manager.ConnectionManager;
import com.sitech.oncon.api.core.im.manager.MsgManager;
import com.sitech.oncon.api.core.util.network.StringUtils;
import com.sitech.oncon.api.util.CTelephoneInfo;
import com.taobao.weex.el.parse.Operators;
import com.taobao.weex.ui.component.AbstractEditComponent;
import com.taobao.weex.ui.component.list.template.CellDataManager;
import com.umeng.analytics.AnalyticsConfig;
import com.umeng.analytics.pro.am;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Random;
import org.jivesoftware.smackx.jingle.element.JingleContent;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class NetInterface {
public static final String ENCODE = "UTF-8";
public static final String ROLE_ADMIN = "admin";
public static final String ROLE_MEMBER = "member";
public static final String ROLE_OUTCAST = "outcast";
public static final String ROLE_OWNER = "owner";
public static String common_https = "https://jk.teamshub.com/oncon-service/app_credential/${NAME}/${VERSION}?issecurity=${SECURITY}&access_token=";
public static String report_https = "https://jk.teamshub.com/oncon-service/app_credential/${NAME}/${VERSION}?issecurity=${SECURITY}&access_token=";
public Context context;
public vi0 httpPost;
public mm1 netIF;
public static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
public static String version = "1.0";
public static String version2 = "2.0";
public static String version3 = "3.0";
public static String version4 = "4.0";
public static String CHATROOM_QUERY_VERSION = version;
public static String CHATROOM_MEMBERS_QUERY2_VERSION = version3;
public enum STATUS {
SUCCESS,
FAILED,
WITHOUT_PERMISSION
}
public NetInterface() {
this.httpPost = new vi0();
this.context = OnconIMCore.getInstance().getContext();
this.netIF = new mm1(this.context);
}
private IMConfig.Ntfyopen getNtfyOpen() {
return NotificationManagerCompat.from(this.context).areNotificationsEnabled() ? IMConfig.Ntfyopen.OPEN : IMConfig.Ntfyopen.CLOSE;
}
public static String urlReplaceWithApp(String str, String str2, String str3) {
return !TextUtils.isEmpty(str) ? str.replace("${NAME}", str2).replace("${VERSION}", am.aE.concat(str3)).replace("${SECURITY}", "true").concat("B0q9Mon934TYmffcw9b1FFEJv3E7D3JS") : "";
}
public hn1 chat_top_opt(ChatTop chatTop) {
hn1 hn1Var = new hn1();
hn1Var.b("1");
try {
JSONObject g = this.netIF.g("1.0", "chat_top_opt");
g.put("optUser", chatTop.optUser);
g.put("relChatId", chatTop.relChatId);
g.put("optType", chatTop.optType);
g.put("appId", this.context.getPackageName());
return this.netIF.b(common_https, "chat_top_opt", "1.0", g);
} catch (Exception e) {
Log.a((Throwable) e);
return hn1Var;
}
}
public STATUS chatroom_all_members(String str, ArrayList<SIXmppGroupInfo> arrayList) {
JSONObject jSONObject;
ArrayList<SIXmppGroupInfo> arrayList2;
if (str == null) {
return STATUS.FAILED;
}
try {
jSONObject = new JSONObject();
jSONObject.put("version", version);
jSONObject.put("id", getRandomNumber());
jSONObject.put("type", "m1_chatroom_all_members");
jSONObject.put("action", "request");
jSONObject.put("userJID", str);
jSONObject.put("queryextend", "1");
} catch (Exception e) {
e = e;
}
try {
String a = this.netIF.a(common_https, "m1_chatroom_all_members", version, jSONObject);
if (TextUtils.isEmpty(a)) {
return STATUS.FAILED;
}
JSONObject jSONObject2 = new JSONObject(a);
if ("0".equals(jSONObject2.has("status") ? jSONObject2.getString("status") : "")) {
if (arrayList == null) {
arrayList2 = new ArrayList<>();
} else {
arrayList.clear();
arrayList2 = arrayList;
}
if (jSONObject2.has("roomlist")) {
JSONArray jSONArray = jSONObject2.getJSONArray("roomlist");
int i = 0;
while (i < jSONArray.length()) {
JSONObject jSONObject3 = jSONArray.getJSONObject(i);
JSONArray jSONArray2 = jSONArray;
SIXmppGroupInfo sIXmppGroupInfo = new SIXmppGroupInfo();
sIXmppGroupInfo.groupid = jSONObject3.getString("roomJID").split(CellDataManager.VIRTUAL_COMPONENT_SEPRATOR)[0];
sIXmppGroupInfo.thdappid = jSONObject3.has(IMDataDBHelper.IM_GROUP_THDAPPID) ? jSONObject3.getString(IMDataDBHelper.IM_GROUP_THDAPPID) : "";
sIXmppGroupInfo.thdroomid = jSONObject3.has(IMDataDBHelper.IM_GROUP_THDROOMID) ? jSONObject3.getString(IMDataDBHelper.IM_GROUP_THDROOMID) : "";
sIXmppGroupInfo.dep_id = jSONObject3.has(IMDataDBHelper.IM_GROUP_DEPID) ? jSONObject3.getString(IMDataDBHelper.IM_GROUP_DEPID) : "";
sIXmppGroupInfo.wspace_url = jSONObject3.has(IMDataDBHelper.IM_GROUP_WSPACEURL) ? jSONObject3.getString(IMDataDBHelper.IM_GROUP_WSPACEURL) : "";
sIXmppGroupInfo.mspace_url = jSONObject3.has(IMDataDBHelper.IM_GROUP_MSPACEURL) ? jSONObject3.getString(IMDataDBHelper.IM_GROUP_MSPACEURL) : "";
sIXmppGroupInfo.wspaceUrl = jSONObject3.has(IMDataDBHelper.IM_GROUP_WspaceUrl) ? jSONObject3.getString(IMDataDBHelper.IM_GROUP_WspaceUrl) : "";
sIXmppGroupInfo.mspaceUrl = jSONObject3.has(IMDataDBHelper.IM_GROUP_MspaceUrl) ? jSONObject3.getString(IMDataDBHelper.IM_GROUP_MspaceUrl) : "";
sIXmppGroupInfo.name = jSONObject3.has("subjectname") ? jSONObject3.getString("subjectname") : "";
sIXmppGroupInfo.roomtype = jSONObject3.has("roomtype") ? jSONObject3.getString("roomtype") : "";
sIXmppGroupInfo.enterCode = jSONObject3.has("enterCode") ? jSONObject3.getString("enterCode") : "";
if (jSONObject3.has("memberlist")) {
sIXmppGroupInfo.parseMemberlistFromJson(jSONObject3.getJSONArray("memberlist"));
}
arrayList2.add(sIXmppGroupInfo);
i++;
jSONArray = jSONArray2;
}
if (jSONObject2.has("roomextend")) {
JSONArray jSONArray3 = jSONObject2.getJSONArray("roomextend");
for (int i2 = 0; i2 < jSONArray3.length(); i2++) {
int i3 = 0;
while (true) {
if (i3 < arrayList2.size()) {
JSONObject jSONObject4 = jSONArray3.getJSONObject(i2);
SIXmppGroupInfo sIXmppGroupInfo2 = arrayList2.get(i3);
if (jSONObject4.getString("roomJID").split(CellDataManager.VIRTUAL_COMPONENT_SEPRATOR)[0].equals(arrayList2.get(i3).groupid)) {
sIXmppGroupInfo2.biztype = jSONObject4.has(IMDataDBHelper.IM_GROUP_BIZTYPE) ? jSONObject4.getString(IMDataDBHelper.IM_GROUP_BIZTYPE) : "";
sIXmppGroupInfo2.bizcode = jSONObject4.has(IMDataDBHelper.IM_GROUP_BIZCODE) ? jSONObject4.getString(IMDataDBHelper.IM_GROUP_BIZCODE) : "";
} else {
i3++;
}
}
}
}
}
}
return STATUS.SUCCESS;
}
return STATUS.FAILED;
} catch (Exception e2) {
e = e2;
Log.a((Throwable) e);
return STATUS.FAILED;
}
}
public hn1 chatroom_leave(String str, String str2, String str3) {
hn1 hn1Var = new hn1();
hn1Var.b("1");
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("version", version);
jSONObject.put("id", getRandomNumber());
jSONObject.put("type", "m1_chatroom_leave");
jSONObject.put("action", "request");
jSONObject.put("roomJID", str + CellDataManager.VIRTUAL_COMPONENT_SEPRATOR + SIXmppAccout.conferenceDomain);
jSONObject.put("userJID", str2);
jSONObject.put("memberJID", str3);
jSONObject.put("sysflag", true);
String a = this.netIF.a(common_https, "m1_chatroom_leave", version, jSONObject);
if (!TextUtils.isEmpty(a)) {
JSONObject jSONObject2 = new JSONObject(a);
if (jSONObject2.has("status") && !jSONObject2.isNull("status")) {
hn1Var.b(jSONObject2.getString("status"));
}
if (jSONObject2.has("desc") && !jSONObject2.isNull("desc")) {
hn1Var.a(jSONObject2.getString("desc"));
}
}
} catch (Exception e) {
Log.a((Throwable) e);
}
return hn1Var;
}
public hn1 chatroom_member_add(String str, String str2, ArrayList<String> arrayList, ArrayList<String> arrayList2, ArrayList<String> arrayList3) {
hn1 hn1Var = new hn1();
hn1Var.b("1");
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("version", version);
jSONObject.put("id", getRandomNumber());
jSONObject.put("type", "m1_chatroom_member_add");
jSONObject.put("action", "request");
jSONObject.put("roomJID", str + CellDataManager.VIRTUAL_COMPONENT_SEPRATOR + SIXmppAccout.conferenceDomain);
jSONObject.put("userJID", str2);
jSONObject.put("sysflag", true);
JSONArray jSONArray = new JSONArray();
for (int i = 0; i < arrayList.size(); i++) {
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("memberJID", arrayList.get(i));
jSONObject2.put("role", arrayList2.get(i));
if (!TextUtils.isEmpty(arrayList3.get(i))) {
jSONObject2.put("enterCode", arrayList3.get(i));
}
jSONArray.put(jSONObject2);
}
jSONObject.put("memberlist", jSONArray);
String a = this.netIF.a(common_https, "m1_chatroom_member_add", version, jSONObject);
if (!TextUtils.isEmpty(a)) {
JSONObject jSONObject3 = new JSONObject(a);
hn1Var.b(jSONObject3.has("status") ? jSONObject3.getString("status") : "1");
hn1Var.a(jSONObject3.has("desc") ? jSONObject3.getString("desc") : "");
}
} catch (Exception unused) {
}
return hn1Var;
}
public STATUS chatroom_members_query2(String str, SIXmppGroupInfo sIXmppGroupInfo, int i, int i2, String str2) {
if (sIXmppGroupInfo == null) {
return STATUS.FAILED;
}
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("version", CHATROOM_MEMBERS_QUERY2_VERSION);
jSONObject.put("id", getRandomNumber());
jSONObject.put("type", "m1_chatroom_members_query");
jSONObject.put("action", "request");
jSONObject.put("roomJID", str + CellDataManager.VIRTUAL_COMPONENT_SEPRATOR + SIXmppAccout.conferenceDomain);
StringBuilder sb = new StringBuilder();
sb.append("");
sb.append(i);
jSONObject.put("start_page", sb.toString());
jSONObject.put("count", "" + i2);
jSONObject.put("queryextend", str2);
String a = this.netIF.a(common_https, "m1_chatroom_members_query", CHATROOM_MEMBERS_QUERY2_VERSION, jSONObject);
if (TextUtils.isEmpty(a)) {
return STATUS.FAILED;
}
JSONObject jSONObject2 = new JSONObject(a);
if ("0".equals(jSONObject2.getString("status"))) {
sIXmppGroupInfo.parseMemberlistFromJson(jSONObject2.getJSONArray("memberlist"));
if (jSONObject2.has("roominfo")) {
JSONObject jSONObject3 = jSONObject2.getJSONObject("roominfo");
sIXmppGroupInfo.name = jSONObject3.has("subjectname") ? jSONObject3.getString("subjectname") : "";
sIXmppGroupInfo.enterCode = jSONObject3.optString("enterCode");
sIXmppGroupInfo.groupid = jSONObject3.has("roomJID") ? jSONObject3.getString("roomJID") : str;
sIXmppGroupInfo.roomtype = jSONObject3.has("roomtype") ? jSONObject3.getString("roomtype") : "";
sIXmppGroupInfo.thdroomid = jSONObject3.has(IMDataDBHelper.IM_GROUP_THDROOMID) ? jSONObject3.getString(IMDataDBHelper.IM_GROUP_THDROOMID) : "";
sIXmppGroupInfo.dep_id = jSONObject3.has(IMDataDBHelper.IM_GROUP_DEPID) ? jSONObject3.getString(IMDataDBHelper.IM_GROUP_DEPID) : "";
sIXmppGroupInfo.thdappid = jSONObject3.has(IMDataDBHelper.IM_GROUP_THDAPPID) ? jSONObject3.getString(IMDataDBHelper.IM_GROUP_THDAPPID) : "";
sIXmppGroupInfo.mspace_url = jSONObject3.has(IMDataDBHelper.IM_GROUP_MSPACEURL) ? jSONObject3.getString(IMDataDBHelper.IM_GROUP_MSPACEURL) : "";
sIXmppGroupInfo.mspaceUrl = jSONObject3.has(IMDataDBHelper.IM_GROUP_MspaceUrl) ? jSONObject3.getString(IMDataDBHelper.IM_GROUP_MspaceUrl) : "";
sIXmppGroupInfo.wspace_url = jSONObject3.has(IMDataDBHelper.IM_GROUP_WSPACEURL) ? jSONObject3.getString(IMDataDBHelper.IM_GROUP_WSPACEURL) : "";
sIXmppGroupInfo.wspaceUrl = jSONObject3.has(IMDataDBHelper.IM_GROUP_WspaceUrl) ? jSONObject3.getString(IMDataDBHelper.IM_GROUP_WspaceUrl) : "";
sIXmppGroupInfo.biztype = jSONObject3.has(IMDataDBHelper.IM_GROUP_BIZTYPE) ? jSONObject3.getString(IMDataDBHelper.IM_GROUP_BIZTYPE) : "";
sIXmppGroupInfo.bizcode = jSONObject3.has(IMDataDBHelper.IM_GROUP_BIZCODE) ? jSONObject3.getString(IMDataDBHelper.IM_GROUP_BIZCODE) : "";
}
return STATUS.SUCCESS;
}
return STATUS.FAILED;
} catch (Exception e) {
Log.a((Throwable) e);
return STATUS.FAILED;
}
}
public STATUS chatroom_query(String str, ArrayList<SIXmppGroupInfo> arrayList) {
JSONObject jSONObject;
ArrayList<SIXmppGroupInfo> arrayList2;
if (str == null) {
return STATUS.FAILED;
}
try {
jSONObject = new JSONObject();
jSONObject.put("version", CHATROOM_QUERY_VERSION);
jSONObject.put("id", getRandomNumber());
jSONObject.put("type", "m1_chatroom_query");
jSONObject.put("action", "request");
jSONObject.put("userJID", str);
jSONObject.put("queryextend", "1");
} catch (Exception e) {
e = e;
}
try {
String a = this.netIF.a(common_https, "m1_chatroom_query", CHATROOM_QUERY_VERSION, jSONObject);
if (TextUtils.isEmpty(a)) {
return STATUS.FAILED;
}
JSONObject jSONObject2 = new JSONObject(a);
if (jSONObject2.has("status") && "0".equals(jSONObject2.getString("status")) && jSONObject2.has("roomlist")) {
if (arrayList == null) {
arrayList2 = new ArrayList<>();
} else {
arrayList.clear();
arrayList2 = arrayList;
}
JSONArray jSONArray = jSONObject2.getJSONArray("roomlist");
int i = 0;
while (true) {
String str2 = "";
if (i >= jSONArray.length()) {
break;
}
JSONObject jSONObject3 = jSONArray.getJSONObject(i);
SIXmppGroupInfo sIXmppGroupInfo = new SIXmppGroupInfo();
sIXmppGroupInfo.groupid = jSONObject3.getString("roomJID").split(CellDataManager.VIRTUAL_COMPONENT_SEPRATOR)[0];
sIXmppGroupInfo.thdappid = jSONObject3.has(IMDataDBHelper.IM_GROUP_THDAPPID) ? jSONObject3.getString(IMDataDBHelper.IM_GROUP_THDAPPID) : "";
sIXmppGroupInfo.thdroomid = jSONObject3.has(IMDataDBHelper.IM_GROUP_THDROOMID) ? jSONObject3.getString(IMDataDBHelper.IM_GROUP_THDROOMID) : "";
sIXmppGroupInfo.dep_id = jSONObject3.has(IMDataDBHelper.IM_GROUP_DEPID) ? jSONObject3.getString(IMDataDBHelper.IM_GROUP_DEPID) : "";
sIXmppGroupInfo.wspace_url = jSONObject3.has(IMDataDBHelper.IM_GROUP_WSPACEURL) ? jSONObject3.getString(IMDataDBHelper.IM_GROUP_WSPACEURL) : "";
sIXmppGroupInfo.mspace_url = jSONObject3.has(IMDataDBHelper.IM_GROUP_MSPACEURL) ? jSONObject3.getString(IMDataDBHelper.IM_GROUP_MSPACEURL) : "";
sIXmppGroupInfo.wspaceUrl = jSONObject3.has(IMDataDBHelper.IM_GROUP_WspaceUrl) ? jSONObject3.getString(IMDataDBHelper.IM_GROUP_WspaceUrl) : "";
sIXmppGroupInfo.mspaceUrl = jSONObject3.has(IMDataDBHelper.IM_GROUP_MspaceUrl) ? jSONObject3.getString(IMDataDBHelper.IM_GROUP_MspaceUrl) : "";
sIXmppGroupInfo.name = jSONObject3.has("subjectname") ? jSONObject3.getString("subjectname") : "";
sIXmppGroupInfo.roomtype = jSONObject3.has("roomtype") ? jSONObject3.getString("roomtype") : "";
if (jSONObject3.has("enterCode")) {
str2 = jSONObject3.getString("enterCode");
}
sIXmppGroupInfo.enterCode = str2;
arrayList2.add(sIXmppGroupInfo);
i++;
}
if (jSONObject2.has("roomextend")) {
JSONArray jSONArray2 = jSONObject2.getJSONArray("roomextend");
for (int i2 = 0; i2 < jSONArray2.length(); i2++) {
int i3 = 0;
while (true) {
if (i3 < arrayList2.size()) {
JSONObject jSONObject4 = jSONArray2.getJSONObject(i2);
SIXmppGroupInfo sIXmppGroupInfo2 = arrayList2.get(i3);
if (jSONObject4.getString("roomJID").split(CellDataManager.VIRTUAL_COMPONENT_SEPRATOR)[0].equals(arrayList2.get(i3).groupid)) {
sIXmppGroupInfo2.biztype = jSONObject4.has(IMDataDBHelper.IM_GROUP_BIZTYPE) ? jSONObject4.getString(IMDataDBHelper.IM_GROUP_BIZTYPE) : "";
sIXmppGroupInfo2.bizcode = jSONObject4.has(IMDataDBHelper.IM_GROUP_BIZCODE) ? jSONObject4.getString(IMDataDBHelper.IM_GROUP_BIZCODE) : "";
} else {
i3++;
}
}
}
}
}
return STATUS.SUCCESS;
}
return STATUS.FAILED;
} catch (Exception e2) {
e = e2;
Log.a((Throwable) e);
return STATUS.FAILED;
}
}
public String check_chatroom_role(String str, String str2) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("version", version);
jSONObject.put("id", getRandomNumber());
jSONObject.put("type", "check_chatroom_role");
jSONObject.put("action", "request");
jSONObject.put(bk0.x9, str2);
jSONObject.put("roomId", str);
JSONObject jSONObject2 = new JSONObject(this.netIF.a(common_https, "check_chatroom_role", version, jSONObject));
return "0".equals(jSONObject2.getString("status")) ? jSONObject2.getString("role") : "";
} catch (Exception unused) {
return "";
}
}
public void close() {
}
public String getRandomNumber() {
return (new Random().nextInt(899999) + 100000) + "";
}
public hn1 get_chattop_list(String str) {
hn1 hn1Var = new hn1();
hn1Var.b("1");
try {
JSONObject g = this.netIF.g("1.0", "get_chattop_list");
g.put(bk0.x9, str);
g.put("appId", this.context.getPackageName());
hn1Var = this.netIF.b(common_https, "get_chattop_list", "1.0", g);
if (hn1Var.j() && (hn1Var.e() instanceof JSONObject) && ((JSONObject) hn1Var.e()).has("data") && !((JSONObject) hn1Var.e()).isNull("data")) {
JSONObject jSONObject = ((JSONObject) hn1Var.e()).getJSONObject("data");
if (jSONObject.has("list") && !jSONObject.isNull("list")) {
JSONArray jSONArray = jSONObject.getJSONArray("list");
ArrayList arrayList = new ArrayList();
for (int i = 0; i < jSONArray.length(); i++) {
JSONObject jSONObject2 = jSONArray.getJSONObject(i);
ChatTop chatTop = new ChatTop();
chatTop.parseFromJson(jSONObject2);
arrayList.add(chatTop);
}
hn1Var.a(arrayList);
}
}
} catch (Exception e) {
Log.a((Throwable) e);
}
return hn1Var;
}
@Deprecated
public hn1 get_group_msg(String str, SIXmppMessage sIXmppMessage) {
hn1 hn1Var = new hn1();
hn1Var.b("1");
try {
JSONObject g = this.netIF.g("1.0", "get_group_msg");
g.put(bk0.x9, str);
g.put("groupId", sIXmppMessage.to);
g.put(RemoteMessageConst.MSGID, sIXmppMessage.f115id);
return this.netIF.b(common_https, "get_group_msg", "1.0", g, 5000);
} catch (Exception e) {
Log.a((Throwable) e);
return hn1Var;
}
}
public ArrayList<String> get_msg_status() {
ArrayList<String> arrayList = new ArrayList<>();
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("version", "1.0");
jSONObject.put("id", getRandomNumber());
jSONObject.put("type", "get_msg_status");
jSONObject.put("action", "request");
jSONObject.put(bk0.x9, ConnectionManager.getInstance().getUsername());
jSONObject.put("lastQueryTime", MsgManager.getInstance().getMsgStatusLastQryTime());
String a = this.netIF.a(common_https, "get_msg_status", version, jSONObject);
if (!TextUtils.isEmpty(a)) {
JSONObject jSONObject2 = new JSONObject(a);
if (jSONObject2.has("data") && !jSONObject2.isNull("data") && jSONObject2.getJSONArray("data").length() > 0) {
JSONArray jSONArray = jSONObject2.getJSONArray("data");
int length = jSONArray.length();
for (int i = 0; i < length; i++) {
arrayList.add(jSONArray.getString(i));
}
}
if (jSONObject2.has("queryTime") && !jSONObject2.isNull("queryTime")) {
MsgManager.getInstance().setMsgStatusLastQryTime(jSONObject2.getString("queryTime"));
}
}
} catch (Exception e) {
Log.a((Throwable) e);
}
return arrayList;
}
@Deprecated
public hn1 get_p2p_msg(String str, SIXmppMessage sIXmppMessage) {
hn1 hn1Var = new hn1();
hn1Var.b("1");
try {
JSONObject g = this.netIF.g("1.0", "get_p2p_msg");
g.put(bk0.x9, str);
g.put("relator", sIXmppMessage.to);
g.put(RemoteMessageConst.MSGID, sIXmppMessage.f115id);
return this.netIF.b(common_https, "get_p2p_msg", "1.0", g, 5000);
} catch (Exception e) {
Log.a((Throwable) e);
return hn1Var;
}
}
public hn1 group_add(SIXmppGroupInfo sIXmppGroupInfo, String str, String str2) {
hn1 hn1Var = new hn1();
hn1Var.b("1");
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("version", "2.0");
jSONObject.put("id", getRandomNumber());
jSONObject.put("type", "m1_group_add");
jSONObject.put("action", "request");
jSONObject.put("subject", sIXmppGroupInfo.name);
jSONObject.put(MapBundleKey.OfflineMapKey.OFFLINE_TOTAL_SIZE, sIXmppGroupInfo.size + "");
if (!TextUtils.isEmpty(sIXmppGroupInfo.category)) {
jSONObject.put("category", sIXmppGroupInfo.category);
}
if (!TextUtils.isEmpty(sIXmppGroupInfo.place)) {
jSONObject.put("place", sIXmppGroupInfo.place);
}
jSONObject.put(MapBundleKey.MapObjKey.OBJ_GEO, sIXmppGroupInfo.geo);
jSONObject.put("introduct", sIXmppGroupInfo.introduct);
jSONObject.put(JingleContent.CREATOR_ATTRIBUTE_NAME, sIXmppGroupInfo.creator);
jSONObject.put("appid", str);
if (!TextUtils.isEmpty(sIXmppGroupInfo.sys_target)) {
jSONObject.put("sys_target", sIXmppGroupInfo.sys_target);
}
jSONObject.put("sys_flag", true);
jSONObject.put("roomtype", sIXmppGroupInfo.roomtype);
if (!TextUtils.isEmpty(sIXmppGroupInfo.enterCode)) {
jSONObject.put("enterCode", sIXmppGroupInfo.enterCode);
}
JSONObject jSONObject2 = new JSONObject(this.netIF.a(common_https, "m1_group_add", "2.0", jSONObject));
if (jSONObject2.has("groupId")) {
String string = jSONObject2.getString("groupId");
hn1Var.b("0");
hn1Var.a((Object) string);
} else {
String string2 = jSONObject2.has("desc") ? jSONObject2.getString("desc") : "";
hn1Var.b(jSONObject2.has("status") ? jSONObject2.getString("status") : "1");
hn1Var.a(string2);
}
} catch (Exception e) {
Log.a((Throwable) e);
}
return hn1Var;
}
public int group_audit(SIXmppGroupJoinInfo sIXmppGroupJoinInfo) {
int i = 1;
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("version", version);
jSONObject.put("id", getRandomNumber());
jSONObject.put("type", "m1_group_audit");
jSONObject.put("action", "request");
jSONObject.put("groupId", sIXmppGroupJoinInfo.groupId);
jSONObject.put("joiner", sIXmppGroupJoinInfo.joiner);
jSONObject.put("auditor", sIXmppGroupJoinInfo.auditor);
jSONObject.put("operateType", sIXmppGroupJoinInfo.operateType);
jSONObject.put("rejectReason", StringUtils.repNull(sIXmppGroupJoinInfo.rejectReason));
jSONObject.put("blacklist", sIXmppGroupJoinInfo.blacklist + "");
JSONObject jSONObject2 = new JSONObject(this.netIF.a(common_https, "m1_group_audit", version, jSONObject));
if (jSONObject2.has("status")) {
i = jSONObject2.getInt("status");
sIXmppGroupJoinInfo.resultMsg = jSONObject2.has("desc") ? jSONObject2.getString("desc") : "";
}
} catch (Exception e) {
Log.a((Throwable) e);
}
return i;
}
public int group_edit(SIXmppGroupInfo sIXmppGroupInfo) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("version", version);
jSONObject.put("id", getRandomNumber());
jSONObject.put("type", "m1_group_edit");
jSONObject.put("action", "request");
jSONObject.put("groupId", sIXmppGroupInfo.groupid);
jSONObject.put("subject", sIXmppGroupInfo.name);
jSONObject.put(MapBundleKey.OfflineMapKey.OFFLINE_TOTAL_SIZE, sIXmppGroupInfo.size + "");
jSONObject.put("category", sIXmppGroupInfo.category);
jSONObject.put("place", sIXmppGroupInfo.place);
jSONObject.put(MapBundleKey.MapObjKey.OBJ_GEO, sIXmppGroupInfo.geo);
jSONObject.put("introduct", sIXmppGroupInfo.introduct);
jSONObject.put("editor", sIXmppGroupInfo.editor);
JSONObject jSONObject2 = new JSONObject(this.netIF.a(common_https, "m1_group_edit", version, jSONObject));
if (jSONObject2.has("status")) {
return jSONObject2.getInt("status");
}
return 1;
} catch (Exception e) {
Log.a((Throwable) e);
return 1;
}
}
public int group_join(SIXmppGroupJoinInfo sIXmppGroupJoinInfo) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("version", version);
jSONObject.put("id", getRandomNumber());
jSONObject.put("type", "m1_group_join");
jSONObject.put("action", "request");
jSONObject.put("groupId", sIXmppGroupJoinInfo.groupId);
jSONObject.put("joiner", sIXmppGroupJoinInfo.joiner);
jSONObject.put("joinReason", sIXmppGroupJoinInfo.joinReason);
JSONObject jSONObject2 = new JSONObject(this.netIF.a(common_https, "m1_group_join", version, jSONObject));
if (jSONObject2.has("status")) {
return jSONObject2.getInt("status");
}
return 1;
} catch (Exception e) {
Log.a((Throwable) e);
return 1;
}
}
public List<SIXmppGroupInfo> group_search(String str, int i, int i2, String str2) {
ArrayList arrayList;
JSONObject jSONObject;
String str3;
String str4;
try {
jSONObject = new JSONObject();
jSONObject.put("version", "2.0");
str3 = "introduct";
jSONObject.put("id", getRandomNumber());
jSONObject.put("type", "m1_group_search");
jSONObject.put("action", "request");
jSONObject.put(AbstractEditComponent.ReturnTypes.SEARCH, str);
StringBuilder sb = new StringBuilder();
str4 = "place";
sb.append(i);
sb.append("");
jSONObject.put("start", sb.toString());
jSONObject.put("num", i2 + "");
jSONObject.put("mobile", str2);
} catch (Exception e) {
e = e;
}
try {
JSONObject jSONObject2 = new JSONObject(this.netIF.a(common_https, "m1_group_search", "2.0", jSONObject));
if (jSONObject2.has("status") && jSONObject2.getInt("status") == 0) {
arrayList = new ArrayList();
try {
if (jSONObject2.has("list")) {
JSONArray jSONArray = jSONObject2.getJSONArray("list");
int i3 = 0;
while (i3 < jSONArray.length()) {
JSONObject jSONObject3 = (JSONObject) jSONArray.get(i3);
SIXmppGroupInfo sIXmppGroupInfo = new SIXmppGroupInfo();
sIXmppGroupInfo.groupid = jSONObject3.has("groupId") ? jSONObject3.getString("groupId") : "";
String string = jSONObject3.has("owner") ? jSONObject3.getString("owner") : "";
ArrayList<String> arrayList2 = new ArrayList<>();
arrayList2.add(string);
sIXmppGroupInfo.owners = arrayList2;
try {
sIXmppGroupInfo.count = jSONObject3.has("count") ? Integer.parseInt(jSONObject3.getString("count")) : 0;
} catch (Exception unused) {
}
sIXmppGroupInfo.groupImage = jSONObject3.has("groupImage") ? jSONObject3.getString("groupImage") : "";
sIXmppGroupInfo.name = jSONObject3.has("subject") ? jSONObject3.getString("subject") : "";
sIXmppGroupInfo.size = jSONObject3.has(MapBundleKey.OfflineMapKey.OFFLINE_TOTAL_SIZE) ? jSONObject3.getInt(MapBundleKey.OfflineMapKey.OFFLINE_TOTAL_SIZE) : 0;
sIXmppGroupInfo.category = jSONObject3.has("category") ? jSONObject3.getString("category") : "";
String str5 = str4;
sIXmppGroupInfo.place = jSONObject3.has(str5) ? jSONObject3.getString(str5) : "";
String str6 = str3;
sIXmppGroupInfo.introduct = jSONObject3.has(str6) ? jSONObject3.getString(str6) : "";
arrayList.add(sIXmppGroupInfo);
i3++;
str4 = str5;
str3 = str6;
}
return arrayList;
}
return arrayList;
} catch (Exception e2) {
e = e2;
Log.a((Throwable) e);
return arrayList;
}
}
return null;
} catch (Exception e3) {
e = e3;
arrayList = null;
Log.a((Throwable) e);
return arrayList;
}
}
public int group_update(SIXmppGroupInfo sIXmppGroupInfo) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("version", "1.0");
jSONObject.put("id", getRandomNumber());
jSONObject.put("type", "m1_group_update");
jSONObject.put("action", "request");
jSONObject.put("roomJID", sIXmppGroupInfo.groupid + CellDataManager.VIRTUAL_COMPONENT_SEPRATOR + SIXmppAccout.conferenceDomain);
jSONObject.put("user", ConnectionManager.getInstance().getUsername());
jSONObject.put("subject", sIXmppGroupInfo.name);
JSONObject jSONObject2 = new JSONObject(this.netIF.a(common_https, "m1_group_update", "1.0", jSONObject));
if (jSONObject2.has("status")) {
return jSONObject2.getInt("status");
}
return 1;
} catch (Exception e) {
Log.a((Throwable) e);
return 1;
}
}
public hn1 m1_chatroom_dissolution(String str, String str2) {
JSONObject jSONObject = new JSONObject();
hn1 hn1Var = new hn1();
hn1Var.b("1");
try {
jSONObject.put("version", version);
jSONObject.put("id", getRandomNumber());
jSONObject.put("type", "m1_chatroom_dissolution");
jSONObject.put("action", "request");
jSONObject.put("roomname", str);
jSONObject.put("owner", str2);
jSONObject.put("sysflag", true);
jSONObject.put("sysnotice", "0");
String a = this.netIF.a(common_https, "m1_chatroom_dissolution", version, jSONObject.toString());
if (!TextUtils.isEmpty(a)) {
JSONObject jSONObject2 = new JSONObject(a);
if (jSONObject2.has("status") && !jSONObject2.isNull("status")) {
hn1Var.b(jSONObject2.getString("status"));
}
if (jSONObject2.has("desc") && !jSONObject2.isNull("desc")) {
hn1Var.a(jSONObject2.getString("desc"));
}
}
} catch (JSONException unused) {
}
return hn1Var;
}
public int m1_chatroom_role_set(String str, String str2, String str3, String str4) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("version", "1.0");
jSONObject.put("id", getRandomNumber());
jSONObject.put("type", "m1_chatroom_role_set");
jSONObject.put("action", "request");
jSONObject.put("roomJID", str);
jSONObject.put("owner", str2);
jSONObject.put("user", str3);
jSONObject.put("role", str4);
jSONObject.put("sysflag", true);
JSONObject jSONObject2 = new JSONObject(this.netIF.a(common_https, "m1_chatroom_role_set", version, jSONObject));
if (jSONObject2.has("status")) {
return jSONObject2.getInt("status");
}
return 1;
} catch (Exception e) {
Log.a((Throwable) e);
return 1;
}
}
public int m1_contact_p2p_send(String str, String str2, String str3, String str4) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("version", "2.0");
jSONObject.put("id", str);
jSONObject.put("type", "m1_contact_p2p_send");
jSONObject.put("action", "request");
jSONObject.put("from_user", str2);
jSONObject.put("to_user", str3);
jSONObject.put("body", str4);
jSONObject.put("device_code", "1");
JSONObject jSONObject2 = new JSONObject(this.netIF.a(common_https, "m1_contact_p2p_send", "2.0", jSONObject));
if (jSONObject2.has("status")) {
return jSONObject2.getInt("status");
}
return 1;
} catch (Exception e) {
Log.a((Throwable) e);
return 1;
}
}
public hn1 queryChatNodisturb(String str, String str2) {
hn1 hn1Var = new hn1();
hn1Var.b("1");
try {
JSONObject g = this.netIF.g("1.0", "queryChatNodisturb");
g.put(bk0.x9, str);
if (!TextUtils.isEmpty(str2)) {
g.put("chatId", str2);
}
g.put("appId", this.context.getPackageName());
hn1Var = this.netIF.b(common_https, "queryChatNodisturb", "1.0", g);
if (hn1Var.j() && (hn1Var.e() instanceof JSONObject) && ((JSONObject) hn1Var.e()).has("data") && !((JSONObject) hn1Var.e()).isNull("data")) {
JSONObject jSONObject = ((JSONObject) hn1Var.e()).getJSONObject("data");
if (jSONObject.has("list") && !jSONObject.isNull("list")) {
JSONArray jSONArray = jSONObject.getJSONArray("list");
ArrayList arrayList = new ArrayList();
for (int i = 0; i < jSONArray.length(); i++) {
JSONObject jSONObject2 = jSONArray.getJSONObject(i);
ChatNodisturb chatNodisturb = new ChatNodisturb();
chatNodisturb.parseFromJson(jSONObject2);
arrayList.add(chatNodisturb);
}
hn1Var.a(arrayList);
}
}
} catch (Exception e) {
Log.a((Throwable) e);
}
return hn1Var;
}
public defpackage.hn1 query_chatroom_by_roomname(java.lang.String r21) {
throw new UnsupportedOperationException("Method not decompiled: com.sitech.oncon.api.core.im.network.NetInterface.query_chatroom_by_roomname(java.lang.String):hn1");
}
public String query_groupmsg_state(String str, SIXmppMessage sIXmppMessage) {
String str2;
String str3;
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("version", version);
jSONObject.put("id", getRandomNumber());
jSONObject.put("type", "query_groupmsg_state");
jSONObject.put("action", "request");
jSONObject.put(RemoteMessageConst.MSGID, sIXmppMessage.f115id);
jSONObject.put("roomId", str);
jSONObject.put("msgTime", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date(sIXmppMessage.time)));
JSONObject jSONObject2 = new JSONObject(this.netIF.a(common_https, "query_groupmsg_state", version, jSONObject));
if ("0".equals(jSONObject2.getString("status"))) {
String username = ConnectionManager.getInstance().getUsername();
String jSONArray = el0.a(jSONObject2.getJSONArray("readlist"), username).toString();
String jSONArray2 = el0.a(jSONObject2.getJSONArray("noreadlist"), username).toString();
String jSONArray3 = jSONObject2.has("urgentlist") ? el0.a(jSONObject2.getJSONArray("urgentlist"), username).toString() : "";
String jSONArray4 = jSONObject2.has("sendlist") ? el0.a(jSONObject2.getJSONArray("sendlist"), username).toString() : "";
StringBuilder sb = new StringBuilder();
sb.append("{\"readlist\":");
sb.append(jSONArray);
sb.append(",\"noreadlist\":");
sb.append(jSONArray2);
if (TextUtils.isEmpty(jSONArray3)) {
str2 = "";
} else {
str2 = ",\"urgentlist\":" + jSONArray3;
}
sb.append(str2);
if (TextUtils.isEmpty(jSONArray4)) {
str3 = "";
} else {
str3 = ",\"sendlist\":" + jSONArray4;
}
sb.append(str3);
sb.append(Operators.BLOCK_END_STR);
return sb.toString();
}
return "";
} catch (Exception unused) {
return "";
}
}
public hn1 report_terminal_info(String str, String str2, String str3, String str4, String str5, String str6) {
return report_terminal_info(str, str2, str3, str4, IMConfig.Sandbox.PRODUCT, "", str5, getNtfyOpen(), "", "", str6);
}
public hn1 setChatNodisturb(ChatNodisturb chatNodisturb) {
hn1 hn1Var = new hn1();
hn1Var.b("1");
try {
JSONObject g = this.netIF.g("1.0", "setChatNodisturb");
g.put(bk0.x9, chatNodisturb.username);
g.put("chatId", chatNodisturb.chatId);
g.put("chatType", chatNodisturb.chatType);
g.put("optType", chatNodisturb.optType);
if (!TextUtils.isEmpty(chatNodisturb.startTime)) {
g.put(AnalyticsConfig.RTD_START_TIME, chatNodisturb.startTime);
}
if (!TextUtils.isEmpty(chatNodisturb.endTime)) {
g.put("endTime", chatNodisturb.endTime);
}
g.put("appId", this.context.getPackageName());
return this.netIF.b(common_https, "setChatNodisturb", "1.0", g);
} catch (Exception e) {
Log.a((Throwable) e);
return hn1Var;
}
}
public STATUS talk_query(String str, ArrayList<SIXmppThreadInfo> arrayList) {
JSONArray jSONArray;
int i;
if (str == null) {
return STATUS.FAILED;
}
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("version", version);
jSONObject.put("id", getRandomNumber());
jSONObject.put("type", "m1_talk_query");
jSONObject.put("mobile", str);
String a = this.netIF.a(common_https, "m1_talk_query", version, jSONObject);
if (TextUtils.isEmpty(a)) {
return STATUS.FAILED;
}
JSONObject jSONObject2 = new JSONObject(a);
if (jSONObject2.has("status") && "0".equals(jSONObject2.getString("status")) && jSONObject2.has("conflist")) {
if (arrayList == null) {
arrayList = new ArrayList<>();
} else {
arrayList.clear();
}
JSONArray jSONArray2 = jSONObject2.getJSONArray("conflist");
for (int i2 = 0; i2 < jSONArray2.length(); i2++) {
JSONObject jSONObject3 = jSONArray2.getJSONObject(i2);
SIXmppThreadInfo sIXmppThreadInfo = new SIXmppThreadInfo();
String string = jSONObject3.getString("confno");
if (string.indexOf(org.jivesoftware.smack.util.StringUtils.AMP_ENCODE) < 0 && string.indexOf("&") < 0) {
sIXmppThreadInfo.username = string;
sIXmppThreadInfo.type = SIXmppThreadInfo.Type.GROUP;
ArrayList<String> arrayList2 = new ArrayList<>();
jSONArray = jSONObject3.getJSONArray("memlist");
for (i = 0; i < jSONArray.length(); i++) {
arrayList2.add(jSONArray.getString(i));
}
sIXmppThreadInfo.intercomCount = arrayList2.size();
sIXmppThreadInfo.intercomMembers = arrayList2;
arrayList.add(sIXmppThreadInfo);
}
sIXmppThreadInfo.username = string.replace(str, "").replace(org.jivesoftware.smack.util.StringUtils.AMP_ENCODE, "").replace("&", "");
sIXmppThreadInfo.type = SIXmppThreadInfo.Type.P2P;
ArrayList<String> arrayList22 = new ArrayList<>();
jSONArray = jSONObject3.getJSONArray("memlist");
while (i < jSONArray.length()) {
}
sIXmppThreadInfo.intercomCount = arrayList22.size();
sIXmppThreadInfo.intercomMembers = arrayList22;
arrayList.add(sIXmppThreadInfo);
}
return STATUS.SUCCESS;
}
return STATUS.FAILED;
} catch (Exception e) {
Log.a((Throwable) e);
return STATUS.FAILED;
}
}
public hn1 update_chatroom_membernickname(String str, String str2, String str3) {
JSONObject jSONObject = new JSONObject();
hn1 hn1Var = new hn1();
hn1Var.b("1");
try {
String str4 = version;
jSONObject.put("version", str4);
jSONObject.put("id", getRandomNumber());
jSONObject.put("type", "update_chatroom_membernickname");
jSONObject.put("action", "request");
jSONObject.put("memberNickname", str);
jSONObject.put("roomName", str2);
jSONObject.put("userJID", str3 + CellDataManager.VIRTUAL_COMPONENT_SEPRATOR + SIXmppAccout.domain);
String a = this.netIF.a(common_https, "update_chatroom_membernickname", str4, jSONObject.toString());
if (!TextUtils.isEmpty(a)) {
JSONObject jSONObject2 = new JSONObject(a);
if (jSONObject2.has("status") && !jSONObject2.isNull("status")) {
hn1Var.b(jSONObject2.getString("status"));
}
if (jSONObject2.has("desc") && !jSONObject2.isNull("desc")) {
hn1Var.a(jSONObject2.getString("desc"));
}
}
} catch (JSONException unused) {
}
return hn1Var;
}
public hn1 urgent_notify(String str, String str2, String str3, String str4, String str5, String str6, String str7, String str8) {
JSONObject jSONObject = new JSONObject();
hn1 hn1Var = new hn1();
hn1Var.b("1");
try {
jSONObject.put("version", version);
jSONObject.put("id", getRandomNumber());
jSONObject.put("type", "urgent_notify");
jSONObject.put("action", "request");
jSONObject.put("appid", str);
jSONObject.put("msgid", str2);
jSONObject.put("content", str3);
jSONObject.put("notificationtype", str4);
jSONObject.put("frommobile", str5);
jSONObject.put("tomobile", str6);
jSONObject.put("entercode", str7);
jSONObject.put("urgenttype", str8);
return this.netIF.b(common_https, "urgent_notify", version, jSONObject);
} catch (Exception unused) {
return hn1Var;
}
}
public hn1 report_terminal_info(String str, String str2, String str3, String str4, IMConfig.Sandbox sandbox, String str5, String str6, IMConfig.Ntfyopen ntfyopen, String str7, String str8, String str9) {
String str10;
String str11;
String str12;
String str13;
String str14;
String str15;
hn1 hn1Var;
String str16;
String str17;
String str18;
Object obj;
String str19;
String str20;
String str21;
String str22;
String str23;
Object obj2;
String str24;
String str25;
String str26;
JSONObject jSONObject = new JSONObject();
hn1 hn1Var2 = new hn1();
hn1Var2.b("1");
try {
if (this.context != null) {
String j = kk0.j(this.context);
try {
if (TextUtils.isEmpty(j)) {
j = kk0.f();
}
str10 = j;
} catch (Throwable unused) {
str10 = str25;
}
try {
String l = kk0.l(this.context);
try {
if (TextUtils.isEmpty(l)) {
l = kk0.f();
}
str11 = l;
} catch (Throwable unused2) {
str11 = str26;
}
} catch (Throwable unused3) {
str11 = "";
str12 = str11;
str13 = str12;
str14 = str13;
str15 = str10;
hn1Var = hn1Var2;
str16 = str11;
str17 = "dsystem";
str18 = str12;
obj = "android";
str19 = str13;
str20 = "dmodel";
str21 = str14;
str22 = "";
jSONObject.put("id", getRandomNumber());
jSONObject.put("type", "report_terminal_info");
jSONObject.put("version", version);
jSONObject.put("action", "request");
jSONObject.put("sdkversion", SIXmppAccout.SDK_VERSION);
jSONObject.put("duid", str15);
jSONObject.put("imei", str16);
jSONObject.put("imsi", str16);
jSONObject.put("imei1", str18);
jSONObject.put("imei2", str19);
jSONObject.put("imsi1", str21);
jSONObject.put("imsi2", str22);
try {
} catch (Throwable unused4) {
str16 = str20;
}
try {
if (kk0.z(this.context)) {
}
obj2 = obj;
} catch (Throwable unused5) {
obj2 = obj;
try {
jSONObject.put(str16, obj2);
jSONObject.put("dversion", Build.MODEL);
str23 = Build.MANUFACTURER;
jSONObject.put("dfacturer", str23);
if (IMConfig.USE_GOOGLE_FIREBASE) {
if (!TextUtils.isEmpty(IMConfig.USE_GOOGLE_FIREBASE_ID)) {
}
}
String str27 = str17;
jSONObject.put(str27, Build.MANUFACTURER);
str23 = str27;
jSONObject.put("dsysmodel", obj2);
jSONObject.put("dsysversion", Build.VERSION.INCREMENTAL);
jSONObject.put("dandroidversion", Build.VERSION.RELEASE);
jSONObject.put("dname", "");
jSONObject.put("clientversion", kk0.h(this.context));
jSONObject.put("nettype", ln1.j());
if (str == null) {
}
hn1 hn1Var3 = hn1Var;
hn1Var3.b("-1");
hn1Var3.a("onconappid is null ");
return hn1Var3;
} catch (Exception e) {
e = e;
str23 = hn1Var;
Log.a((Throwable) e);
return str23;
}
}
jSONObject.put("dversion", Build.MODEL);
str23 = Build.MANUFACTURER;
jSONObject.put("dfacturer", str23);
try {
} catch (Throwable unused6) {
str23 = str17;
}
try {
if (IMConfig.USE_GOOGLE_FIREBASE) {
}
String str272 = str17;
jSONObject.put(str272, Build.MANUFACTURER);
str23 = str272;
} catch (Throwable unused7) {
jSONObject.put(str23, obj2);
jSONObject.put("dsysmodel", obj2);
jSONObject.put("dsysversion", Build.VERSION.INCREMENTAL);
jSONObject.put("dandroidversion", Build.VERSION.RELEASE);
jSONObject.put("dname", "");
jSONObject.put("clientversion", kk0.h(this.context));
jSONObject.put("nettype", ln1.j());
if (str == null) {
}
hn1 hn1Var32 = hn1Var;
hn1Var32.b("-1");
hn1Var32.a("onconappid is null ");
return hn1Var32;
}
jSONObject.put("dsysmodel", obj2);
jSONObject.put("dsysversion", Build.VERSION.INCREMENTAL);
jSONObject.put("dandroidversion", Build.VERSION.RELEASE);
jSONObject.put("dname", "");
jSONObject.put("clientversion", kk0.h(this.context));
jSONObject.put("nettype", ln1.j());
if (str == null) {
}
hn1 hn1Var322 = hn1Var;
hn1Var322.b("-1");
hn1Var322.a("onconappid is null ");
return hn1Var322;
}
try {
CTelephoneInfo cTelephoneInfo = CTelephoneInfo.getInstance(this.context);
cTelephoneInfo.setCTelephoneInfo();
str12 = cTelephoneInfo.getImeiSIM1();
try {
str13 = cTelephoneInfo.getImeiSIM2();
try {
str14 = cTelephoneInfo.getINumeric1();
try {
str24 = cTelephoneInfo.getINumeric2();
} catch (Throwable unused8) {
str15 = str10;
hn1Var = hn1Var2;
str16 = str11;
str17 = "dsystem";
str18 = str12;
obj = "android";
str19 = str13;
str20 = "dmodel";
str21 = str14;
str22 = "";
jSONObject.put("id", getRandomNumber());
jSONObject.put("type", "report_terminal_info");
jSONObject.put("version", version);
jSONObject.put("action", "request");
jSONObject.put("sdkversion", SIXmppAccout.SDK_VERSION);
jSONObject.put("duid", str15);
jSONObject.put("imei", str16);
jSONObject.put("imsi", str16);
jSONObject.put("imei1", str18);
jSONObject.put("imei2", str19);
jSONObject.put("imsi1", str21);
jSONObject.put("imsi2", str22);
if (kk0.z(this.context)) {
}
obj2 = obj;
jSONObject.put("dversion", Build.MODEL);
str23 = Build.MANUFACTURER;
jSONObject.put("dfacturer", str23);
if (IMConfig.USE_GOOGLE_FIREBASE) {
}
String str2722 = str17;
jSONObject.put(str2722, Build.MANUFACTURER);
str23 = str2722;
jSONObject.put("dsysmodel", obj2);
jSONObject.put("dsysversion", Build.VERSION.INCREMENTAL);
jSONObject.put("dandroidversion", Build.VERSION.RELEASE);
jSONObject.put("dname", "");
jSONObject.put("clientversion", kk0.h(this.context));
jSONObject.put("nettype", ln1.j());
if (str == null) {
}
hn1 hn1Var3222 = hn1Var;
hn1Var3222.b("-1");
hn1Var3222.a("onconappid is null ");
return hn1Var3222;
}
} catch (Throwable unused9) {
str14 = "";
}
} catch (Throwable unused10) {
str13 = "";
str14 = str13;
str15 = str10;
hn1Var = hn1Var2;
str16 = str11;
str17 = "dsystem";
str18 = str12;
obj = "android";
str19 = str13;
str20 = "dmodel";
str21 = str14;
str22 = "";
jSONObject.put("id", getRandomNumber());
jSONObject.put("type", "report_terminal_info");
jSONObject.put("version", version);
jSONObject.put("action", "request");
jSONObject.put("sdkversion", SIXmppAccout.SDK_VERSION);
jSONObject.put("duid", str15);
jSONObject.put("imei", str16);
jSONObject.put("imsi", str16);
jSONObject.put("imei1", str18);
jSONObject.put("imei2", str19);
jSONObject.put("imsi1", str21);
jSONObject.put("imsi2", str22);
if (kk0.z(this.context)) {
}
obj2 = obj;
jSONObject.put("dversion", Build.MODEL);
str23 = Build.MANUFACTURER;
jSONObject.put("dfacturer", str23);
if (IMConfig.USE_GOOGLE_FIREBASE) {
}
String str27222 = str17;
jSONObject.put(str27222, Build.MANUFACTURER);
str23 = str27222;
jSONObject.put("dsysmodel", obj2);
jSONObject.put("dsysversion", Build.VERSION.INCREMENTAL);
jSONObject.put("dandroidversion", Build.VERSION.RELEASE);
jSONObject.put("dname", "");
jSONObject.put("clientversion", kk0.h(this.context));
jSONObject.put("nettype", ln1.j());
if (str == null) {
}
hn1 hn1Var32222 = hn1Var;
hn1Var32222.b("-1");
hn1Var32222.a("onconappid is null ");
return hn1Var32222;
}
} catch (Throwable unused11) {
str12 = "";
str13 = str12;
str14 = str13;
str15 = str10;
hn1Var = hn1Var2;
str16 = str11;
str17 = "dsystem";
str18 = str12;
obj = "android";
str19 = str13;
str20 = "dmodel";
str21 = str14;
str22 = "";
jSONObject.put("id", getRandomNumber());
jSONObject.put("type", "report_terminal_info");
jSONObject.put("version", version);
jSONObject.put("action", "request");
jSONObject.put("sdkversion", SIXmppAccout.SDK_VERSION);
jSONObject.put("duid", str15);
jSONObject.put("imei", str16);
jSONObject.put("imsi", str16);
jSONObject.put("imei1", str18);
jSONObject.put("imei2", str19);
jSONObject.put("imsi1", str21);
jSONObject.put("imsi2", str22);
if (kk0.z(this.context)) {
}
obj2 = obj;
jSONObject.put("dversion", Build.MODEL);
str23 = Build.MANUFACTURER;
jSONObject.put("dfacturer", str23);
if (IMConfig.USE_GOOGLE_FIREBASE) {
}
String str272222 = str17;
jSONObject.put(str272222, Build.MANUFACTURER);
str23 = str272222;
jSONObject.put("dsysmodel", obj2);
jSONObject.put("dsysversion", Build.VERSION.INCREMENTAL);
jSONObject.put("dandroidversion", Build.VERSION.RELEASE);
jSONObject.put("dname", "");
jSONObject.put("clientversion", kk0.h(this.context));
jSONObject.put("nettype", ln1.j());
if (str == null) {
}
hn1 hn1Var322222 = hn1Var;
hn1Var322222.b("-1");
hn1Var322222.a("onconappid is null ");
return hn1Var322222;
}
} else {
str24 = "";
str10 = str24;
str11 = str10;
str12 = str11;
str13 = str12;
str14 = str13;
}
String str28 = str14;
str22 = str24;
str15 = str10;
hn1Var = hn1Var2;
str16 = str11;
str17 = "dsystem";
str18 = str12;
obj = "android";
str19 = str13;
str20 = "dmodel";
str21 = str28;
} catch (Throwable unused12) {
str10 = "";
str11 = str10;
}
try {
jSONObject.put("id", getRandomNumber());
jSONObject.put("type", "report_terminal_info");
jSONObject.put("version", version);
jSONObject.put("action", "request");
jSONObject.put("sdkversion", SIXmppAccout.SDK_VERSION);
jSONObject.put("duid", str15);
jSONObject.put("imei", str16);
jSONObject.put("imsi", str16);
jSONObject.put("imei1", str18);
jSONObject.put("imei2", str19);
jSONObject.put("imsi1", str21);
jSONObject.put("imsi2", str22);
if (kk0.z(this.context)) {
str16 = str20;
jSONObject.put(str16, "android_pad");
} else {
str16 = str20;
jSONObject.put(str16, "android_phone");
}
obj2 = obj;
jSONObject.put("dversion", Build.MODEL);
str23 = Build.MANUFACTURER;
jSONObject.put("dfacturer", str23);
} catch (Exception e2) {
e = e2;
}
if (IMConfig.USE_GOOGLE_FIREBASE && !TextUtils.isEmpty(IMConfig.USE_GOOGLE_FIREBASE_TOKEN)) {
if (!TextUtils.isEmpty(IMConfig.USE_GOOGLE_FIREBASE_ID)) {
String str29 = str17;
jSONObject.put(str29, "google");
str23 = str29;
jSONObject.put("dsysmodel", obj2);
jSONObject.put("dsysversion", Build.VERSION.INCREMENTAL);
jSONObject.put("dandroidversion", Build.VERSION.RELEASE);
jSONObject.put("dname", "");
jSONObject.put("clientversion", kk0.h(this.context));
jSONObject.put("nettype", ln1.j());
if (str == null && !"".equals(str)) {
jSONObject.put("onconappid", str);
jSONObject.put("oncontoken", str2);
str23 = hn1Var;
if (str3 != null && !"".equals(str3)) {
jSONObject.put("otherappid", str3);
}
jSONObject.put("othertoken", str4);
jSONObject.put("sandbox", sandbox.getValue());
if (str5 != null && str5.length() > 32) {
str23.b("-1");
str23.a("usralias length > 32");
return str23;
}
if (str5 != null && !"".equals(str5)) {
jSONObject.put("usralias", str5);
}
if (str6 != null && str6.length() > 32) {
str23.b("-1");
str23.a("usrid length > 32");
return str23;
}
if (str6 != null && !"".equals(str6)) {
jSONObject.put("usrid", str6);
}
jSONObject.put("ntfyopen", ntfyopen.getValue());
if (str7.length() > 32) {
str23.b("-1");
str23.a("msgsub length > 32");
return str23;
} else if (str8.length() > 32) {
str23.b("-1");
str23.a("msgforbid length > 32");
return str23;
} else {
if (str7 != null && !"".equals(str7)) {
jSONObject.put("msgsub", str7);
}
if (str8 != null && !"".equals(str8)) {
jSONObject.put("msgforbid", str8);
}
try {
jSONObject.put("reporttime", sdf.format(new Date()));
} catch (Exception unused13) {
}
if (!TextUtils.isEmpty(str9)) {
jSONObject.put("handler", str9);
}
String a = this.netIF.a(report_https, "report_terminal_info", version, jSONObject);
if (!TextUtils.isEmpty(a)) {
JSONObject jSONObject2 = new JSONObject(a);
if (jSONObject2.has("status") && !jSONObject2.isNull("status") && !TextUtils.isEmpty(jSONObject2.getString("status"))) {
str23.b(jSONObject2.getString("status"));
}
if (TextUtils.equals("0", str23.g())) {
UserNetInfo.getInstance().ISP = jSONObject2.has("ISP") ? jSONObject2.getString("ISP") : "";
UserNetInfo.getInstance().regionCode = jSONObject2.has("regionCode") ? jSONObject2.getString("regionCode") : "";
UserNetInfo.getInstance().clientIp = jSONObject2.has("clientIp") ? jSONObject2.getString("clientIp") : "";
UserNetInfo.getInstance().setLocal(UserNetInfo.getInstance().toJson().toString());
}
}
return str23;
}
}
hn1 hn1Var3222222 = hn1Var;
hn1Var3222222.b("-1");
hn1Var3222222.a("onconappid is null ");
return hn1Var3222222;
}
}
String str2722222 = str17;
jSONObject.put(str2722222, Build.MANUFACTURER);
str23 = str2722222;
jSONObject.put("dsysmodel", obj2);
jSONObject.put("dsysversion", Build.VERSION.INCREMENTAL);
jSONObject.put("dandroidversion", Build.VERSION.RELEASE);
jSONObject.put("dname", "");
jSONObject.put("clientversion", kk0.h(this.context));
jSONObject.put("nettype", ln1.j());
if (str == null) {
}
hn1 hn1Var32222222 = hn1Var;
hn1Var32222222.b("-1");
hn1Var32222222.a("onconappid is null ");
return hn1Var32222222;
}
public NetInterface(Context context) {
this.httpPost = new vi0();
this.context = context;
this.netIF = new mm1(context);
}
public hn1 chatroom_leave(String str, String str2, List<String> list) {
hn1 hn1Var = new hn1();
hn1Var.b("1");
if (list != null) {
try {
if (list.size() != 0) {
JSONObject jSONObject = new JSONObject();
jSONObject.put("version", version2);
jSONObject.put("id", getRandomNumber());
jSONObject.put("type", "m1_chatroom_leave");
jSONObject.put("action", "request");
jSONObject.put("roomJID", str + CellDataManager.VIRTUAL_COMPONENT_SEPRATOR + SIXmppAccout.conferenceDomain);
jSONObject.put("userJID", str2);
JSONArray jSONArray = new JSONArray();
for (String str3 : list) {
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("memberJID", str3);
jSONArray.put(jSONObject2);
}
jSONObject.put("memberlist", jSONArray);
jSONObject.put("sysnotice", "1");
String a = this.netIF.a(common_https, "m1_chatroom_leave", version2, jSONObject);
if (!TextUtils.isEmpty(a)) {
JSONObject jSONObject3 = new JSONObject(a);
if (jSONObject3.has("status") && !jSONObject3.isNull("status")) {
hn1Var.b(jSONObject3.getString("status"));
}
if (jSONObject3.has("desc") && !jSONObject3.isNull("desc")) {
hn1Var.a(jSONObject3.getString("desc"));
}
}
}
} catch (Exception e) {
Log.a((Throwable) e);
}
}
return hn1Var;
}
public hn1 m1_chatroom_dissolution(String str, String str2, boolean z, String str3) {
JSONObject jSONObject = new JSONObject();
hn1 hn1Var = new hn1();
hn1Var.b("1");
try {
jSONObject.put("version", version);
jSONObject.put("id", getRandomNumber());
jSONObject.put("type", "m1_chatroom_dissolution");
jSONObject.put("action", "request");
jSONObject.put("roomname", str);
jSONObject.put("owner", str2);
jSONObject.put("sysflag", z);
jSONObject.put("sysnotice", str3);
String a = this.netIF.a(common_https, "m1_chatroom_dissolution", version, jSONObject.toString());
if (!TextUtils.isEmpty(a)) {
JSONObject jSONObject2 = new JSONObject(a);
if (jSONObject2.has("status") && !jSONObject2.isNull("status")) {
hn1Var.b(jSONObject2.getString("status"));
}
if (jSONObject2.has("desc") && !jSONObject2.isNull("desc")) {
hn1Var.a(jSONObject2.getString("desc"));
}
}
} catch (JSONException unused) {
}
return hn1Var;
}
}