米多多 v3.0.1版本的 MD5 值为:f69e79dbe1787218a397ad907fb8f3ab
以下内容为反编译后的 e2.java 源代码,内容仅作参考
package c.i;
import android.content.Context;
import android.os.Bundle;
import android.telephony.TelephonyManager;
import android.util.SparseArray;
import c.i.q2;
import com.amap.api.location.AMapLocation;
import com.amap.api.location.AMapLocationClientOption;
import java.util.HashMap;
import java.util.Locale;
import org.json.JSONObject;
public final class e2 {
public static String f5256a = "http://apilocate.amap.com/mobile/binary";
public static String f5257b = "http://apilocatesrc.amap.com/mobile/binary";
public static String[] f5258c = {"com.amap.api.location", "com.loc", "com.amap.api.fence"};
public static String f5259d = "001;002;11B;11C;11F;11G;11H;11I;11K;122;123;135;13J;13S";
public static String f5260e = null;
public static String f5261f = null;
public static int f5262g = 30000;
public static String f5263h = null;
public static String f5264i = null;
public static int f5265j;
public static boolean f5266k;
public static HashMap<String, String> l;
public static final SparseArray<String> m;
public static boolean n;
public static boolean o;
public static boolean p;
public static boolean q;
static {
SparseArray<String> sparseArray = new SparseArray<>();
m = sparseArray;
sparseArray.append(0, "UNKWN");
m.append(1, "GPRS");
m.append(2, "EDGE");
m.append(3, "UMTS");
m.append(4, "CDMA");
m.append(5, "EVDO_0");
m.append(6, "EVDO_A");
m.append(7, "1xRTT");
m.append(8, "HSDPA");
m.append(9, "HSUPA");
m.append(10, "HSPA");
m.append(11, "IDEN");
m.append(12, "EVDO_B");
m.append(13, "LTE");
m.append(14, "EHRPD");
m.append(15, "HSPAP");
n = false;
o = false;
p = false;
q = false;
}
public static AMapLocation a(AMapLocation aMapLocation, AMapLocation aMapLocation2) {
if (aMapLocation2 == null) {
return aMapLocation;
}
try {
aMapLocation.setCountry(aMapLocation2.getCountry());
aMapLocation.setRoad(aMapLocation2.getRoad());
aMapLocation.setPoiName(aMapLocation2.getPoiName());
aMapLocation.setStreet(aMapLocation2.getStreet());
aMapLocation.setNumber(aMapLocation2.getStreetNum());
String cityCode = aMapLocation2.getCityCode();
String adCode = aMapLocation2.getAdCode();
aMapLocation.setCityCode(cityCode);
aMapLocation.setAdCode(adCode);
aMapLocation.setCity(aMapLocation2.getCity());
aMapLocation.setDistrict(aMapLocation2.getDistrict());
aMapLocation.setProvince(aMapLocation2.getProvince());
aMapLocation.setAoiName(aMapLocation2.getAoiName());
aMapLocation.setAddress(aMapLocation2.getAddress());
if (aMapLocation.getExtras() != null) {
aMapLocation.getExtras().putString("citycode", aMapLocation2.getCityCode());
aMapLocation.getExtras().putString("desc", aMapLocation2.getExtras().getString("desc"));
aMapLocation.getExtras().putString("adcode", aMapLocation2.getAdCode());
} else {
Bundle bundle = new Bundle();
bundle.putString("citycode", aMapLocation2.getCityCode());
bundle.putString("desc", aMapLocation2.getExtras().getString("desc"));
bundle.putString("adcode", aMapLocation2.getAdCode());
aMapLocation.setExtras(bundle);
}
} catch (Throwable unused) {
}
return aMapLocation;
}
public static q2 b(String str) {
try {
q2.a aVar = new q2.a(str, "3.3.0", "AMAP_Location_SDK_Android 3.3.0");
aVar.b(p());
aVar.a("3.3.0");
return aVar.c();
} catch (Throwable th) {
h(th, "CoreUtil", "getSDKInfo");
return null;
}
}
public static q2 c(String str, String str2) {
try {
q2.a aVar = new q2.a(str, str2, "AMAP_Location_SDK_Android 3.3.0");
aVar.b(p());
return aVar.c();
} catch (Throwable th) {
h(th, "CoreUtil", "getSDKInfo");
return null;
}
}
public static String d() {
return f5256a;
}
public static String e(AMapLocationClientOption aMapLocationClientOption) {
JSONObject jSONObject = new JSONObject();
if (aMapLocationClientOption == null) {
aMapLocationClientOption = new AMapLocationClientOption();
}
try {
jSONObject.put("nbssid", "0");
jSONObject.put("reversegeo", aMapLocationClientOption.isNeedAddress());
jSONObject.put("isOffset", aMapLocationClientOption.isOffset());
jSONObject.put("wifiactivescan", aMapLocationClientOption.isWifiActiveScan() ? "1" : "0");
jSONObject.put("httptimeout", aMapLocationClientOption.getHttpTimeOut());
jSONObject.put("isLocationCacheEnable", aMapLocationClientOption.isLocationCacheEnable());
jSONObject.put("isOnceLocationLatest", aMapLocationClientOption.isOnceLocationLatest());
jSONObject.put("isKillProcess", aMapLocationClientOption.isKillProcess() ? "1" : "0");
boolean z = true;
if (aMapLocationClientOption.getLocationProtocol().ordinal() != 1) {
z = false;
}
jSONObject.put("locationProtocol", z);
jSONObject.put("sensorEnable", aMapLocationClientOption.isSensorEnable());
jSONObject.put("isWifiPassiveScan", aMapLocationClientOption.isWifiScan());
jSONObject.put("isMock", aMapLocationClientOption.isMockEnable());
} catch (Throwable th) {
h(th, "CoreUtil", "getExtraJsn");
}
return jSONObject.toString();
}
public static void f(Context context) {
try {
if (a2.s(o(context))) {
f5256a = "http://abroad.apilocate.amap.com/mobile/binary";
return;
}
if (l == null) {
l = new HashMap<>();
}
l.clear();
l.put("a9a9d23668a1a7ea93de9b21d67e436a", "F13160D440C7D0229DA95450F66AF92154AC84DF088F8CA3100B2E8131D57F3DC67124D4C466056E7A3DFBE035E1B9A4B9DA4DB68AE65A43EDFD92F5C60EF0C9");
l.put("fe643c382e5c3b3962141f1a2e815a78", "FB923EE67A8B4032DAA517DD8CD7A26FF7C25B0C3663F92A0B61251C4FFFA858DF169D61321C3E7919CB67DF8EFEC827");
l.put("b2e8bd171989cb2c3c13bd89b4c1067a", "239CE372F804D4BE4EAFFD183668379BDF274440E6F246AB16BBE6F5D1D30DEACFBBF0C942485727FF12288228760A9E");
l.put("9a571aa113ad987d626c0457828962e6", "D2FF99A88BEB04683D89470D4FA72B1749DA456AB0D0F1A476477CE5A6874F53A9106423D905F9D808C0FCE8E7F1E04AC642F01FE41D0C7D933971F45CBA72B7");
l.put("668319f11506def6208d6afe320dfd52", "53E53D46011A6BBAEA4FAE5442E659E0577CDD336F930C28635C322FB3F51C3C63F7FBAC9EAE448DFA2E5E5D716C4807");
l.put("256b0f26bb2a9506be6cfdb84028ae08", "AF2228680EDC323FBA035362EB7E1E38A0C33E1CF6F6FB805EE553A230CBA754CD9552EB9B546542CBE619E8293151BE");
String a2 = h1.a(i2.h(context));
if (a2 == null || a2.length() == 0 || l == null || !l.containsKey(a2)) {
return;
}
String str = l.get(a2);
String str2 = null;
if (str != null && str.length() > 0) {
str2 = new String(h1.k(l(str), a2), "utf-8");
}
if (str2 == null || str2.length() <= 0 || !str2.contains("http:")) {
return;
}
f5256a = str2;
} catch (Throwable th) {
h(th, "CoreUtil", "checkUrl");
}
}
public static void g(AMapLocation aMapLocation, JSONObject jSONObject) {
if (jSONObject != null) {
try {
if (a2.t(jSONObject, "provider")) {
aMapLocation.setProvider(jSONObject.getString("provider"));
}
if (a2.t(jSONObject, "lon")) {
aMapLocation.setLongitude(jSONObject.getDouble("lon"));
}
if (a2.t(jSONObject, "lat")) {
aMapLocation.setLatitude(jSONObject.getDouble("lat"));
}
if (a2.t(jSONObject, "altitude")) {
aMapLocation.setAltitude(jSONObject.getDouble("altitude"));
}
if (a2.t(jSONObject, "acc")) {
aMapLocation.setAccuracy(Float.parseFloat(jSONObject.getString("acc")));
}
if (a2.t(jSONObject, "accuracy")) {
aMapLocation.setAccuracy((float) jSONObject.getLong("accuracy"));
}
if (a2.t(jSONObject, "speed")) {
aMapLocation.setSpeed((float) jSONObject.getLong("speed"));
}
if (a2.t(jSONObject, "dir")) {
aMapLocation.setBearing((float) jSONObject.getLong("dir"));
}
if (a2.t(jSONObject, "bearing")) {
aMapLocation.setBearing((float) jSONObject.getLong("bearing"));
}
if (a2.t(jSONObject, "citycode")) {
aMapLocation.setCityCode(jSONObject.getString("citycode"));
}
if (a2.t(jSONObject, "address")) {
aMapLocation.setAddress(jSONObject.getString("address"));
}
String string = a2.t(jSONObject, "desc") ? jSONObject.getString("desc") : "";
if (a2.t(jSONObject, "adcode")) {
aMapLocation.setAdCode(jSONObject.getString("adcode"));
}
Bundle bundle = new Bundle();
bundle.putString("citycode", aMapLocation.getCityCode());
bundle.putString("desc", string.toString());
bundle.putString("adcode", aMapLocation.getAdCode());
aMapLocation.setExtras(bundle);
if (a2.t(jSONObject, "country")) {
aMapLocation.setCountry(jSONObject.getString("country"));
}
if (a2.t(jSONObject, "province")) {
aMapLocation.setProvince(jSONObject.getString("province"));
}
if (a2.t(jSONObject, "city")) {
aMapLocation.setCity(jSONObject.getString("city"));
}
if (a2.t(jSONObject, "road")) {
aMapLocation.setRoad(jSONObject.getString("road"));
}
if (a2.t(jSONObject, "street")) {
aMapLocation.setStreet(jSONObject.getString("street"));
}
if (a2.t(jSONObject, "number")) {
aMapLocation.setNumber(jSONObject.getString("number"));
}
if (a2.t(jSONObject, "poiname")) {
aMapLocation.setPoiName(jSONObject.getString("poiname"));
}
if (a2.t(jSONObject, "aoiname")) {
aMapLocation.setAoiName(jSONObject.getString("aoiname"));
}
if (a2.t(jSONObject, "errorCode")) {
aMapLocation.setErrorCode(jSONObject.getInt("errorCode"));
}
if (a2.t(jSONObject, "errorInfo")) {
aMapLocation.setErrorInfo(jSONObject.getString("errorInfo"));
}
if (a2.t(jSONObject, "locationType")) {
aMapLocation.setLocationType(jSONObject.getInt("locationType"));
}
if (a2.t(jSONObject, "locationDetail")) {
aMapLocation.setLocationDetail(jSONObject.getString("locationDetail"));
}
if (a2.t(jSONObject, "time")) {
aMapLocation.setTime(jSONObject.getLong("time"));
}
if (a2.t(jSONObject, "district")) {
aMapLocation.setDistrict(jSONObject.getString("district"));
}
if (a2.t(jSONObject, "isOffset")) {
aMapLocation.setOffset(jSONObject.getBoolean("isOffset"));
}
if (a2.t(jSONObject, "poiid")) {
aMapLocation.setBuildingId(jSONObject.getString("poiid"));
}
if (a2.t(jSONObject, "floor")) {
aMapLocation.setFloor(jSONObject.getString("floor"));
}
} catch (Throwable th) {
h(th, "CoreUtil", "transformLocation");
}
}
}
public static void h(Throwable th, String str, String str2) {
if ("reportError".equals(str2)) {
return;
}
try {
th.printStackTrace();
x2.j(th, str, str2);
} catch (Throwable unused) {
}
}
public static boolean i(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 * 124) + i2) == '1';
} catch (Throwable th) {
h(th, "CoreUtil", "isChina");
return true;
}
}
public static String j() {
return f5257b;
}
public static String k(Context context) {
boolean h2 = z1.h(context, "pref", "ddex", false);
if (h2) {
n = h2;
if (!f5259d.contains("121")) {
f5259d += ";121";
}
}
boolean h3 = z1.h(context, "pref", "colde", false);
if (h3) {
o = h3;
if (!f5259d.contains("11Z")) {
f5259d += ";11Z";
}
}
return f5259d;
}
public static byte[] l(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) (Integer.parseInt(lowerCase.substring(i3, i3 + 2), 16) & 255);
}
return bArr;
}
public static String m(Context context) {
return n2.d(i2.g(context));
}
public static boolean n() {
if (!p) {
p = true;
q = false;
}
return q;
}
public static String o(Context context) {
try {
return a2.x((TelephonyManager) context.getSystemService("phone"))[0];
} catch (Throwable th) {
h(th, "CoreUtil", "getMcc");
return "";
}
}
public static String[] p() {
return (String[]) f5258c.clone();
}
}