CarrotChat v2.8.60.240131版本的 MD5 值为:2baf8b9f31830b86b5c5a85ae6b47e05
以下内容为反编译后的 d.java 源代码,内容仅作参考
package com.mobile.auth.c;
import android.content.Context;
import android.text.TextUtils;
import com.mobile.auth.b.f;
import com.mobile.auth.d.i;
import com.mobile.auth.gatewayauth.ExceptionProcessor;
import java.net.URLEncoder;
import java.util.List;
import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedQueue;
import org.apache.commons.codec.language.bm.Rule;
import org.json.JSONArray;
import org.json.JSONObject;
public class d {
private static final String a = "d";
private static final byte[] f12838b = {15, 31, 94, 10, 90, 15, 91, 24, 10, 30, 88, 7, 89, 10, 95, 30};
static String a(Context context, Queue queue) {
try {
return b(context, queue);
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
return null;
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
return null;
}
}
}
static Queue a(Context context, List list, int i) {
try {
return c(context, list, i);
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
return null;
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
return null;
}
}
}
static void a(Context context) {
try {
c(context);
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
private static void a(Context context, int i) {
try {
try {
com.mobile.auth.d.b.a(context, "key_c_l_l_v", i);
} catch (Exception e2) {
e2.printStackTrace();
}
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
public static void a(Context context, String str) {
char c2;
try {
int hashCode = str.hashCode();
int i = -1;
if (hashCode == 64897) {
if (str.equals(Rule.ALL)) {
c2 = 0;
if (c2 != 0) {
}
i = 0;
a(context, i);
return;
}
c2 = 65535;
if (c2 != 0) {
}
i = 0;
a(context, i);
return;
} else if (hashCode == 78159) {
if (str.equals("OFF")) {
c2 = 2;
if (c2 != 0) {
}
i = 0;
a(context, i);
return;
}
c2 = 65535;
if (c2 != 0) {
}
i = 0;
a(context, i);
return;
} else {
if (hashCode == 66247144 && str.equals("ERROR")) {
c2 = 1;
if (c2 != 0) {
if (c2 != 1) {
if (c2 == 2) {
i = -2;
}
}
a(context, i);
return;
}
i = 0;
a(context, i);
return;
}
c2 = 65535;
if (c2 != 0) {
}
i = 0;
a(context, i);
return;
}
} catch (Throwable th) {
ExceptionProcessor.processException(th);
}
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
public static void a(Context context, List<String> list) {
try {
int b2 = b(context);
if (b2 == -2) {
return;
}
b(context, list, b2);
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
static void a(Context context, Queue queue, int i) {
try {
b(context, queue, i);
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
private static int b(Context context) {
try {
return com.mobile.auth.d.b.b(context, "key_c_l_l_v", 0);
} catch (Throwable th) {
try {
th.printStackTrace();
return 0;
} catch (Throwable th2) {
try {
ExceptionProcessor.processException(th2);
return -1;
} catch (Throwable th3) {
ExceptionProcessor.processException(th3);
return -1;
}
}
}
}
private static String b(Context context, String str) {
try {
return a.a(context, "https://api-e189.21cn.com/gw/client/accountMsg.do", str);
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
return null;
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
return null;
}
}
}
private static String b(Context context, Queue<String> queue) {
try {
JSONArray jSONArray = new JSONArray();
String jSONArray2 = jSONArray.toString();
if (!queue.isEmpty()) {
for (String str : queue) {
try {
jSONArray.put(new JSONObject(str));
} catch (Exception e2) {
e2.printStackTrace();
}
}
}
if (jSONArray.length() <= 0) {
return "";
}
String jSONArray3 = jSONArray.toString();
if (!TextUtils.isEmpty(jSONArray3)) {
try {
jSONArray2 = URLEncoder.encode(com.mobile.auth.b.b.a(com.mobile.auth.b.a.b(jSONArray3, f.a(f12838b))), "UTF-8");
} catch (Exception e3) {
e3.printStackTrace();
}
}
return b(context, jSONArray2);
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
return null;
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
return null;
}
}
}
private static void b(final Context context, final List<String> list, final int i) {
try {
i.a().a(new Runnable() {
@Override
public void run() {
try {
Queue a2 = d.a(context, list, i);
if (a2.isEmpty()) {
return;
}
String a3 = d.a(context, a2);
JSONObject jSONObject = null;
int i2 = -1;
try {
if (!TextUtils.isEmpty(a3)) {
JSONObject jSONObject2 = new JSONObject(a3);
try {
i2 = jSONObject2.getInt("code");
jSONObject = jSONObject2;
} catch (Exception e2) {
e = e2;
jSONObject = jSONObject2;
e.printStackTrace();
if (jSONObject != null) {
}
d.a(context, a2, i);
return;
}
}
} catch (Exception e3) {
e = e3;
}
if (jSONObject != null || i2 != 0) {
d.a(context, a2, i);
return;
}
d.a(context);
a2.clear();
} catch (Throwable th) {
try {
th.printStackTrace();
} catch (Throwable th2) {
try {
ExceptionProcessor.processException(th2);
} catch (Throwable th3) {
ExceptionProcessor.processException(th3);
}
}
}
}
});
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
private static void b(Context context, Queue<String> queue, int i) {
JSONObject jSONObject;
try {
String str = "";
JSONArray jSONArray = new JSONArray();
if (queue != null && !queue.isEmpty()) {
int i2 = 0;
for (String str2 : queue) {
try {
jSONObject = new JSONObject(str2);
} catch (Exception e2) {
e2.printStackTrace();
}
if (i != -1 || jSONObject.getInt("rt") != 0) {
jSONArray.put(jSONObject);
i2++;
if (i2 > 10) {
break;
}
}
}
}
if (jSONArray.length() > 0) {
try {
str = com.mobile.auth.b.a.a(jSONArray.toString(), f.a(f12838b));
} catch (Exception e3) {
str = null;
e3.printStackTrace();
}
}
if (TextUtils.isEmpty(str)) {
return;
}
c.a(context, str);
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
private static synchronized Queue<String> c(Context context, List<String> list, int i) {
ConcurrentLinkedQueue concurrentLinkedQueue;
synchronized (d.class) {
try {
concurrentLinkedQueue = new ConcurrentLinkedQueue();
String a2 = c.a(context);
if (!TextUtils.isEmpty(a2)) {
try {
JSONArray jSONArray = new JSONArray(com.mobile.auth.b.a.c(a2, f.a(f12838b)));
int length = jSONArray.length();
for (int i2 = 0; i2 < length && i2 <= 10; i2++) {
JSONObject jSONObject = jSONArray.getJSONObject(i2);
if (jSONObject != null) {
concurrentLinkedQueue.add(jSONObject.toString());
}
}
c.a(context, "");
} catch (Exception e2) {
e2.printStackTrace();
}
}
if (i == -1) {
for (String str : list) {
try {
if (new JSONObject(str).getInt("rt") != 0) {
concurrentLinkedQueue.add(str);
}
} catch (Exception e3) {
e3.printStackTrace();
}
}
} else if (i == 0) {
concurrentLinkedQueue.addAll(list);
}
while (concurrentLinkedQueue.size() > 10) {
concurrentLinkedQueue.poll();
}
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
return null;
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
return null;
}
}
}
return concurrentLinkedQueue;
}
private static void c(Context context) {
try {
c.a(context, "");
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
}