4399游戏盒 v7.2.1.31版本的 MD5 值为:951717f45e3fda95c8a358caf4ca93e1
以下内容为反编译后的 g.java 源代码,内容仅作参考
package com.m4399.feedback.c;
import android.support.v4.util.ArrayMap;
import android.text.TextUtils;
import com.framework.EnvironmentMode;
import com.framework.config.Config;
import com.framework.config.SysConfigKey;
import com.framework.helpers.AppNativeHelper;
import com.framework.net.HttpHeaderKey;
import com.framework.net.HttpResponseListener;
import com.framework.net.ILoadPageEventListener;
import com.framework.providers.NetworkDataProvider;
import com.framework.utils.JSONUtils;
import com.huawei.hms.framework.common.ContainerUtils;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant;
import com.m4399.gamecenter.plugin.main.fastplay.helper.FastPlayAuthHelper;
import com.m4399.gamecenter.service.SN;
import com.tencent.smtt.sdk.TbsVideoCacheTask;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Map;
import org.json.JSONObject;
public class g extends NetworkDataProvider {
private File mFile;
private String mKey;
@Override
protected int getApiType() {
return 5;
}
public void setFile(String str) {
this.mFile = new File(str);
}
public String getKey() {
return this.mKey;
}
@Override
public void parseResponseData(JSONObject jSONObject) {
this.mKey = JSONUtils.getString("myfile", JSONUtils.getJSONObject("success", jSONObject));
}
@Override
protected void buildRequestParams(String str, Map map) {
map.put("myfile", this.mFile);
}
@Override
public boolean isEmpty() {
return this.mKey.isEmpty();
}
@Override
public void clearAllData() {
this.mKey = null;
}
@Override
public void loadData(ILoadPageEventListener iLoadPageEventListener) {
super.loadData(getUrl(), 2, iLoadPageEventListener);
}
private String getUrl() {
char c;
ArrayMap arrayMap = new ArrayMap();
arrayMap.put("chl", SN.COMMON);
arrayMap.put(TbsVideoCacheTask.KEY_VIDEO_CACHE_PARAM_FILENAME, this.mFile.getName());
StringBuilder sb = new StringBuilder();
sb.append(System.currentTimeMillis());
String str = "";
sb.append("");
arrayMap.put("timestamp", sb.toString());
arrayMap.put(FastPlayAuthHelper.KEY_UDID, (String) Config.getValue(SysConfigKey.APP_UDID));
String str2 = (String) Config.getValue(SysConfigKey.HTTP_ENVIRONMENT);
int hashCode = str2.hashCode();
if (hashCode == -1012222381) {
if (str2.equals(EnvironmentMode.ONLINE)) {
c = 3;
}
c = 65535;
} else if (hashCode == 3557) {
if (str2.equals(EnvironmentMode.OT)) {
c = 2;
}
c = 65535;
} else if (hashCode != 3646) {
if (hashCode == 3556498 && str2.equals(EnvironmentMode.TESTER)) {
c = 1;
}
c = 65535;
} else {
if (str2.equals(EnvironmentMode.T2)) {
c = 0;
}
c = 65535;
}
if (c == 0 || c == 1) {
str = "http://mobi.4399tech.com/upload/?";
} else if (c == 2 || c == 3) {
str = "http://stat.m.img4399.com/upload/?";
}
ArrayList arrayList = new ArrayList(arrayMap.keySet());
Collections.sort(arrayList);
StringBuilder sb2 = new StringBuilder();
for (int i = 0; i < arrayList.size(); i++) {
String str3 = (String) arrayList.get(i);
String str4 = (String) arrayMap.get(str3);
if (!TextUtils.isEmpty(str4)) {
arrayMap.put(str3, str4);
sb2.append(str4);
sb2.append(HiAnalyticsConstant.REPORT_VAL_SEPARATOR);
}
if (i != 0) {
str = str + ContainerUtils.FIELD_DELIMITER;
}
str = str + str3 + ContainerUtils.KEY_VALUE_DELIMITER + str4;
}
return str + "&sign=" + AppNativeHelper.getMd5(sb2.toString() + "%A1^mP#6");
}
@Override
public void buildRequestHeader(HttpResponseListener httpResponseListener) {
super.buildRequestHeader(httpResponseListener);
httpResponseListener.addHeader(HttpHeaderKey.TOKEN, (String) Config.getValue(SysConfigKey.AUTH_LOGIN_TOKEN));
httpResponseListener.addHeader(HttpHeaderKey.MAUTH_CODE, (String) Config.getValue(SysConfigKey.AUTH_LOGIN_CODE));
httpResponseListener.addHeader(HttpHeaderKey.MUDID, (String) Config.getValue(SysConfigKey.APP_UDID));
httpResponseListener.addHeader(HttpHeaderKey.DEVICEID, (String) Config.getValue(SysConfigKey.UNIQUEID));
httpResponseListener.addHeader(HttpHeaderKey.HTTPS_ENV, "trace/offline");
}
}