i自然 v1.5.2版本的 MD5 值为:4186de3133535afd3ad8a76e7e4d0eff
以下内容为反编译后的 z986z.java 源代码,内容仅作参考
package com.iflytek.idata.extension;
import android.content.Context;
import android.content.SharedPreferences;
import android.text.TextUtils;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant;
import com.iflytek.idata.extension.z235z;
import org.droidparts.contract.Constants;
import org.json.JSONObject;
public class z986z implements Runnable {
private Context a;
private z235z.z895z b = new z895z();
public z986z(Context context) {
this.a = context;
}
@Override
public void run() {
IFlyCollectorExt iFlyCollectorExt;
byte[] d;
try {
if (!com.iflytek.idata.extension.z743z.z235z.a(this.a) || (d = (iFlyCollectorExt = IFlyCollectorExt.getInstance(this.a)).d()) == null) {
return;
}
z235z z235zVar = new z235z();
z235zVar.b(20000);
z235zVar.a(1);
StringBuilder sb = new StringBuilder();
sb.append("product=freelog&appid=" + iFlyCollectorExt.getAppId());
String subId = iFlyCollectorExt.getSubId();
if (!TextUtils.isEmpty(subId)) {
sb.append("&subid=" + subId);
}
sb.append("&size=" + d.length + "&platform=android&source=daas&pv=1.1");
z235zVar.a("https://log.iflytek.com/log", sb.toString(), d);
z235zVar.a(this.b);
z235zVar.a();
} catch (Throwable th) {
com.iflytek.idata.extension.z743z.z895z.c("Collector", "exception occur while upload:" + th.toString());
}
}
public void a(String str) {
try {
JSONObject optJSONObject = new JSONObject(str).optJSONObject(HiAnalyticsConstant.Direction.RESPONSE);
if (optJSONObject != null) {
String optString = optJSONObject.optString("des");
if (!TextUtils.isEmpty(optString)) {
SharedPreferences b = com.iflytek.idata.extension.z743z.z235z.b(this.a);
String string = b.getString("ifly_dynamic_business_conf", "");
SharedPreferences.Editor edit = b.edit();
if ("no".equals(optString)) {
if (!TextUtils.isEmpty(string)) {
edit.putString("ifly_dynamic_business_conf", "");
edit.apply();
}
} else if (!optString.equals(string)) {
edit.putString("ifly_dynamic_business_conf", optString);
edit.apply();
}
}
String optString2 = optJSONObject.optString("ver");
if (TextUtils.isEmpty(optString2) || optString2.equals(IFlyCollectorExt.getInstance(this.a).a())) {
return;
}
new Thread(new com.iflytek.idata.extension.z895z(this.a, true)).start();
}
} catch (Throwable th) {
com.iflytek.idata.extension.z743z.z895z.b("Collector", "parse result error:" + th.toString());
}
}
class z895z implements z235z.z895z {
z895z() {
}
@Override
public void a(z235z z235zVar, byte[] bArr) {
if (bArr != null) {
try {
String str = new String(bArr, Constants.UTF8);
if (z235z.a(str)) {
return;
}
com.iflytek.idata.extension.z743z.z895z.a("Collector", "upload success");
z986z.this.a(str);
} catch (Throwable th) {
a(new Exception(th));
}
}
}
@Override
public void a(Exception exc) {
com.iflytek.idata.extension.z743z.z895z.b("Collector", "update error:" + exc);
}
}
}