吉他调音器专业版 v2.30701.8版本的 MD5 值为:9d8c85f04999890638bf11bd08e611f4
以下内容为反编译后的 TenseCityUtil.java 源代码,内容仅作参考
package com.bafenyi.zh.bafenyilib.util;
import android.util.Log;
import com.bafenyi.zh.bafenyilib.BFYMethodListener;
import com.bafenyi.zh.bafenyilib.config.BFYConfig;
import com.bafenyi.zh.bafenyilib.request.BFYRequest;
import com.heytap.mcssdk.a.a;
import com.tencent.bugly.Bugly;
import java.io.IOException;
import java.util.HashMap;
import java.util.Objects;
import n.b0;
import n.e0;
import n.f;
import n.g;
import n.g0;
import n.h0;
import org.json.JSONException;
import org.json.JSONObject;
public class TenseCityUtil {
public static void requestTenseCity(final String str, final String str2, final String str3, final BFYMethodListener.ITenseCityCallback iTenseCityCallback) {
new Thread(new Runnable() {
@Override
public void run() {
b0 b0Var = new b0();
HashMap hashMap = new HashMap();
hashMap.put("appId", str);
hashMap.put(a.f2772m, str2);
hashMap.put("timeStamp", str3);
String sign = BFYRequest.getSign(hashMap);
e0.a aVar = new e0.a();
aVar.b("https://api.8fenyi.cn/rest/comm/v1/checkCity?appId=" + str + "&timeStamp=" + str3 + "&sign=" + sign);
aVar.b();
b0Var.a(aVar.a()).a(new g() {
@Override
public void onFailure(f fVar, IOException iOException) {
Log.i("tenseCity", "获取参数错误: " + iOException.getMessage());
BFYConfig.setTenseCity(true);
iTenseCityCallback.onShowResult(false, true, "", iOException.getMessage());
}
@Override
public void onResponse(f fVar, g0 g0Var) throws IOException {
String str4;
boolean z;
String string = ((h0) Objects.requireNonNull(g0Var.a())).string();
Log.e("tenseCity", "获取参数成功: " + string);
if (string.contains("success") && string.contains("isTenseCity") && string.contains("ipCity")) {
try {
JSONObject jSONObject = new JSONObject(new JSONObject(string).getString("data"));
str4 = jSONObject.getString("ipCity");
try {
z = jSONObject.getBoolean("isTenseCity");
} catch (JSONException e2) {
e = e2;
e.printStackTrace();
z = true;
BFYConfig.setTenseCity(z);
iTenseCityCallback.onShowResult(true, z, str4, "");
if (z) {
return;
} else {
return;
}
}
} catch (JSONException e3) {
e = e3;
str4 = "";
}
BFYConfig.setTenseCity(z);
iTenseCityCallback.onShowResult(true, z, str4, "");
if (z || str4.contains("非敏感时间段")) {
return;
}
PreferenceUtil.put("needCityRequest", Bugly.SDK_IS_DEV);
return;
}
BFYConfig.setTenseCity(true);
iTenseCityCallback.onShowResult(false, true, "", string);
}
});
}
}).start();
}
}