湘游汇 v1.0版本的 MD5 值为:85338391d88b5d57da66e240ece801c7

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


package com.b;

import android.content.Context;
import android.os.Bundle;
import android.text.TextUtils;
import androidx.appcompat.a;
import com.b.ej;
import java.util.HashMap;
import java.util.Locale;
import org.cocos2dx.lib.BuildConfig;
import org.json.JSONObject;
public final class dl {
    static String f569a = "http://apilocate.amap.com/mobile/binary";
    static String b = "http://dualstack.apilocate.amap.com/mobile/binary";
    static String c = "";
    static String j;
    static HashMap<String, String> k;
    private static final String[] n = {"com.amap.api.location", "com.loc", "com.amap.api.fence"};
    static String d = "11G;11K;13J;13S;15O;15U;17J;17Y";
    public static String e = null;
    public static String f = null;
    public static int g = 30000;
    public static String h = null;
    public static String i = null;
    private static ej o = null;
    private static boolean p = false;
    private static boolean q = false;
    static boolean l = false;
    static boolean m = false;

    public static Bundle a(com.amap.api.location.c cVar) {
        Bundle bundle = new Bundle();
        if (cVar == null) {
            cVar = new com.amap.api.location.c();
        }
        try {
            bundle.putParcelable("opt", cVar);
        } catch (Throwable th) {
            a(th, "CoreUtil", "getOptionBundle");
        }
        return bundle;
    }

    public static com.amap.api.location.a a(com.amap.api.location.a aVar, com.amap.api.location.a aVar2) {
        if (aVar2 == null) {
            return aVar;
        }
        try {
            aVar.c(aVar2.e());
            aVar.d(aVar2.f());
            aVar.k(aVar2.m());
            aVar.l(aVar2.n());
            aVar.m(aVar2.o());
            String k2 = aVar2.k();
            String l2 = aVar2.l();
            aVar.i(k2);
            aVar.j(l2);
            aVar.g(aVar2.i());
            aVar.h(aVar2.j());
            aVar.f(aVar2.h());
            aVar.n(aVar2.q());
            aVar.e(aVar2.g());
            aVar.q(aVar2.v());
            if (aVar.getExtras() != null) {
                aVar.getExtras().putString("citycode", aVar2.k());
                aVar.getExtras().putString("desc", aVar2.getExtras().getString("desc"));
                aVar.getExtras().putString("adcode", aVar2.l());
            } else {
                Bundle bundle = new Bundle();
                bundle.putString("citycode", aVar2.k());
                bundle.putString("desc", aVar2.getExtras().getString("desc"));
                bundle.putString("adcode", aVar2.l());
                aVar.setExtras(bundle);
            }
        } catch (Throwable unused) {
        }
        return aVar;
    }

    public static com.amap.api.location.c a(Bundle bundle) {
        com.amap.api.location.c cVar = new com.amap.api.location.c();
        if (bundle == null) {
            return cVar;
        }
        try {
            bundle.setClassLoader(com.amap.api.location.c.class.getClassLoader());
            return (com.amap.api.location.c) bundle.getParcelable("opt");
        } catch (Throwable th) {
            a(th, "CoreUtil", "getOptionFromBundle");
            return cVar;
        }
    }

    public static String a() {
        return f569a;
    }

    public static void a(Context context) {
        try {
            if (ek.b(context)) {
                f569a = "http://abroad.apilocate.amap.com/mobile/binary";
                return;
            }
            if (k == null) {
                k = new HashMap<>(16);
            }
            k.clear();
            k.put("fe643c382e5c3b3962141f1a2e815a78", "FB923EE67A8B4032DAA517DD8CD7A26FF7C25B0C3663F92A0B61251C4FFFA858DF169D61321C3E7919CB67DF8EFEC827");
            k.put("9a571aa113ad987d626c0457828962e6", "D2FF99A88BEB04683D89470D4FA72B1749DA456AB0D0F1A476477CE5A6874F53A9106423D905F9D808C0FCE8E7F1E04AC642F01FE41D0C7D933971F45CBA72B7");
            k.put("668319f11506def6208d6afe320dfd52", "53E53D46011A6BBAEA4FAE5442E659E0577CDD336F930C28635C322FB3F51C3C63F7FBAC9EAE448DFA2E5E5D716C4807");
            String a2 = cz.a(ea.f(context));
            j = a2;
            if (a2 == null || a2.length() == 0 || k == null || !k.containsKey(a2)) {
                return;
            }
            String str = k.get(a2);
            String str2 = null;
            if (str != null && str.length() > 0) {
                str2 = new String(cz.b(a(str), a2), "utf-8");
            }
            if (str2 == null || str2.length() <= 0 || !str2.contains("http:")) {
                return;
            }
            c = str2;
            f569a = str2;
        } catch (Throwable th) {
            a(th, "CoreUtil", "checkUrl");
        }
    }

