Amour v4.6.9版本的 MD5 值为:5003e4a703625b66a82acf4f82eb73c5

以下内容为反编译后的 r0.java 源代码,内容仅作参考


package ph;

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 i10 = 0;
        int i11 = aVar.f11996a;
        if (i11 == 1) {
            length = str.length();
            if (!TextUtils.isEmpty(str2)) {
                try {
                    i10 = str2.getBytes(Key.STRING_CHARSET_NAME).length;
                } catch (UnsupportedEncodingException unused) {
                }
            }
            i = (((i10 + 243) / 1448) * 132) + 1080;
        } else if (i11 == 2) {
            Iterator it2 = arrayList.iterator();
            int i12 = 0;
            while (it2.hasNext()) {
                w wVar = (w) it2.next();
                if (!TextUtils.isEmpty(wVar.a())) {
                    i12 += wVar.a().length();
                }
                if (!TextUtils.isEmpty(wVar.b())) {
                    i12 += wVar.b().length();
                }
            }
            int i13 = i12 * 2;
            length = str.length();
            if (!TextUtils.isEmpty(str2)) {
                try {
                    i10 = str2.getBytes(Key.STRING_CHARSET_NAME).length;
                } catch (UnsupportedEncodingException unused2) {
                }
            }
            i = (((i13 + 200) / 1448) * 132) + PointerIconCompat.TYPE_COPY + i13;
        } else {
            return -1;
        }
        return i + length + i10;
    }

    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> c4 = e10.c("https://resolver.msg.xiaomi.net/psc/?t=a");
                if (!c4.contains("https://resolver.msg.xiaomi.net/psc/?t=a")) {
                    c4.add("https://resolver.msg.xiaomi.net/psc/?t=a");
                }
                Iterator<String> it2 = c4.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;
        }
    }
}