工作空间 v3.6.5.2版本的 MD5 值为:58e65af156c65a63bf64ed2e64960853
以下内容为反编译后的 Na.java 源代码,内容仅作参考
package com.loc;
import android.content.Context;
import com.amap.api.location.AMapLocationClientOption;
import com.uusafe.base.modulesdk.module.global.CommGlobal;
import com.uusafe.emm.policy.PolicyProvider;
import com.uusafe.h5app.library.internal.res.H5Lan;
import com.uusafe.net.model.HttpHeaders;
import com.xiaomi.mipush.sdk.Constants;
import java.util.HashMap;
import java.util.Locale;
public final class Na {
private static Na f5686a;
X f5687b;
private int f5688c = 0;
private int f5689d = Sa.g;
private boolean f5690e = false;
AMapLocationClientOption.GeoLanguage f = AMapLocationClientOption.GeoLanguage.DEFAULT;
private Na() {
this.f5687b = null;
this.f5687b = X.a();
}
public static Na a() {
if (f5686a == null) {
f5686a = new Na();
}
return f5686a;
}
public final Oa a(Context context, byte[] bArr, String str, boolean z) {
String str2;
try {
HashMap hashMap = new HashMap();
Oa oa = new Oa(context, Sa.b());
try {
hashMap.put("Content-Type", HttpHeaders.HEAD_VALUE_CONTENT_TYPE_FILE);
hashMap.put("Accept-Encoding", HttpHeaders.HEAD_KEY_ACCEPT_ENCODING_VALUE);
hashMap.put("gzipped", "1");
hashMap.put("Connection", "Keep-Alive");
hashMap.put("User-Agent", "AMAP_Location_SDK_Android 3.8.0");
hashMap.put("KEY", hb.f(context));
hashMap.put("enginever", "4.9");
String a2 = jb.a();
String a3 = jb.a(context, a2, "key=" + hb.f(context));
hashMap.put("ts", a2);
hashMap.put("scode", a3);
hashMap.put("encr", "1");
oa.f = hashMap;
String str3 = z ? "loc" : "locf";
oa.m = true;
oa.k = String.format(Locale.US, "platform=Android&sdkversion=%s&product=%s&loc_channel=%s", "3.8.0", str3, 3);
oa.j = z;
oa.g = str;
oa.h = ab.a(bArr);
oa.a(pb.a(context));
HashMap hashMap2 = new HashMap();
hashMap2.put("output", "bin");
hashMap2.put(PolicyProvider.TABLE_POLICY, "3103");
int i = Ma.f5684a[this.f.ordinal()];
if (i != 1) {
if (i != 2) {
str2 = i == 3 ? "language:en" : "language:cn";
}
hashMap2.put("custom", str2);
} else {
hashMap2.remove("custom");
}
oa.l = hashMap2;
oa.a(this.f5689d);
oa.b(this.f5689d);
if (this.f5690e) {
oa.g = oa.c().replace("http", "https");
return oa;
}
return oa;
} catch (Throwable unused) {
return oa;
}
} catch (Throwable unused2) {
return null;
}
}
public final C0420ea a(Oa oa) throws Throwable {
long b2 = ab.b();
X x = this.f5687b;
C0420ea a2 = X.a(oa, this.f5690e);
this.f5688c = Long.valueOf(ab.b() - b2).intValue();
return a2;
}
public final String a(Context context, double d2, double d3) {
String str;
try {
HashMap hashMap = new HashMap();
Oa oa = new Oa(context, Sa.b());
hashMap.clear();
hashMap.put("Content-Type", "application/x-www-form-urlencoded");
hashMap.put("Connection", "Keep-Alive");
hashMap.put("User-Agent", "AMAP_Location_SDK_Android 3.8.0");
HashMap hashMap2 = new HashMap();
hashMap2.put("custom", "26260A1F00020002");
hashMap2.put("key", hb.f(context));
int i = Ma.f5684a[this.f.ordinal()];
if (i != 1) {
if (i != 2) {
str = i == 3 ? H5Lan.H5_ENGLISH : "zh-CN";
}
hashMap2.put("language", str);
} else {
hashMap2.remove("language");
}
String a2 = jb.a();
String a3 = jb.a(context, a2, sb.b(hashMap2));
hashMap2.put("ts", a2);
hashMap2.put("scode", a3);
oa.b(("output=json&radius=1000&extensions=all&location=" + d3 + Constants.ACCEPT_TIME_SEPARATOR_SP + d2).getBytes("UTF-8"));
oa.m = false;
oa.j = true;
oa.k = String.format(Locale.US, "platform=Android&sdkversion=%s&product=%s&loc_channel=%s", "3.8.0", "loc", 3);
oa.l = hashMap2;
oa.f = hashMap;
oa.g = "http://restapi.amap.com/v3/geocode/regeo";
oa.a(pb.a(context));
oa.a(Sa.g);
oa.b(Sa.g);
X x = this.f5687b;
return new String(X.b(oa), CommGlobal.charsetName);
} catch (Throwable unused) {
return null;
}
}
public final String a(byte[] bArr, Context context, String str) {
try {
HashMap hashMap = new HashMap();
La la = new La();
hashMap.clear();
hashMap.put("Content-Type", "application/x-www-form-urlencoded");
hashMap.put("Connection", "Keep-Alive");
la.f5682d = hashMap;
la.f = str;
la.g = bArr;
la.a(pb.a(context));
la.a(Sa.g);
la.b(Sa.g);
X x = this.f5687b;
return new String(X.b(la), CommGlobal.charsetName);
} catch (Throwable unused) {
return null;
}
}
public final void a(long j, boolean z, AMapLocationClientOption.GeoLanguage geoLanguage) {
try {
this.f5690e = z;
this.f5689d = Long.valueOf(j).intValue();
if (geoLanguage == null) {
this.f = AMapLocationClientOption.GeoLanguage.DEFAULT;
} else {
this.f = geoLanguage;
}
} catch (Throwable th) {
Sa.a(th, "netmanager", "setOption");
}
}
public final int b() {
return this.f5688c;
}
}