PSP Dragon Emulator v1.0版本的 MD5 值为:c6379fb6b63c27b6a7d2f2f6f6f51637

以下内容为反编译后的 VastStatistics.java 源代码,内容仅作参考


package com.airpush.injector.internal.ads.types.vast;

import com.airpush.AirPush;
import com.airpush.injector.internal.common.Logger;
import crash.io.fabric.sdk.android.services.common.AbstractSpiCall;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Map;
public class VastStatistics {
    public void sendStats(final HashMap<String, Object> hashMap) throws IOException {
        if (AirPush.isTestModeEnabled()) {
            return;
        }
        new Thread(new Runnable() {
            @Override
            public void run() {
                try {
                    VastStatistics.this.send(hashMap);
                } catch (IOException e) {
                    Logger.logInternalError(e);
                }
            }
        }).start();
    }

    public void send(HashMap<String, Object> hashMap) throws IOException {
        URLConnection openConnection = new URL("https://api.airpush.com/Vast/handle_events.php").openConnection();
        HttpURLConnection httpURLConnection = (HttpURLConnection) openConnection;
        httpURLConnection.setRequestMethod("POST");
        openConnection.setUseCaches(false);
        openConnection.setDoOutput(true);
        openConnection.setConnectTimeout(AbstractSpiCall.DEFAULT_TIMEOUT);
        openConnection.setReadTimeout(AbstractSpiCall.DEFAULT_TIMEOUT);
        StringBuilder sb = new StringBuilder();
        for (Map.Entry<String, Object> entry : hashMap.entrySet()) {
            try {
                if (sb.length() != 0) {
                    sb.append('&');
                }
                sb.append(URLEncoder.encode(entry.getKey(), "UTF-8"));
                sb.append('=');
                sb.append(URLEncoder.encode(String.valueOf(entry.getValue()), "UTF-8"));
            } catch (Exception unused) {
            }
        }
        openConnection.getOutputStream().write(sb.toString().getBytes());
        openConnection.getOutputStream().close();
        httpURLConnection.getResponseCode();
    }
}