    public static void a(com.amap.api.location.a aVar, JSONObject jSONObject) {
        if (jSONObject == null || aVar == null) {
            return;
        }
        try {
            double optDouble = jSONObject.optDouble("lat", aVar.getLatitude());
            double optDouble2 = jSONObject.optDouble("lon", aVar.getLongitude());
            aVar.setProvider(jSONObject.optString("provider", aVar.getProvider()));
            aVar.setLatitude(optDouble);
            aVar.setLongitude(optDouble2);
            aVar.setAltitude(jSONObject.optDouble("altitude", aVar.getAltitude()));
            try {
                String optString = jSONObject.optString("accuracy");
                if (!TextUtils.isEmpty(optString)) {
                    aVar.setAccuracy(Float.parseFloat(optString));
                }
            } catch (Throwable unused) {
            }
            try {
                String optString2 = jSONObject.optString("speed");
                if (!TextUtils.isEmpty(optString2)) {
                    aVar.setSpeed(Float.parseFloat(optString2));
                }
            } catch (Throwable unused2) {
            }
            try {
                String optString3 = jSONObject.optString("bearing");
                if (!TextUtils.isEmpty(optString3)) {
                    aVar.setBearing(Float.parseFloat(optString3));
                }
            } catch (Throwable unused3) {
            }
            aVar.j(jSONObject.optString("adcode", aVar.l()));
            aVar.i(jSONObject.optString("citycode", aVar.k()));
            aVar.e(jSONObject.optString("address", aVar.g()));
            String optString4 = jSONObject.optString("desc", BuildConfig.FLAVOR);
            aVar.c(jSONObject.optString("country", aVar.e()));
            aVar.f(jSONObject.optString("province", aVar.h()));
            aVar.g(jSONObject.optString("city", aVar.i()));
            aVar.h(jSONObject.optString("district", aVar.j()));
            aVar.d(jSONObject.optString("road", aVar.f()));
            aVar.l(jSONObject.optString("street", aVar.n()));
            aVar.m(jSONObject.optString("number", aVar.o()));
            aVar.k(jSONObject.optString("poiname", aVar.m()));
            aVar.n(jSONObject.optString("aoiname", aVar.q()));
            aVar.c(jSONObject.optInt("errorCode", aVar.c()));
            aVar.b(jSONObject.optString("errorInfo", aVar.d()));
            aVar.b(jSONObject.optInt("locationType", aVar.a()));
            aVar.a(jSONObject.optString("locationDetail", aVar.b()));
            aVar.setTime(jSONObject.optLong("time", aVar.getTime()));
            boolean optBoolean = jSONObject.optBoolean("isOffset", aVar.p());
            aVar.a(optBoolean);
            aVar.o(jSONObject.optString("poiid", aVar.r()));
            aVar.p(jSONObject.optString("floor", aVar.s()));
            aVar.q(jSONObject.optString("description", aVar.v()));
            aVar.r(jSONObject.has("coordType") ? jSONObject.optString("coordType", "GCJ02") : (a(optDouble, optDouble2) && optBoolean) ? "GCJ02" : "WGS84");
            Bundle bundle = new Bundle();
            bundle.putString("citycode", aVar.k());
            bundle.putString("desc", optString4.toString());
            bundle.putString("adcode", aVar.l());
            aVar.setExtras(bundle);
        } catch (Throwable th) {
            a(th, "CoreUtil", "transformLocation");
        }
    }

    public static void a(Throwable th, String str, String str2) {
        if ("reportError".equals(str2) || (th instanceof dz)) {
            return;
        }
        try {
            b.a(th, str, str2);
        } catch (Throwable unused) {
        }
    }

