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

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


package com.tencent.paysdk.network;

import com.tencent.paysdk.AuthSDK;
import com.tencent.paysdk.api.IVideoAuthHttpClientCreate;
import com.tencent.paysdk.api.IVideoAuthRequest;
import com.tencent.paysdk.log.VipAuthSDKLog;
import com.tencent.paysdk.network.RequestWrapper;
import com.tencent.paysdk.report.InternalReport;
import com.tencent.paysdk.util.GsonUtil;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import tmsdk.common.gourd.vine.IActionReportService;

public final class VipAuthRequestUtil {

    public static final Companion f76882c = new Companion(null);

    public static String f76880a = new Function0<String>() {
        @Override
        public final String invoke() {
            return AuthSDK.f76816a.l() ? "https://vip.video.qq.com/rpc/trpc.pre_project.ws_pre_auth.WsPreAuthService/GetVideoMergePreAuth" : "https://testvip.video.qq.com/rpc/trpc.pre_project.ws_pre_auth.WsPreAuthService/GetVideoMergePreAuth";
        }
    }.invoke();

    public static String f76881b = new Function0<String>() {
        @Override
        public final String invoke() {
            return AuthSDK.f76816a.l() ? "https://vip.video.qq.com/rpc/com.tencent.qqlive.protocol.pb.DefinitionService/getVideoDefinitionAuthInfo" : "https://testvip.video.qq.com/rpc/com.tencent.qqlive.protocol.pb.DefinitionService/getVideoDefinitionAuthInfo";
        }
    }.invoke();

    private static IVideoAuthHttpClientCreate f76883d = new DefaultHttpClientCreate();
    private static final AtomicInteger e = new AtomicInteger();

    public static final class Companion {
        private Companion() {
        }

        public Companion(DefaultConstructorMarker defaultConstructorMarker) {
            this();
        }

        private final int a() {
            int incrementAndGet;
            do {
                incrementAndGet = VipAuthRequestUtil.e.incrementAndGet();
                if (incrementAndGet > 0) {
                    return incrementAndGet;
                }
            } while (!VipAuthRequestUtil.e.compareAndSet(incrementAndGet, 1));
            return 1;
        }

        public final String b() {
            StringBuilder sb = new StringBuilder();
            AuthSDK.b();
            List<String> i = AuthSDK.i();
            int size = i.size();
            for (int i2 = 0; i2 < size; i2++) {
                if (i2 > 0) {
                    sb.append(IActionReportService.COMMON_SEPARATOR);
                }
                sb.append(i.get(i2));
            }
            String sb2 = sb.toString();
            Intrinsics.checkNotNullExpressionValue(sb2, "buffer.toString()");
            return sb2;
        }

        public final int a(final RequestWrapper requestWrapper, final IResponseCallback responseCallback) {
            Intrinsics.checkNotNullParameter(requestWrapper, "requestWrapper");
            Intrinsics.checkNotNullParameter(responseCallback, "responseCallback");
            final int a2 = a();
            NetworkDispatcher.a(new Runnable() {
                @Override
                public final void run() {
                    IVideoAuthHttpClientCreate iVideoAuthHttpClientCreate;
                    String b2;
                    InternalReport.f76887a.a(InternalReport.f76887a.a());
                    try {
                        iVideoAuthHttpClientCreate = VipAuthRequestUtil.f76883d;
                        IVideoAuthRequest a3 = iVideoAuthHttpClientCreate.a();
                        String b3 = RequestWrapper.this.b();
                        Intrinsics.checkNotNullExpressionValue(b3, "requestWrapper.url");
                        a3.a(b3);
                        a3.a("Custom-Devices", " guid=" + AuthSDK.b().f().a());
                        RequestWrapper.RequestType a4 = RequestWrapper.this.a();
                        Intrinsics.checkNotNull(a4);
                        a3.a(a4);
                        a3.b("Referer", "https://m.film.qq.com/player/payview/?from=tva");
                        b2 = VipAuthRequestUtil.f76882c.b();
                        a3.c("Cookie", b2);
                        String a5 = GsonUtil.a(RequestWrapper.this.c());
                        Intrinsics.checkNotNullExpressionValue(a5, "GsonUtil.toJson(requestWrapper.iRequestData)");
                        a3.d("application/json;charset=utf-8", a5);
                        responseCallback.a(a2, a3.b());
                    } catch (Exception e) {
                        responseCallback.a(a2);
                        VipAuthSDKLog.b("VipAuthRequestUtil", e.toString());
                    }
                }
            });
            return a2;
        }

        public final void a(IVideoAuthHttpClientCreate iVideoAuthHttpClientCreate) {
            if (iVideoAuthHttpClientCreate != null) {
                VipAuthRequestUtil.f76883d = iVideoAuthHttpClientCreate;
            }
        }
    }
}