万能钥匙.apk(点击下载) / UploadNetworkInfo.java


package com.appara.video.report.task;

import com.appara.core.BLHttp;
import com.appara.core.BLLog;
import com.appara.video.report.ReportManager;

public class UploadNetworkInfo implements Runnable {
    public static final int NETWORK_AUTH = 256;
    public static final int NETWORK_OFFLINE = 0;
    public static final int NETWORK_ONLINE = 1;

    /* renamed from: a  reason: collision with root package name */
    private String f3290a;

    /* renamed from: b  reason: collision with root package name */
    private String f3291b;

    public UploadNetworkInfo(String str, String str2) {
        this.f3291b = str;
        this.f3290a = str2;
    }

    private static int a() {
        BLHttp bLHttp = new BLHttp("http://check02.51y5.net/cp.a?time=" + System.currentTimeMillis());
        bLHttp.setTimeout(5000, 5000);
        bLHttp.setUseCaches(false);
        byte[] bArr = bLHttp.get();
        if (bArr == null || bArr.length == 0) {
            BLLog.e("network error");
            return 0;
        } else if (bArr.length != 1 || bArr[0] != 48) {
            return 256;
        } else {
            BLLog.i("check successfully");
            return 1;
        }
    }

    public void run() {
        ReportManager.reportPlayer(this.f3291b, this.f3290a, "network", a(), null, null);
    }
}