    public static boolean a(double d2, double d3) {
        int i2 = (int) ((d3 - 73.0d) / 0.5d);
        int i3 = (int) ((d2 - 3.5d) / 0.5d);
        if (i3 < 0 || i3 >= 101 || i2 < 0 || i2 >= 124) {
            return false;
        }
        try {
            return "00000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001100000001011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011101010111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110111111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111101111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000110111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011010111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001110011100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001010011100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111100110001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111000111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111110011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111000000000111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111100000000000010111110100000011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111110000000001111111111111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111000000111111111111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111101111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000101111111111111111111111111111111111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111111111111111111111111111111111000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000011110000000001111111111111111111111111111111111111111111110000000000000000000000000000000000000000000000000000000000011000011111100000000111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000001111111100111111111100110111111111111111111111111111111111111111111111110000000000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111000000000000000000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000101111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000000000000000000000000000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111110000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111110000000000000000000000000000000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111110000000000000000000000000000000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000000000000000000000000000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111110000000000000000000000000000000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110000000000000000000000000000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111011111000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100100000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100011100000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000111110000000000000000000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110011111110000000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110111111110000000000000000000000111011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110000000000000000000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000000000000000000011111111111111111111111111111111111111111111111100001111111111111111111111111111111111111111111111111010000000000000000000000111111111111111111111111111111111111111111110000000000000001111111111111111111111111111111111111111111100000000000000000000011111111111111111111111111111111100000000000000000000000000001111111111111111111111111111111111111111110000000000000000000001111111111111111111111111111111100000000000000000000000000000001111111111111111111111111111111111111111000000000000000000000111111111111111111111111111111110000000000000000000000000000001111111111111111111111111111111111111111100000000000000000000111111111111111111111111111111000000000000000000000000000000000111111111111111111111111111111111111111111000000000000000000001111111111111111111111111110000000000000000000000000000000000001110011111111111111111111111111111111111111100000000000000000000011111111111111111100000000000000000000000000000000000000000000000001111111111111111111111111111111111111000000000000000000001111111111111111111000000000000000000000000000000000000000000000000011111111111111111111111111111111111100000000000000000000011111111111111111100000000000000000000000000000000000000000000000000011111111111111111111111111111111111000000000000000000001111111111111111100000000000000000000000000000000000000000000000000000000111111111111111111111111111111110000000000000000000000000111111111100000000000000000000000000000000000000000000000000111111111111111111111111111111111111111000000000000000000000000011111111100000000000000000000000000000000000000000000000000011111111111111111111111111111110001111100000000000000000000000000111110000000000000000000000000000000000000000000000000000001111111111111111111111111111111000000000000000000000000000000000001110000000000000000000000000000000000000000000000000000000011111111111111111111111111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010110000000000000000000000".charAt((i3 * a.j.AppCompatTheme_windowNoTitle) + i2) == '1';
        } catch (Throwable th) {
            a(th, "CoreUtil", "isChina");
            return true;
        }
    }

    private static byte[] a(String str) {
        if (str == null || str.length() < 2) {
            return new byte[0];
        }
        String lowerCase = str.toLowerCase(Locale.US);
        int length = lowerCase.length() / 2;
        byte[] bArr = new byte[length];
        for (int i2 = 0; i2 < length; i2++) {
            int i3 = i2 * 2;
            bArr[i2] = (byte) (dr.h(lowerCase.substring(i3, i3 + 2)) & 255);
        }
        return bArr;
    }

    public static String b() {
        return b;
    }

    public static String b(Context context) {
        return eh.a(ea.e(context));
    }

    public static ej c() {
        try {
            if (o == null) {
                o = new ej.a("loc", "5.2.0", "AMAP_Location_SDK_Android 5.2.0").a((String[]) n.clone()).a("5.2.0").a();
            }
        } catch (Throwable th) {
            a(th, "CoreUtil", "getSDKInfo");
        }
        return o;
    }

    public static void c(Context context) {
        try {
            if (ek.b(context)) {
                f569a = "http://abroad.apilocate.amap.com/mobile/binary";
                b = "http://abroad.apilocate.amap.com/mobile/binary";
                return;
            }
            f569a = "http://apilocate.amap.com/mobile/binary";
            b = "http://dualstack.apilocate.amap.com/mobile/binary";
        } catch (Throwable th) {
            a(th, "CoreUtil", "changeUrl");
        }
    }

    public static String d() {
        return d;
    }
}