밤친구 v4.7.3版本的 MD5 值为:a58175795b36d9d722726efa7eb4c52a
以下内容为反编译后的 r0.java 源代码,内容仅作参考
package qh;
import android.content.Context;
import android.net.Uri;
import android.text.TextUtils;
import androidx.core.view.PointerIconCompat;
import com.bumptech.glide.load.Key;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Iterator;
public abstract class r0 {
public static class a extends q0 {
public final String m(Context context, String str, ArrayList arrayList) {
URL url;
if (arrayList == null) {
url = new URL(str);
} else {
Uri.Builder buildUpon = Uri.parse(str).buildUpon();
Iterator it2 = arrayList.iterator();
while (it2.hasNext()) {
w wVar = (w) it2.next();
buildUpon.appendQueryParameter(wVar.a(), wVar.b());
}
url = new URL(buildUpon.toString());
}
return x.c(context, url);
}
}
public static int a(a aVar, String str, ArrayList arrayList, String str2) {
int length;
int i;
int i2 = 0;
int i10 = aVar.f14997a;
if (i10 == 1) {
length = str.length();
if (!TextUtils.isEmpty(str2)) {
try {
i2 = str2.getBytes(Key.STRING_CHARSET_NAME).length;
} catch (UnsupportedEncodingException unused) {
}
}
i = (((i2 + 243) / 1448) * 132) + 1080;
} else if (i10 == 2) {
Iterator it2 = arrayList.iterator();
int i11 = 0;
while (it2.hasNext()) {
w wVar = (w) it2.next();
if (!TextUtils.isEmpty(wVar.a())) {
i11 += wVar.a().length();
}
if (!TextUtils.isEmpty(wVar.b())) {
i11 += wVar.b().length();
}
}
int i12 = i11 * 2;
length = str.length();
if (!TextUtils.isEmpty(str2)) {
try {
i2 = str2.getBytes(Key.STRING_CHARSET_NAME).length;
} catch (UnsupportedEncodingException unused2) {
}
}
i = (((i12 + 200) / 1448) * 132) + PointerIconCompat.TYPE_COPY + i12;
} else {
return -1;
}
return i + length + i2;
}
public static String b(Context context) {
a aVar = new a();
if (!x.h(context)) {
return null;
}
try {
new ArrayList();
n0 f10 = n0.f();
f10.getClass();
if (!TextUtils.isEmpty("https://resolver.msg.xiaomi.net/psc/?t=a")) {
k0 e10 = f10.e(new URL("https://resolver.msg.xiaomi.net/psc/?t=a").getHost(), true);
ArrayList<String> c10 = e10.c("https://resolver.msg.xiaomi.net/psc/?t=a");
if (!c10.contains("https://resolver.msg.xiaomi.net/psc/?t=a")) {
c10.add("https://resolver.msg.xiaomi.net/psc/?t=a");
}
Iterator<String> it2 = c10.iterator();
String str = null;
while (it2.hasNext()) {
String next = it2.next();
long currentTimeMillis = System.currentTimeMillis();
try {
str = aVar.m(context, next, null);
} catch (IOException e11) {
try {
e10.h(new URL(next).getHost(), new j0(-1, System.currentTimeMillis() - currentTimeMillis, a(aVar, next, null, str), e11));
} catch (MalformedURLException unused) {
}
e11.printStackTrace();
}
if (!TextUtils.isEmpty(str)) {
try {
e10.h(new URL(next).getHost(), new j0(0, System.currentTimeMillis() - currentTimeMillis, a(aVar, next, null, str), null));
break;
} catch (MalformedURLException unused2) {
}
} else {
try {
e10.h(new URL(next).getHost(), new j0(-1, System.currentTimeMillis() - currentTimeMillis, a(aVar, next, null, str), null));
} catch (MalformedURLException unused3) {
}
}
}
return str;
}
throw new IllegalArgumentException("the url is empty");
} catch (MalformedURLException e12) {
e12.printStackTrace();
return null;
}
}
}