QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685

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


package com.tencent.luggage.wxa.mx;

import android.net.Uri;
import android.text.TextUtils;
import android.webkit.URLUtil;
import com.huawei.hms.framework.common.ContainerUtils;
import com.tencent.common.http.ContentType;
import com.tencent.luggage.wxa.mt.j;
import com.tencent.luggage.wxa.my.d;
import com.tencent.mtt.video.internal.media.IMediaPlayerInter;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.atomic.AtomicInteger;

public class c {

    private static AtomicInteger f22635c = new AtomicInteger(10000);

    private static AtomicInteger f22636d = new AtomicInteger(10000);

    private int f22637a;

    private boolean f22638b;
    private com.tencent.luggage.wxa.mw.a e;
    private int f;
    private final ExecutorService g;

    public String a() {
        return "http://127.0.0.1:" + this.f;
    }

    public String a(String str) {
        return a(str, true, true, ContentType.MIME_MP4, 90);
    }

    public String a(String str, boolean z, boolean z2, String str2, int i) {
        String str3;
        String str4;
        if (!com.tencent.luggage.wxa.mv.a.a().d() || this.f22637a > 3 || this.g.isShutdown() || this.g.isTerminated()) {
            com.tencent.luggage.wxa.my.b.a(4, "VideoProxy", "getUrl, proxy disabled or server shutdown");
            com.tencent.luggage.wxa.mv.a.a().f().a();
            return com.tencent.luggage.wxa.my.b.c(str);
        }
        if (!URLUtil.isHttpUrl(str) && !URLUtil.isHttpsUrl(str)) {
            String c2 = com.tencent.luggage.wxa.my.b.c(str);
            if (com.tencent.luggage.wxa.my.b.d(c2)) {
                str = c2;
            } else if (!com.tencent.luggage.wxa.my.b.e(c2)) {
                return c2;
            }
            z2 = false;
        }
        if (j.a(str)) {
            if (!com.tencent.luggage.wxa.mv.a.a().e()) {
                com.tencent.luggage.wxa.my.b.a(4, "VideoProxy", "getUrl, hls proxy disabled");
                return str;
            }
            str2 = "application/vnd.apple.mpegurl";
            z2 = false;
        }
        try {
            str3 = URLEncoder.encode(str, "UTF-8");
        } catch (UnsupportedEncodingException e) {
            com.tencent.luggage.wxa.my.b.a(6, "VideoProxy", "invalid url " + com.tencent.luggage.wxa.my.b.a(e));
            str3 = "";
        }
        if (TextUtils.isEmpty(str3)) {
            com.tencent.luggage.wxa.my.b.a(6, "VideoProxy", "url is empty " + str3);
            return str;
        }
        String str5 = a() + "/" + Uri.parse(str).getLastPathSegment() + "?url" + ContainerUtils.KEY_VALUE_DELIMITER + str3;
        if (z2) {
            str5 = str5 + "&enableCache=1";
        }
        if (i == 90 || i == 10 || i == -1) {
            str5 = str5 + "&priority=" + i;
        }
        String str6 = null;
        if (!TextUtils.isEmpty(str2)) {
            try {
                str4 = URLEncoder.encode(str2, "UTF-8");
            } catch (UnsupportedEncodingException unused) {
                com.tencent.luggage.wxa.my.b.a(6, "VideoProxy", "unable to encode contentType " + str2);
                str4 = null;
            }
            if (!TextUtils.isEmpty(str4)) {
                str5 = str5 + "&contentType=" + str4;
            }
        }
        if (z) {
            str6 = System.currentTimeMillis() + "" + f22635c.getAndIncrement();
        }
        if (str6 != null) {
            str5 = str5 + "&id=" + str6;
        }
        if (this.f22638b) {
            try {
                str5 = str5 + "&secret=" + d.a(IMediaPlayerInter.ITvkAdvListener.KEY_ADV_DES, d.a(), com.tencent.luggage.wxa.my.b.a(str));
            } catch (Exception e2) {
                com.tencent.luggage.wxa.my.b.a(6, "VideoProxy", "encode failed:" + com.tencent.luggage.wxa.my.b.a(e2));
                this.f22638b = false;
            }
        }
        com.tencent.luggage.wxa.my.b.a(4, "VideoProxy", "getUrl, url:" + str + ", proxyUrl:" + str5);
        return str5;
    }

    public long b(String str) {
        if (TextUtils.isEmpty(str) || this.e == null) {
            return 0L;
        }
        return this.e.a(com.tencent.luggage.wxa.my.b.a(str));
    }
}