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

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


package com.tencent.mtt.boot.browser.splash;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.text.style.ClickableSpan;
import android.view.View;
import android.view.animation.TranslateAnimation;
import android.widget.FrameLayout;
import com.tencent.common.task.QBTask;
import com.tencent.mtt.ContextHolder;
import com.tencent.mtt.base.stat.CommStatData;
import com.tencent.mtt.base.stat.StatManager;
import com.tencent.mtt.base.utils.NotchUtil;
import com.tencent.mtt.browser.bra.addressbar.AddressBarController;
import com.tencent.mtt.browser.window.UrlParams;
import com.tencent.mtt.businesscenter.facade.IFrameworkDelegate;
import com.tencent.mtt.hippy.qb.views.HippyQBViewTouchAndDrawData;
import com.tencent.mtt.qbcontext.core.QBContext;
import com.tencent.mtt.qbinfo.QBInfoUtils;
import com.tencent.mtt.view.common.QBTextView;
import com.tencent.mtt.view.toast.MttToaster;
import com.tencent.qqlive.module.videoreport.collect.EventCollector;
import com.tencent.rmp.operation.OperationUtils;
import com.tencent.smtt.utils.Apn;
import java.util.concurrent.Callable;

public class NewUserInterestSplashView extends SplashViewBase implements View.OnClickListener {

    OperationUtils.SplashResInfo f34041a;

    private Context f34042b;

    private QBTextView f34043c;

    private long f34044d;
    private long e;
    private boolean f;
    private SoftwareLicenseView g;
    private Bitmap h;
    private boolean i;

    class AnonymousClass2 extends ClickableSpan {

        final NewUserInterestSplashView f34046a;

        @Override
        public void onClick(View view) {
            this.f34046a.a("服务协议", "file:///android_asset/license.html");
        }
    }

    class AnonymousClass3 extends ClickableSpan {

        final NewUserInterestSplashView f34047a;

        @Override
        public void onClick(View view) {
            this.f34047a.a("隐私政策", "file:///android_asset/privacy.html");
        }
    }

    public NewUserInterestSplashView(Context context) {
        super(context);
        this.f34044d = System.currentTimeMillis();
        this.e = 0L;
        this.f = false;
        this.i = false;
        this.f34042b = context;
        setBackgroundColor(-1);
        setFocusable(true);
        StatManager.b().c("CIS016");
        StatManager.b().c("CIS021");
    }

    private void a(int i) {
        if (this.f) {
            return;
        }
        this.f = true;
        CommStatData commStatData = new CommStatData();
        commStatData.sAppKey = "MTT_FLASH";
        commStatData.put("lc", QBInfoUtils.a());
        commStatData.put("flash", "77");
        commStatData.put(HippyQBViewTouchAndDrawData.GES_TYPE_CLICK, i + "");
        commStatData.put("time", (System.currentTimeMillis() - this.f34044d) + "");
        StatManager.b().a(commStatData);
    }

    private void a(Canvas canvas) {
        boolean z = this.i;
        Bitmap bitmap = this.h;
        if (bitmap == null || bitmap.isRecycled()) {
            return;
        }
        if (this.f34041a == null) {
            this.f34041a = new OperationUtils.SplashResInfo();
            OperationUtils.SplashResInfo splashResInfo = this.f34041a;
            splashResInfo.f79148d = 344.0f;
            splashResInfo.e = 116.0f;
            splashResInfo.f79147c = 110.0f;
            splashResInfo.f79146b = this.h.getHeight();
            this.f34041a.f79145a = this.h.getWidth();
            this.f34041a.f = this.h.getWidth();
            this.f34041a.g = this.h.getHeight();
        }
        OperationUtils.a(this, canvas, this.h, this.f34041a);
    }

    public void a(String str, String str2) {
        this.g = new SoftwareLicenseView(getContext(), str, str2);
        FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(-1, -1);
        if (NotchUtil.a(ContextHolder.getAppContext())) {
            this.g.setPadding(0, AddressBarController.a().u(), 0, 0);
        }
        this.g.setLayoutParams(layoutParams);
        this.g.setCloseButtonOnClickListener(this);
        this.g.setBackgroundColor(-1);
        this.g.consumeTouchEvent();
        addView(this.g);
        TranslateAnimation translateAnimation = new TranslateAnimation(1, 0.0f, 1, 0.0f, 1, 1.0f, 1, 0.0f);
        translateAnimation.setDuration(300L);
        this.g.startAnimation(translateAnimation);
    }

    @Override
    public boolean a() {
        try {
            this.f34044d = System.currentTimeMillis();
            return true;
        } catch (Exception unused) {
            return false;
        }
    }

    @Override
    public void dispatchDraw(Canvas canvas) {
        a(canvas);
        super.dispatchDraw(canvas);
    }

    @Override
    public boolean e() {
        return true;
    }

    public void g() {
        SplashManager.getInstance().k().n();
    }

    @Override
    public void onClick(View view) {
        EventCollector.getInstance().onViewClickedBefore(view);
        if (view == this.f34043c) {
            a(1);
            if (Apn.isNetworkAvailable(this.f34042b)) {
                ((IFrameworkDelegate) QBContext.getInstance().getService(IFrameworkDelegate.class)).doLoad(new UrlParams("https://quan.qq.com/operate/inguide?addressbar=hide&type=b").b(33));
                this.G.S = "https://quan.qq.com/operate/inguide?addressbar=hide&type=b";
            }
            SplashManager.getInstance().k().n();
            StatManager.b().c("CIS020");
        }
        if (view.getId() == 4353) {
            if (System.currentTimeMillis() - this.e >= 500) {
                this.e = System.currentTimeMillis();
                SoftwareLicenseView softwareLicenseView = this.g;
                if (softwareLicenseView != null) {
                    removeView(softwareLicenseView);
                    this.g = null;
                }
            }
        } else if (view.getId() == 100) {
            StatManager.b().c("CIS023");
        } else if (view.getId() == 101) {
            StatManager.b().c("CIS022");
            MttToaster.show("需要获得你的同意后才可继续使用QQ浏览器提供的服务", 1);
            QBTask.b((Callable) new Callable<Object>() {
                @Override
                public Object call() throws Exception {
                    return null;
                }
            });
        }
        EventCollector.getInstance().onViewClicked(view);
    }
}