同程有借 v1.0.0版本的 MD5 值为:e33397cdbab33543d0c134ec96d77fb8
以下内容为反编译后的 ax.java 源代码,内容仅作参考
package com.loc;
import android.content.Context;
import anet.channel.util.HttpConstant;
import com.huawei.hms.framework.common.ContainerUtils;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import org.json.JSONObject;
public final class ax extends r {
public JSONObject f9176a = null;
public Context f9177b = null;
@Override
public final Map<String, String> a() {
HashMap hashMap = new HashMap();
hashMap.put(HttpConstant.CONTENT_TYPE, "application/x-www-form-urlencoded");
hashMap.put(HttpConstant.ACCEPT_ENCODING, "gzip");
hashMap.put("User-Agent", "AMAP SDK Android core 4.3.2");
hashMap.put("X-INFO", n.a(this.f9177b));
hashMap.put("platinfo", String.format("platform=Android&sdkversion=%s&product=%s", "4.3.2", "core"));
hashMap.put("logversion", "2.1");
return hashMap;
}
@Override
public final String b() {
return q.a().b() ? "https://restsdk.amap.com/sdk/compliance/params" : "http://restsdk.amap.com/sdk/compliance/params";
}
@Override
public final String c_() {
return "core";
}
@Override
public final byte[] d() {
try {
StringBuffer stringBuffer = new StringBuffer();
JSONObject jSONObject = this.f9176a;
if (jSONObject != null) {
Iterator<String> keys = jSONObject.keys();
while (keys.hasNext()) {
String next = keys.next();
String obj = this.f9176a.get(next).toString();
stringBuffer.append(next + ContainerUtils.KEY_VALUE_DELIMITER + URLEncoder.encode(obj, "utf-8") + "&");
}
}
stringBuffer.append("output=json");
String f9 = l.f(this.f9177b);
stringBuffer.append("&key=".concat(String.valueOf(f9)));
String a9 = n.a();
stringBuffer.append("&ts=".concat(String.valueOf(a9)));
stringBuffer.append("&scode=" + n.a(this.f9177b, a9, "key=".concat(String.valueOf(f9))));
return stringBuffer.toString().getBytes("utf-8");
} catch (Throwable th) {
th.printStackTrace();
return null;
}
}
@Override
public final Map<String, String> e() {
return null;
}
}