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

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


package com.tencent.mtt.browser.homepage.xhome.guide.newuser;

import android.os.Bundle;
import com.tencent.common.manifest.annotation.CreateMethod;
import com.tencent.common.manifest.annotation.ExtensionImpl;
import com.tencent.common.utils.UrlUtils;
import com.tencent.mtt.browser.download.business.core.NotifyInstallActivity;
import com.tencent.mtt.browser.window.UrlParams;
import com.tencent.mtt.businesscenter.facade.IFrameworkDelegate;
import com.tencent.mtt.businesscenter.facade.IUrlDispatherExtension;
import com.tencent.mtt.log.access.Logs;
import com.tencent.mtt.qbcontext.core.QBContext;
import java.net.URLEncoder;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;

@ExtensionImpl(createMethod = CreateMethod.NEW, extension = IUrlDispatherExtension.class, filters = {"qb://xhome_guide_page*"})
public final class XHomePassiveGuideDispatcher implements IUrlDispatherExtension {

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

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

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

    private final String a(boolean z, String str, String str2) {
        String addParamsToUrl;
        String str3;
        if (z) {
            addParamsToUrl = UrlUtils.addParamsToUrl("https://static.res.qq.com/nav/qbsg/index.html", "source=" + str + "&taskId=" + str2);
            str3 = "UrlUtils.addParamsToUrl(…=$source&taskId=$taskId\")";
        } else {
            addParamsToUrl = UrlUtils.addParamsToUrl("https://static.res.qq.com/nav/qbsg/index.html", "source=" + str + "&taskId=" + str2 + "&isSetDefault=true");
            str3 = "UrlUtils.addParamsToUrl(…askId&isSetDefault=true\")";
        }
        Intrinsics.checkExpressionValueIsNotNull(addParamsToUrl, str3);
        return "qb://qlight?needshare=false&needlongclick=false&enablepulldown=false&needtitle=false&titlebartype=2&layoutfromtop=true&fullscreen=false&reurl=" + URLEncoder.encode(addParamsToUrl, "utf-8");
    }

    private final void a(String str) {
        ((IFrameworkDelegate) QBContext.getInstance().getService(IFrameworkDelegate.class)).doLoad(new UrlParams(UrlUtils.addParamsToUrl("qb://tab/xhome", "PassiveGuide=true&openSource=" + str)));
    }

    private final void a(String str, String str2, String str3, String str4) {
        UrlParams urlParams = new UrlParams("qb://ext/fastcut_newuser_guide_page");
        urlParams.a(new Bundle());
        urlParams.c().putString("guideDialogTitle", str);
        urlParams.c().putString("guideDialogSubTitle", str2);
        urlParams.c().putString("source", str3);
        urlParams.c().putString(NotifyInstallActivity.TASK_ID, str4);
        ((IFrameworkDelegate) QBContext.getInstance().getService(IFrameworkDelegate.class)).doLoad(urlParams);
    }

    @Override
    public boolean lunchCustomUrl(String str, boolean z, Bundle bundle) {
        UrlParams urlParams;
        Logs.c("FASTCUTLOG", "realUrl=" + str);
        String decode = UrlUtils.decode(str);
        String urlParamValue = UrlUtils.getUrlParamValue(decode, "guide_title");
        String urlParamValue2 = UrlUtils.getUrlParamValue(decode, "guide_sub_title");
        String source = UrlUtils.getUrlParamValue(decode, "source");
        String taskId = UrlUtils.getUrlParamValue(decode, NotifyInstallActivity.TASK_ID);
        String openSourceForConverse = UrlUtils.getUrlParamValue(decode, "openSource");
        Intrinsics.checkExpressionValueIsNotNull(openSourceForConverse, "openSourceForConverse");
        a(openSourceForConverse);
        XHomeGuideVideoDownloader a2 = XHomeGuideVideoDownloader.f41509a.a();
        if (a2.h()) {
            if (!a2.g()) {
                Intrinsics.checkExpressionValueIsNotNull(source, "source");
                Intrinsics.checkExpressionValueIsNotNull(taskId, "taskId");
                urlParams = new UrlParams(a(true, source, taskId));
                ((IFrameworkDelegate) QBContext.getInstance().getService(IFrameworkDelegate.class)).doLoad(urlParams);
            }
            Intrinsics.checkExpressionValueIsNotNull(taskId, "taskId");
            a(urlParamValue, urlParamValue2, source, taskId);
        } else {
            if (!a2.f()) {
                Intrinsics.checkExpressionValueIsNotNull(source, "source");
                Intrinsics.checkExpressionValueIsNotNull(taskId, "taskId");
                urlParams = new UrlParams(a(false, source, taskId));
                ((IFrameworkDelegate) QBContext.getInstance().getService(IFrameworkDelegate.class)).doLoad(urlParams);
            }
            Intrinsics.checkExpressionValueIsNotNull(taskId, "taskId");
            a(urlParamValue, urlParamValue2, source, taskId);
        }
        return true;
    }
}