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

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


package com.tencent.mtt.qqgamesdkbridge;

import android.app.Activity;
import android.content.Context;
import android.graphics.Color;
import android.os.Build;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.Window;
import android.view.WindowManager;
import com.tencent.mtt.R;
import com.tencent.mtt.base.skin.MttResources;
import com.tencent.mtt.base.stat.StatManager;
import com.tencent.mtt.base.utils.DeviceUtils;
import com.tencent.mtt.base.wup.GUIDManager;
import com.tencent.mtt.qqgamesdkbridge.callback.IGetGameLoadingMsg;
import com.tencent.mtt.qqgamesdkbridge.protocol.NFA.GetSmallGameTxtRsp;
import com.tencent.mtt.qqgamesdkbridge.service.AdMiniGameInfoProxy;
import com.tencent.mtt.qqgamesdkbridge.util.WupUtil;
import com.tencent.mtt.view.dialog.QBDialogBase;
import qb.a.g;

public class QQGameSdkLoadingDialog extends QBDialogBase {

    public QQGameSdkLoadingView f69695a;

    public QQGameSdkLoadingDialog(Context context) {
        super(context, R.style.ty);
        requestWindowFeature(1);
        Activity activity = (Activity) this.mContext;
        Window window = getWindow();
        if (window != null && (activity.getWindow().getAttributes().flags & 1024) == 0) {
            window.clearFlags(1024);
        }
        a(window);
        this.f69695a = new QQGameSdkLoadingView(context);
        WupUtil.a().a(QQGameServiceImpl.getInstance().f69705a.f69748a, TextUtils.isEmpty(AdMiniGameInfoProxy.a().b()) ? GUIDManager.a().f() : AdMiniGameInfoProxy.a().b(), new IGetGameLoadingMsg() {
            @Override
            public void a(GetSmallGameTxtRsp getSmallGameTxtRsp, int i) {
                if (getSmallGameTxtRsp == null) {
                    return;
                }
                QQGameSdkLoadingDialog.this.a(getSmallGameTxtRsp);
            }
        });
        setContentView(this.f69695a);
    }

    private void a() {
        Window window = getWindow();
        if (window != null) {
            WindowManager.LayoutParams attributes = window.getAttributes();
            attributes.gravity = 51;
            attributes.x = 0;
            attributes.y = 0;
            attributes.width = DeviceUtils.af();
            attributes.height = -1;
            window.setAttributes(attributes);
        }
    }

    private void a(Window window) {
        if (window == null) {
            return;
        }
        window.setBackgroundDrawable(MttResources.i(g.f85882a));
        window.addFlags(131072);
        if (Build.VERSION.SDK_INT >= 21) {
            window.getDecorView().setSystemUiVisibility(1280);
            window.addFlags(Integer.MIN_VALUE);
            window.setStatusBarColor(0);
        }
    }

    public void a(GetSmallGameTxtRsp getSmallGameTxtRsp) {
        this.f69695a.f69698b.setUrl(TextUtils.isEmpty(getSmallGameTxtRsp.icon) ? "https://img.nfa.qq.com/gmaster_prod/15989184/gmaster_58slbcwlm000_gmaster_34ufyvi2yn80_game_loading.png" : getSmallGameTxtRsp.icon);
        this.f69695a.f69699c.setText(TextUtils.isEmpty(getSmallGameTxtRsp.name) ? "小游戏" : getSmallGameTxtRsp.name);
        this.f69695a.f69700d.f69685a.setText(TextUtils.isEmpty(getSmallGameTxtRsp.ageTxt) ? "—— 由第三方提供 ——" : getSmallGameTxtRsp.ageTxt);
        this.f69695a.f69700d.f69686b.setText(TextUtils.isEmpty(getSmallGameTxtRsp.thirdTxt) ? "抵制不良游戏,拒绝盗版游戏。注意自我保护,谨防受骗上当。\n适当游戏益脑,沉迷游戏伤身。合理安排时间,享受健康生活。" : getSmallGameTxtRsp.thirdTxt);
        this.f69695a.f69697a.f69688b.setText(TextUtils.isEmpty(getSmallGameTxtRsp.loadingTxt1) ? "欢迎你来到小游戏" : getSmallGameTxtRsp.loadingTxt1);
        this.f69695a.f69697a.f69690d.setText(TextUtils.isEmpty(getSmallGameTxtRsp.loadingTxt2) ? "为你优化游戏环境, 请稍侯" : getSmallGameTxtRsp.loadingTxt2);
        this.f69695a.f69697a.g = TextUtils.isEmpty(getSmallGameTxtRsp.doneTxt1) ? "配置完成" : getSmallGameTxtRsp.doneTxt1;
        this.f69695a.f69697a.h = TextUtils.isEmpty(getSmallGameTxtRsp.doneTxt2) ? "立即进入游戏" : getSmallGameTxtRsp.doneTxt2;
        this.f69695a.setBackgroundColor(Color.parseColor(TextUtils.isEmpty(getSmallGameTxtRsp.bgColor) ? "#D8D8D8" : getSmallGameTxtRsp.bgColor));
    }

    @Override
    public void dismiss() {
        this.f69695a.f69697a.b();
        super.dismiss();
    }

    @Override
    public boolean onKeyDown(int i, KeyEvent keyEvent) {
        if (i == 4) {
            StatManager.b().c("DW3341_" + QQGameServiceImpl.getInstance().f69705a.f69749b);
        }
        return super.onKeyDown(i, keyEvent);
    }

    @Override
    public void show() {
        a();
        this.f69695a.f69697a.f69687a.e();
        this.f69695a.f69697a.a();
        super.show();
    }
}