PSP Dragon Emulator v1.0版本的 MD5 值为:c6379fb6b63c27b6a7d2f2f6f6f51637
以下内容为反编译后的 IconStatisticsEvent.java 源代码,内容仅作参考
package com.airpush.injector.internal.icons;
import android.content.Context;
import com.airpush.AirPush;
import com.airpush.injector.internal.common.Logger;
import com.airpush.injector.internal.common.old.Config;
import com.airpush.injector.internal.common.old.Data;
import com.airpush.injector.internal.common.utils.DeviceInfoUtils;
import com.airpush.injector.internal.statistics.StatisticsEvent;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import org.json.JSONException;
import org.json.JSONObject;
public class IconStatisticsEvent extends StatisticsEvent {
public IconStatisticsEvent(Context context, IconCreative iconCreative) {
super("https://api.airpush.com/v2/api.php", "POST");
addPostBody(context, iconCreative);
}
void addPostBody(Context context, IconCreative iconCreative) {
HashMap hashMap = new HashMap();
hashMap.put("supports", DeviceInfoUtils.getSupportedFeatures(context).toString());
try {
new Data(context);
hashMap.putAll(Data.setValues(context, AirPush.getApiKey(), AirPush.getAppId()));
} catch (Exception e) {
e.printStackTrace();
}
JSONObject jSONObject = new JSONObject();
Iterator<IconData> it = iconCreative.getShortcuts().iterator();
while (it.hasNext()) {
IconData next = it.next();
try {
jSONObject.put(next.getCampaignId(), next.getCreativeId());
} catch (JSONException unused) {
}
}
hashMap.put("model", Config.MODEL_LOG);
hashMap.put("action", Config.ACTION_SET_ICON_INSTALL_TRACKING);
hashMap.put("event", Config.EVENT_iINSTALL);
hashMap.put("campaigncreativedata", jSONObject.toString());
StringBuilder sb = new StringBuilder();
for (Map.Entry entry : hashMap.entrySet()) {
try {
if (sb.length() != 0) {
sb.append('&');
}
sb.append(URLEncoder.encode((String) entry.getKey(), "UTF-8"));
sb.append('=');
sb.append(URLEncoder.encode(String.valueOf(entry.getValue()), "UTF-8"));
} catch (Exception e2) {
Logger.logInternalError(e2);
}
}
Logger.logInternalEvent("Icon statistics event parameters: " + hashMap.toString());
setPostBody(sb.toString().getBytes());
}
}