package com.tencent.mm.plugin.wallet_core.ui;

import android.app.Dialog;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.graphics.Color;
import android.net.Uri;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.MarginLayoutParams;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
import com.google.android.gms.common.util.CrashUtils.ErrorDialogData;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.ai.m;
import com.tencent.mm.ai.p;
import com.tencent.mm.compatible.util.d;
import com.tencent.mm.g.a.ap;
import com.tencent.mm.g.a.gq;
import com.tencent.mm.g.a.iy;
import com.tencent.mm.g.a.se;
import com.tencent.mm.g.a.uv;
import com.tencent.mm.g.b.a.bg;
import com.tencent.mm.kernel.g;
import com.tencent.mm.plugin.fingerprint.b.i;
import com.tencent.mm.plugin.report.service.h;
import com.tencent.mm.plugin.wallet_core.c.aa;
import com.tencent.mm.plugin.wallet_core.c.k;
import com.tencent.mm.plugin.wallet_core.c.n;
import com.tencent.mm.plugin.wallet_core.c.y;
import com.tencent.mm.plugin.wallet_core.id_verify.util.RealnameGuideHelper;
import com.tencent.mm.plugin.wallet_core.model.Orders;
import com.tencent.mm.plugin.wallet_core.model.Orders$RecommendTinyAppInfo;
import com.tencent.mm.plugin.wallet_core.model.Orders.Commodity;
import com.tencent.mm.plugin.wallet_core.model.Orders.DiscountInfo;
import com.tencent.mm.plugin.wallet_core.model.Orders.Promotions;
import com.tencent.mm.plugin.wallet_core.model.Orders.ShowInfo;
import com.tencent.mm.plugin.wallet_core.model.r;
import com.tencent.mm.plugin.wallet_core.ui.view.WalletSuccPageAwardWidget;
import com.tencent.mm.pluginsdk.ui.applet.CdnImageView;
import com.tencent.mm.pluginsdk.wallet.PayInfo;
import com.tencent.mm.protocal.protobuf.aeq;
import com.tencent.mm.protocal.protobuf.bnu;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.bo;
import com.tencent.mm.ui.base.a;
import com.tencent.mm.wallet_core.c.ad;
import com.tencent.mm.wallet_core.c.z;
import com.tencent.mm.wallet_core.ui.WalletTextView;
import com.tencent.mm.wallet_core.ui.e;
import com.tencent.tmassistantsdk.openSDK.TMQQDownloaderOpenSDKConst;
import com.tencent.ytcommon.BuildConfig;
import d.a.a.c;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;

@a(3)
public class WalletOrderInfoNewUI extends WalletOrderInfoUI {
    private String igi = null;
    private String mAppId = BuildConfig.FLAVOR;
    private String oXY;
    private c pSK;
    private WalletSuccPageAwardWidget pSL;
    private ViewGroup pSM;
    private ViewGroup pSN;
    private ViewGroup pSO;
    private TextView pSP;
    private boolean pSQ = false;
    private com.tencent.mm.sdk.b.c<uv> pSR = new 14(this);
    private PayInfo pVL;
    private String pVl;
    private TextView pWB;
    private com.tencent.mm.sdk.b.c pap = new 1(this);
    private String pdC = null;
    private boolean tEC = false;
    private String tED;
    private String tEE;
    private b tEG;
    private HashMap<String, a> tEH = new HashMap();
    private String tEI;
    private String tEK = "-1";
    private Button tEL;
    private ImageView tEM;
    private ViewGroup tEN;
    private CdnImageView tEO;
    private TextView tEP;
    private TextView tEQ;
    private View tER;
    private Button tES;
    private ViewGroup tET;
    private boolean tEU = false;
    private boolean tEV = false;
    private boolean tEW = false;
    private com.tencent.mm.wallet_core.c tEX;
    protected Set<String> tIc = null;
    private List<Commodity> tId = null;
    private Orders$RecommendTinyAppInfo tIe;
    private String tIf;
    private Promotions tIg = null;
    private TextView tIh;
    private TextView tIi;
    private WalletTextView tIj;
    private ViewGroup tIk;
    private ViewGroup tIl;
    private ViewGroup tIm;
    private ViewGroup tIn;
    private ViewGroup tIo;
    private ViewGroup tIp;
    private TextView tIq;
    private CheckBox tIr;
    private ViewGroup tIs;
    private CdnImageView tIt;
    private TextView tIu;
    private TextView tIv;
    private Button tIw;
    private boolean tIx = false;
    private com.tencent.mm.sdk.b.c tIy = new 9(this);
    private Orders tog;
    private int tzY;

    public void onWindowFocusChanged(boolean z) {
        super.onWindowFocusChanged(z);
        AppMethodBeat.at(this, z);
    }

    public WalletOrderInfoNewUI() {
        AppMethodBeat.i(47450);
        AppMethodBeat.o(47450);
    }

    public void finish() {
        AppMethodBeat.i(47451);
        ab.i("MicroMsg.WalletOrderInfoNewUI", "finish this %s %s", new Object[]{this, bo.dpG()});
        if (this.pSQ) {
            AppMethodBeat.o(47451);
            return;
        }
        super.finish();
        this.pSQ = true;
        AppMethodBeat.o(47451);
    }

    public void onCreate(Bundle bundle) {
        AppMethodBeat.i(47452);
        super.onCreate(bundle);
        if (d.iW(21)) {
            if (d.iW(23)) {
                getWindow().setStatusBarColor(-1);
                getWindow().getDecorView().setSystemUiVisibility(8192);
            } else {
                getWindow().setStatusBarColor(Color.parseColor("#E5E5E5"));
            }
        }
        AM(4);
        this.tIc = new HashSet();
        com.tencent.mm.wallet_core.c aE = com.tencent.mm.wallet_core.a.aE(this);
        this.pVL = (PayInfo) this.mBundle.getParcelable("key_pay_info");
        this.oXY = this.mBundle.getString("key_trans_id");
        this.mBundle.getInt("key_pay_type", -1);
        ab.i("MicroMsg.WalletOrderInfoNewUI", "mTransId %s", new Object[]{this.oXY});
        this.tog = cRD();
        if (this.tog != null) {
            AM(0);
            c(this.tog);
            if (!(aE == null || this.tog == null || this.pVL == null)) {
                int i;
                this.mAppId = this.pVL.appId;
                boolean dNG = aE.dNG();
                com.tencent.mm.plugin.wallet_core.utils.d.a(this, this.mBundle, 7);
                int i2 = this.mBundle.getInt("key_support_bankcard", 1) == 2 ? 2 : 1;
                h hVar = h.pYm;
                Object[] objArr = new Object[7];
                objArr[0] = Integer.valueOf(this.pVL.cIf);
                objArr[1] = Boolean.valueOf(this.pVL.cIf == 3);
                if (dNG) {
                    i = 1;
                } else {
                    i = 2;
                }
                objArr[2] = Integer.valueOf(i);
                objArr[3] = Integer.valueOf(z.dNX());
                objArr[4] = Integer.valueOf((int) (this.tog.pTN * 100.0d));
                objArr[5] = this.tog.pcl;
                objArr[6] = Integer.valueOf(i2);
                hVar.e(10691, objArr);
            }
            if (!((r.cPI().cQg() || aE == null || !aE.dNG()) && com.tencent.mm.model.r.YI())) {
                com.tencent.mm.model.r.YJ();
            }
            if (this.tog == null || this.tog.tAq == null || this.tog.tAq.size() <= 0) {
                ab.c("MicroMsg.WalletOrderInfoNewUI", "mOrders info is Illegal!", new Object[0]);
                com.tencent.mm.ui.base.h.a(this.mController.ylL, 2131305049, 0, new OnClickListener() {
                    public final void onClick(DialogInterface dialogInterface, int i) {
                        AppMethodBeat.i(47444);
                        WalletOrderInfoNewUI.this.done();
                        AppMethodBeat.o(47444);
                    }
                });
            } else {
                this.tId = this.tog.tAq;
                ab.i("MicroMsg.WalletOrderInfoNewUI", "init data commoditys size: %s", new Object[]{Integer.valueOf(this.tId.size())});
                this.oXY = ((Commodity) this.tId.get(0)).cAa;
                this.pVl = ((Commodity) this.tId.get(0)).cAa;
                if (!(this.pVL == null || aE == null || (!aE.dNF() && !aE.dNG()))) {
                    a(new y(cNH(), 21), true, true);
                }
            }
            ((i) g.K(i.class)).g(this);
        } else {
            ab.c("MicroMsg.WalletOrderInfoNewUI", "mOrders info is Illegal!", new Object[0]);
            com.tencent.mm.ui.base.h.a(this.mController.ylL, 2131305049, 0, new 19(this));
        }
        initView();
        this.tEX = dOD();
        cRo();
        if (this.pVL != null && this.pVL.cIf == 46) {
            ab.i("MicroMsg.WalletOrderInfoNewUI", "early send result");
            uv uvVar = new uv();
            Intent intent = new Intent();
            intent.putExtras(this.mBundle);
            if (this.tog != null) {
                intent.putExtra("key_total_fee", this.tog.pTN);
            }
            if (this.tEX != null) {
                intent.putExtra("key_is_clear_failure", this.tEX.mqu.getInt("key_is_clear_failure", -1));
            }
            uvVar.cRF.intent = intent;
            uvVar.cRF.cRH = 1;
            uvVar.cRF.czZ = cNH();
            uvVar.cRF.result = intent.getBooleanExtra("intent_pay_end", false) ? -1 : 0;
            com.tencent.mm.sdk.b.a.xxA.m(uvVar);
        }
        if (this.tog == null || this.tog.tAO == null || this.tog.tAO.tBL != 1) {
            nf(1979);
            nf(2948);
            nf(2710);
            com.tencent.mm.sdk.b.a.xxA.c(this.tIy);
            com.tencent.mm.sdk.b.a.xxA.c(this.pap);
            this.pSR.dnU();
            this.tEW = true;
            ad.e(this.pVL == null ? 0 : this.pVL.cIf, this.pVL == null ? BuildConfig.FLAVOR : this.pVL.czZ, 16, BuildConfig.FLAVOR);
            AppMethodBeat.o(47452);
            return;
        }
        ab.i("MicroMsg.WalletOrderInfoNewUI", "simple cashier");
        cRH();
        AppMethodBeat.o(47452);
    }

    public void onResume() {
        AppMethodBeat.i(47453);
        super.onResume();
        ab.i("MicroMsg.WalletOrderInfoNewUI", "onResume, isFirstInit: %s activityPromotions: %s, isClickTinyappActivity: %s, isClickActivity: %s, recommendTinyAppInfo: %s, exposureInfo: %s", new Object[]{Boolean.valueOf(this.tEW), this.tIg, Boolean.valueOf(this.tEU), Boolean.valueOf(this.tEV), this.tIe, this.pSK});
        if (WalletSuccPageAwardWidget.a(this.pSK)) {
            this.pSL.onResume();
            AppMethodBeat.o(47453);
        } else if (this.tEW) {
            this.tEW = false;
            AppMethodBeat.o(47453);
        } else if (this.tIg == null || !this.tEV) {
            if (this.tEU && this.tIe != null) {
                a(new aa(this.tIe.tBx, this.tIe.tBz, this.tIe.tBA, this.tIe.tBB, cNH(), this.pVl, this.tIe.tBC), true, true);
            }
            AppMethodBeat.o(47453);
        } else {
            ab.i("MicroMsg.WalletOrderInfoNewUI", "do query payAward, queryAwardStatusParams==null: %s %s, isCallQueryPayAward: %s", new Object[]{Boolean.valueOf(bo.isNullOrNil(this.tIg.tBv)), this.tIg.tBv, Boolean.valueOf(this.tIx)});
            if (this.tIx) {
                AppMethodBeat.o(47453);
                return;
            }
            this.tIx = true;
            if (bo.isNullOrNil(this.tIg.tBv)) {
                a(new aa(this.tIg.ttW, this.tIg.tBp, this.tIg.tzP, this.tIg.tzQ, cNH(), this.pVl, this.tIg.tzR), true, true);
                AppMethodBeat.o(47453);
                return;
            }
            a(new k(this.tIg.tBv, this.tIg.ttW), true, true);
            AppMethodBeat.o(47453);
        }
    }

    public final void initView() {
        Commodity commodity;
        Commodity commodity2;
        AppMethodBeat.i(47454);
        if (getSupportActionBar() != null) {
            getSupportActionBar().hide();
        }
        this.tEM = (ImageView) findViewById(2131828704);
        this.pWB = (TextView) findViewById(2131828705);
        this.tIh = (TextView) findViewById(2131828953);
        this.tIi = (TextView) findViewById(2131828955);
        this.tIj = (WalletTextView) findViewById(2131828956);
        this.pSP = (TextView) findViewById(2131826987);
        this.tEL = (Button) findViewById(2131828708);
        showHomeBtn(false);
        enableBackMenu(false);
        CharSequence string = getString(2131296944);
        if (this.pVL == null || this.pVL.cIf != 2) {
            if (!(this.tog == null || bo.isNullOrNil(this.tog.tAB))) {
                string = this.tog.tAB;
            }
        } else if (this.tog != null && !bo.isNullOrNil(this.tog.tAB)) {
            string = this.tog.tAB;
        } else if (!bo.isNullOrNil(this.pVL.tRb)) {
            string = getString(2131296530) + this.pVL.tRb;
        } else if (!(bo.isNullOrNil(this.pVL.appId) || bo.isNullOrNil(com.tencent.mm.pluginsdk.model.app.g.t(this, this.pVL.appId)))) {
            string = getString(2131296530) + com.tencent.mm.pluginsdk.model.app.g.t(this, this.pVL.appId);
        }
        this.tEL.setText(string);
        this.tEL.setOnClickListener(new 15(this));
        this.tIk = (ViewGroup) findViewById(2131828957);
        this.pSN = (ViewGroup) findViewById(2131826978);
        this.tET = (ViewGroup) findViewById(2131828707);
        this.pSM = (ViewGroup) findViewById(2131826977);
        this.pSO = (ViewGroup) findViewById(2131826986);
        this.tIl = (ViewGroup) findViewById(2131828959);
        this.tIm = (ViewGroup) findViewById(2131828961);
        this.tIo = (ViewGroup) findViewById(2131828958);
        this.tIn = (ViewGroup) findViewById(2131828963);
        this.tEN = (ViewGroup) findViewById(2131827111);
        this.tEO = (CdnImageView) findViewById(2131827112);
        this.tEO.setUseSdcardCache(true);
        this.tEP = (TextView) findViewById(2131827114);
        this.tEQ = (TextView) findViewById(2131827113);
        this.tES = (Button) findViewById(2131827115);
        this.tER = findViewById(2131826995);
        this.tIp = (ViewGroup) findViewById(2131828966);
        this.tIq = (TextView) findViewById(2131828968);
        this.tIr = (CheckBox) findViewById(2131828967);
        this.tIs = (ViewGroup) findViewById(2131828969);
        this.tIt = (CdnImageView) findViewById(2131828970);
        this.tIt.setUseSdcardCache(true);
        this.tIv = (TextView) findViewById(2131828972);
        this.tIu = (TextView) findViewById(2131828971);
        this.tIw = (Button) findViewById(2131828973);
        this.tET.setVisibility(4);
        this.pSL = (WalletSuccPageAwardWidget) findViewById(2131826996);
        cRo();
        if (!(this.tog == null || this.tId == null || this.tId.size() <= 0)) {
            commodity = (Commodity) this.tId.get(0);
            this.tIh.setText(commodity.pca);
            this.tIi.setText(e.atq(commodity.pcl));
            this.tIj.setText(String.format("%.2f", new Object[]{Double.valueOf(commodity.kCJ)}));
        }
        String str = "MicroMsg.WalletOrderInfoNewUI";
        String str2 = "is_use_show_info: %s";
        Object[] objArr = new Object[1];
        objArr[0] = Integer.valueOf(this.tog == null ? 0 : this.tog.tAC);
        ab.i(str, str2, objArr);
        if (this.tog == null || this.tog.tAC != 1) {
            cRE();
            if (!(this.tog == null || this.tId == null || this.tId.size() <= 0)) {
                commodity = (Commodity) this.tId.get(0);
                if (commodity.tAZ != null) {
                    TextView textView = (TextView) this.tIn.findViewById(2131828965);
                    ((TextView) this.tIn.findViewById(2131828964)).setText(commodity.tAZ.tBD);
                    textView.setText(commodity.tAZ.tBE);
                    this.tIn.setVisibility(0);
                    this.tIk.setVisibility(0);
                }
            }
            this.tIm.setVisibility(8);
            this.tIl.setVisibility(8);
            if (!(this.tog == null || this.tId == null || this.tId.size() <= 0)) {
                commodity = (Commodity) this.tId.get(0);
                if (!bo.isNullOrNil(commodity.tAX)) {
                    ((TextView) findViewById(2131828960)).setText(commodity.tAX);
                    this.tIl.setVisibility(0);
                    this.tIk.setVisibility(0);
                }
                if (!bo.isNullOrNil(commodity.tAV)) {
                    ((TextView) findViewById(2131828962)).setText(commodity.tAV);
                    this.tIm.setVisibility(0);
                    this.tIk.setVisibility(0);
                }
            }
        } else {
            this.tIl.setVisibility(8);
            this.tIm.setVisibility(8);
            this.pSO.setVisibility(8);
            this.pSM.setVisibility(8);
            this.tIn.setVisibility(8);
            cRG();
        }
        cRF();
        if (this.tId == null || this.tId.size() <= 0) {
            commodity2 = null;
        } else {
            commodity = (Commodity) this.tId.get(0);
            if (!(commodity == null || commodity.tBa == null || commodity.tBa.size() <= 0)) {
                for (Promotions promotions : commodity.tBa) {
                    if (promotions.tBw != null && promotions.tBo == 5) {
                        this.pSK = promotions.tBw;
                        ab.i("MicroMsg.WalletOrderInfoNewUI", "get exposureInfo: %s, from promotion: %s", new Object[]{this.pSK, Integer.valueOf(promotions.tBo)});
                        commodity2 = commodity;
                        break;
                    }
                }
            }
            commodity2 = commodity;
        }
        if (WalletSuccPageAwardWidget.a(this.pSK)) {
            if (commodity2 != null) {
                MarginLayoutParams marginLayoutParams = (MarginLayoutParams) this.pSL.getLayoutParams();
                List list = commodity2.tAU;
                if ((commodity2.tAR < 0.0d || commodity2.kCJ >= commodity2.tAR) && (list == null || list.size() <= 0)) {
                    marginLayoutParams.topMargin = com.tencent.mm.bz.a.fromDPToPix(this, 50);
                } else {
                    marginLayoutParams.topMargin = 0;
                }
                this.pSL.setLayoutParams(marginLayoutParams);
            }
            this.pSL.a(this, this.pSK, this.oXY, false, (ImageView) findViewById(2131824036));
            this.pSL.init();
            this.pSL.setVisibility(0);
            ImageView imageView = (ImageView) findViewById(2131824036);
            imageView.post(new 16(this, imageView));
        } else {
            nk(true);
            this.pSL.setVisibility(8);
        }
        cRn();
        AppMethodBeat.o(47454);
    }

    private void cRn() {
        int i;
        AppMethodBeat.i(47455);
        int i2 = 0;
        if (this.tEN.getVisibility() == 0) {
            i2 = 1;
        }
        if (this.tIk.getVisibility() == 0) {
            i2++;
        }
        if (this.tIp.getVisibility() == 0) {
            i2++;
        }
        if (this.tIs.getVisibility() == 0) {
            i = i2 + 1;
        } else {
            i = i2;
        }
        MarginLayoutParams marginLayoutParams = (MarginLayoutParams) this.tEM.getLayoutParams();
        MarginLayoutParams marginLayoutParams2 = (MarginLayoutParams) this.tIh.getLayoutParams();
        if (i >= 3) {
            i = com.tencent.mm.bz.a.fromDPToPix(this, 40);
            marginLayoutParams.topMargin = i;
            marginLayoutParams2.topMargin = i;
        } else {
            i = com.tencent.mm.bz.a.fromDPToPix(this, 70);
            marginLayoutParams.topMargin = i;
            marginLayoutParams2.topMargin = i;
        }
        this.tEM.setLayoutParams(marginLayoutParams);
        this.tIh.setLayoutParams(marginLayoutParams2);
        this.tET.post(new 17(this));
        AppMethodBeat.o(47455);
    }

    private void cRo() {
        AppMethodBeat.i(47456);
        if (!(this.tog == null || this.tId == null || this.tId.size() <= 0)) {
            int i;
            for (Commodity commodity : this.tId) {
                if ("1".equals(commodity.pce)) {
                    i = 0;
                    break;
                }
            }
            i = 1;
            this.pWB.setVisibility(0);
            if (i == 0) {
                this.pWB.setText(2131305070);
            } else if (!bo.isNullOrNil(this.tog.tAj) && !bo.isNullOrNil(this.tog.tAj.trim())) {
                this.pWB.setText(this.tog.tAj);
                AppMethodBeat.o(47456);
                return;
            } else if (this.tog.tuo != 1) {
                this.pWB.setText(2131305069);
                AppMethodBeat.o(47456);
                return;
            } else {
                this.pWB.setText(2131305068);
                AppMethodBeat.o(47456);
                return;
            }
        }
        AppMethodBeat.o(47456);
    }

    private void cRE() {
        AppMethodBeat.i(47457);
        this.tIk.setVisibility(8);
        this.pSN.setVisibility(8);
        this.pSM.setVisibility(8);
        this.pSO.setVisibility(8);
        if (!(this.tog == null || this.tId == null || this.tId.size() <= 0)) {
            Commodity commodity = (Commodity) this.tId.get(0);
            List list = commodity.tAU;
            String str = "MicroMsg.WalletOrderInfoNewUI";
            String str2 = "discountInfoList: %s, size: %s";
            Object[] objArr = new Object[2];
            objArr[0] = list;
            objArr[1] = Integer.valueOf(list != null ? list.size() : 0);
            ab.i(str, str2, objArr);
            if (list != null && list.size() > 0) {
                this.pSN.removeAllViews();
                int i = 0;
                while (true) {
                    int i2 = i;
                    if (i2 >= list.size()) {
                        break;
                    }
                    DiscountInfo discountInfo = (DiscountInfo) list.get(i2);
                    TextView textView = new TextView(this.mController.ylL);
                    textView.setLayoutParams(new LayoutParams(-2, -2));
                    textView.setTextSize(1, 14.0f);
                    textView.setTextColor(Color.parseColor("#FA962A"));
                    if (discountInfo.tBm > 0.0d) {
                        textView.setText(discountInfo.pOz + e.e(discountInfo.tBm / 100.0d, this.tog.pcl));
                    } else {
                        textView.setText(discountInfo.pOz);
                    }
                    this.pSN.addView(textView);
                    i = i2 + 1;
                }
                this.pSN.setVisibility(0);
                this.tIk.setVisibility(0);
                this.pSM.setVisibility(0);
            }
            if (commodity.tAR >= 0.0d && commodity.kCJ < commodity.tAR) {
                this.pSP.setText(e.e(commodity.tAR, commodity.pcl));
                this.pSP.getPaint().setFlags(16);
                this.pSO.setVisibility(0);
                this.tIk.setVisibility(0);
            }
        }
        AppMethodBeat.o(47457);
    }

    private void cRF() {
        AppMethodBeat.i(47458);
        this.tIp.setVisibility(8);
        if (this.tog != null) {
            c(this.tog);
            if (this.tId != null && this.tId.size() > 0) {
                Commodity commodity = (Commodity) this.tId.get(0);
                ab.i("MicroMsg.WalletOrderInfoNewUI", "setSubscribeBizInfo, hasSubscribeBiz: %s", new Object[]{Boolean.valueOf(commodity.tBb)});
                if (commodity.tBb && commodity.tBa != null && commodity.tBa.size() > 0) {
                    for (Promotions promotions : commodity.tBa) {
                        if (promotions.type == Orders.tAP) {
                            break;
                        }
                    }
                    Promotions promotions2 = null;
                    ab.i("MicroMsg.WalletOrderInfoNewUI", "subscribePromotions: %s", new Object[]{promotions2});
                    if (!(promotions2 == null || bo.isNullOrNil(promotions2.pcm))) {
                        this.pVl = commodity.cAa;
                        h.pYm.e(13033, new Object[]{Integer.valueOf(1), promotions2.pcm, promotions2.url, promotions2.name, this.pVl});
                        this.tIq.setText(getString(2131305076, new Object[]{promotions2.name}));
                        this.tIf = promotions2.pcm;
                        this.tIr.setVisibility(0);
                        if (this.tIc.contains(promotions2.pcm)) {
                            this.tIr.setChecked(true);
                        } else {
                            this.tIr.setChecked(false);
                        }
                        this.tIp.setOnClickListener(new 20(this));
                        this.tIp.setVisibility(0);
                    }
                }
            }
        }
        AppMethodBeat.o(47458);
    }

    private void cRG() {
        AppMethodBeat.i(47459);
        this.tIo.setVisibility(8);
        this.tIo.removeAllViews();
        if (this.tog != null && this.tog.tAC == 1 && this.tog.tAE != null && this.tog.tAE.size() > 0) {
            ab.i("MicroMsg.WalletOrderInfoNewUI", "orders.showInfoList: %s %s", new Object[]{this.tog.tAE, Integer.valueOf(this.tog.tAE.size())});
            Iterator it = this.tog.tAE.iterator();
            while (it.hasNext()) {
                ShowInfo showInfo = (ShowInfo) it.next();
                ab.i("MicroMsg.WalletOrderInfoNewUI", "showInfo: %s", new Object[]{showInfo});
                LinearLayout linearLayout = (LinearLayout) getLayoutInflater().inflate(2130971143, this.tIo, false);
                TextView textView = (TextView) linearLayout.findViewById(2131823382);
                TextView textView2 = (TextView) linearLayout.findViewById(2131828952);
                if (!bo.isNullOrNil(showInfo.name)) {
                    textView.setText(showInfo.name);
                }
                if (!bo.isNullOrNil(showInfo.mVA)) {
                    try {
                        textView.setTextColor(Color.parseColor(showInfo.mVA));
                    } catch (Exception e) {
                    }
                }
                if (!bo.isNullOrNil(showInfo.value)) {
                    textView2.setText(showInfo.value);
                }
                if (showInfo.tBK == 1) {
                    textView2.getPaint().setFlags(16);
                }
                if (!bo.isNullOrNil(showInfo.tBF)) {
                    try {
                        textView2.setTextColor(Color.parseColor(showInfo.tBF));
                    } catch (Exception e2) {
                    }
                }
                if (showInfo.tBG == 1) {
                    if (!bo.isNullOrNil(showInfo.tBJ)) {
                        linearLayout.setOnClickListener(new 2(this, showInfo));
                    }
                } else if (showInfo.tBG == 2 && !bo.isNullOrNil(showInfo.tBH)) {
                    linearLayout.setOnClickListener(new 3(this, showInfo));
                }
                this.tIo.addView(linearLayout);
            }
            this.tIk.setVisibility(0);
            this.tIo.setVisibility(0);
        }
        AppMethodBeat.o(47459);
    }

    private void nk(boolean z) {
        AppMethodBeat.i(47460);
        this.tEN.setVisibility(8);
        this.tEV = false;
        this.tEU = false;
        if (this.tog != null) {
            if (this.tId != null && this.tId.size() > 0) {
                final Commodity commodity = (Commodity) this.tId.get(0);
                if (commodity != null) {
                    Promotions promotions;
                    ab.i("MicroMsg.WalletOrderInfoNewUI", "setTinyAppActivityInfo, hasSubscribeBiz: %s", new Object[]{Boolean.valueOf(commodity.tBb)});
                    if (commodity.tBa != null && commodity.tBa.size() > 0) {
                        for (Promotions promotions2 : commodity.tBa) {
                            if (promotions2.type == Orders.tAQ) {
                                promotions = promotions2;
                                break;
                            }
                        }
                    }
                    promotions = null;
                    ab.i("MicroMsg.WalletOrderInfoNewUI", "activityPromotions: %s", new Object[]{promotions});
                    a aVar;
                    MarginLayoutParams marginLayoutParams;
                    List list;
                    if (promotions != null && promotions.ttW > 0 && !bo.isNullOrNil(promotions.tzS)) {
                        this.tIg = promotions;
                        this.tER.setVisibility(8);
                        this.tEO.setRoundCorner(true);
                        this.tES.setEnabled(true);
                        this.tES.setBackgroundResource(2130838000);
                        this.tEQ.setCompoundDrawables(null, null, null, null);
                        aVar = (a) this.tEH.get(promotions.ttW);
                        if (aVar != null) {
                            if (!bo.isNullOrNil(aVar.cIY)) {
                                this.tEO.setUrl(aVar.cIY);
                            }
                            if (!bo.isNullOrNil(aVar.cEh)) {
                                this.tEP.setText(aVar.cEh);
                            }
                            if (!bo.isNullOrNil(aVar.tID)) {
                                this.tES.setText(aVar.tID);
                                this.tES.setBackgroundResource(2130840727);
                            }
                            if (!bo.isNullOrNil(aVar.tzW)) {
                                this.tIg.tBr = aVar.tzW;
                            }
                            if (!bo.isNullOrNil(aVar.ttg)) {
                                this.tIg.tBs = aVar.ttg;
                            }
                            if (aVar.tIE > 0) {
                                this.tIg.tBt = aVar.tIE;
                            }
                        } else {
                            this.tEO.setUrl(promotions.pia);
                            this.tEP.setText(promotions.name);
                            this.tES.setText(promotions.tzS);
                        }
                        RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) this.tEQ.getLayoutParams();
                        if (aVar != null && !bo.isNullOrNil(aVar.title)) {
                            this.tEQ.setText(aVar.title);
                            layoutParams.addRule(15, 0);
                        } else if (bo.isNullOrNil(promotions.title)) {
                            this.tEQ.setVisibility(8);
                            layoutParams.addRule(15, -1);
                        } else {
                            this.tEQ.setText(promotions.title);
                            layoutParams.addRule(15, 0);
                        }
                        this.tEQ.setLayoutParams(layoutParams);
                        this.tES.setVisibility(0);
                        this.tES.setOnClickListener(new 4(this));
                        if (promotions.tBo != 1) {
                            this.tEN.setOnClickListener(new View.OnClickListener() {
                                public final void onClick(View view) {
                                    AppMethodBeat.i(47430);
                                    ab.i("MicroMsg.WalletOrderInfoNewUI", "click activity layout");
                                    WalletOrderInfoNewUI.q(WalletOrderInfoNewUI.this);
                                    AppMethodBeat.o(47430);
                                }
                            });
                        }
                        String str = this.tEK;
                        boolean z2 = true;
                        switch (str.hashCode()) {
                            case 48:
                                if (str.equals("0")) {
                                    z2 = false;
                                    break;
                                }
                                break;
                            case 49:
                                if (str.equals("1")) {
                                    z2 = true;
                                    break;
                                }
                                break;
                            case 50:
                                if (str.equals("2")) {
                                    z2 = true;
                                    break;
                                }
                                break;
                            case 51:
                                if (str.equals(TMQQDownloaderOpenSDKConst.VERIFYTYPE_ALL)) {
                                    z2 = true;
                                    break;
                                }
                                break;
                            case 52:
                                if (str.equals("4")) {
                                    z2 = true;
                                    break;
                                }
                                break;
                            case 1444:
                                if (str.equals("-1")) {
                                    z2 = true;
                                    break;
                                }
                                break;
                        }
                        switch (z2) {
                            case false:
                                this.tES.setEnabled(false);
                                break;
                        }
                        marginLayoutParams = (MarginLayoutParams) this.tEN.getLayoutParams();
                        list = commodity.tAU;
                        if ((commodity.tAR < 0.0d || commodity.kCJ >= commodity.tAR) && (list == null || list.size() <= 0)) {
                            marginLayoutParams.topMargin = com.tencent.mm.bz.a.fromDPToPix(this, 50);
                        } else {
                            marginLayoutParams.topMargin = 0;
                        }
                        this.tEN.setLayoutParams(marginLayoutParams);
                        this.tEN.setVisibility(0);
                        if (z) {
                            h hVar = h.pYm;
                            Object[] objArr = new Object[6];
                            objArr[0] = this.pVl;
                            objArr[1] = Integer.valueOf(1);
                            objArr[2] = Integer.valueOf(promotions.tBo);
                            objArr[3] = this.tEK.equals("-1") ? Integer.valueOf(5) : this.tEK;
                            objArr[4] = Long.valueOf(promotions.ttW);
                            objArr[5] = Long.valueOf(promotions.tzR);
                            hVar.e(13471, objArr);
                        }
                    } else if (!(commodity.tAY == null || bo.isNullOrNil(commodity.tAY.tzW))) {
                        this.tED = commodity.tAY.tzW;
                        this.tEE = commodity.tAY.ttg;
                        this.tzY = commodity.tAY.tzY;
                        this.tIe = commodity.tAY;
                        this.tEO.setUrl(commodity.tAY.tzU);
                        this.tEP.setText(commodity.tAY.tzV);
                        this.tEQ.setText(getString(2131304516));
                        this.tEQ.setVisibility(0);
                        this.tEO.setRoundCorner(true);
                        this.tES.setEnabled(true);
                        this.tES.setBackgroundResource(2130838000);
                        RelativeLayout.LayoutParams layoutParams2 = (RelativeLayout.LayoutParams) this.tEQ.getLayoutParams();
                        layoutParams2.addRule(15, 0);
                        this.tEQ.setLayoutParams(layoutParams2);
                        if (commodity.tAY.tBx > 0) {
                            if (!bo.isNullOrNil(commodity.tAY.tzX)) {
                                this.tES.setVisibility(0);
                                this.tES.setText(commodity.tAY.tzX);
                                this.tER.setVisibility(8);
                            }
                            aVar = (a) this.tEH.get(commodity.tAY.tBx);
                            if (aVar != null) {
                                if (!bo.isNullOrNil(aVar.tzU)) {
                                    this.tEO.setUrl(aVar.tzU);
                                }
                                if (!bo.isNullOrNil(aVar.tzV)) {
                                    this.tEP.setText(aVar.tzV);
                                }
                                if (!bo.isNullOrNil(aVar.tzX)) {
                                    this.tES.setText(aVar.tzX);
                                    this.tES.setBackgroundResource(2130840727);
                                }
                                if (!bo.isNullOrNil(aVar.tzW)) {
                                    this.tED = aVar.tzW;
                                }
                                if (!bo.isNullOrNil(aVar.ttg)) {
                                    this.tEE = aVar.ttg;
                                }
                                if (aVar.tIE > 0) {
                                    this.tzY = aVar.tIE;
                                }
                            }
                        } else {
                            this.tES.setVisibility(8);
                            this.tER.setVisibility(8);
                        }
                        AnonymousClass6 anonymousClass6 = new View.OnClickListener() {
                            public final void onClick(View view) {
                                AppMethodBeat.i(47431);
                                ab.i("MicroMsg.WalletOrderInfoNewUI", "click tiny app, userName: %s, path: %s, version: %s", new Object[]{WalletOrderInfoNewUI.this.tED, WalletOrderInfoNewUI.this.tEE, Integer.valueOf(WalletOrderInfoNewUI.this.tzY)});
                                se seVar = new se();
                                seVar.cOf.userName = WalletOrderInfoNewUI.this.tED;
                                seVar.cOf.cOh = bo.bc(WalletOrderInfoNewUI.this.tEE, BuildConfig.FLAVOR);
                                seVar.cOf.scene = 1034;
                                seVar.cOf.cOi = 0;
                                if (WalletOrderInfoNewUI.this.tzY > 0) {
                                    seVar.cOf.axy = WalletOrderInfoNewUI.this.tzY;
                                }
                                seVar.cOf.context = WalletOrderInfoNewUI.this;
                                com.tencent.mm.sdk.b.a.xxA.m(seVar);
                                WalletOrderInfoNewUI walletOrderInfoNewUI = WalletOrderInfoNewUI.this;
                                boolean z = !bo.isNullOrNil(commodity.tAY.tzX) && commodity.tAY.tBx > 0;
                                walletOrderInfoNewUI.tEU = z;
                                if (WalletOrderInfoNewUI.this.tEU) {
                                    h.pYm.e(14118, new Object[]{WalletOrderInfoNewUI.this.oXY, WalletOrderInfoNewUI.this.cNH(), Integer.valueOf(3)});
                                    AppMethodBeat.o(47431);
                                    return;
                                }
                                h.pYm.e(14118, new Object[]{WalletOrderInfoNewUI.this.oXY, WalletOrderInfoNewUI.this.cNH(), Integer.valueOf(1)});
                                AppMethodBeat.o(47431);
                            }
                        };
                        this.tEN.setOnClickListener(anonymousClass6);
                        this.tES.setOnClickListener(anonymousClass6);
                        marginLayoutParams = (MarginLayoutParams) this.tEN.getLayoutParams();
                        list = commodity.tAU;
                        if ((commodity.tAR < 0.0d || commodity.kCJ >= commodity.tAR) && (list == null || list.size() <= 0)) {
                            marginLayoutParams.topMargin = com.tencent.mm.bz.a.fromDPToPix(this, 50);
                        } else {
                            marginLayoutParams.topMargin = 0;
                        }
                        this.tEN.setLayoutParams(marginLayoutParams);
                        this.tEN.setVisibility(0);
                    }
                }
            }
            if (this.tEP.getVisibility() == 0) {
                this.tEP.setSingleLine();
                this.tEP.post(new 7(this));
            }
        }
        AppMethodBeat.o(47460);
    }

    /* Access modifiers changed, original: protected|final */
    public final void acZ(String str) {
        AppMethodBeat.i(47461);
        ab.i("MicroMsg.WalletOrderInfoNewUI", "jumpToH5: %s", new Object[]{str});
        cRq();
        e.n(this, str, true);
        AppMethodBeat.o(47461);
    }

    public void onActivityResult(int i, int i2, Intent intent) {
        AppMethodBeat.i(47462);
        super.onActivityResult(i, i2, intent);
        ab.i("MicroMsg.WalletOrderInfoNewUI", "onActivityResult %d %d", new Object[]{Integer.valueOf(i), Integer.valueOf(i2)});
        if (i == 1) {
            ab.i("MicroMsg.WalletOrderInfoNewUI", "do query pay arawrd, query_award_status_params==null: %s, isCallQueryPayAward: %s", new Object[]{Boolean.valueOf(bo.isNullOrNil(this.tEG.tIJ)), Boolean.valueOf(this.tIx)});
            if (this.tIx) {
                AppMethodBeat.o(47462);
                return;
            }
            this.tIx = true;
            if (bo.isNullOrNil(this.tEG.tIJ)) {
                a(new aa(this.tEG.tuv, this.tEG.tIF, this.tEG.tIG, this.tEG.tIH, this.tEG.cBT, this.tEG.pQe, this.tEG.tBC), true, true);
                AppMethodBeat.o(47462);
                return;
            }
            a(new k(this.tEG.tIJ, this.tEG.tuv), true, true);
        }
        AppMethodBeat.o(47462);
    }

    /* Access modifiers changed, original: protected|final */
    public final boolean cgg() {
        return false;
    }

    public final int getLayoutId() {
        return 2130971144;
    }

    private void c(Orders orders) {
        AppMethodBeat.i(47464);
        this.tIc.clear();
        if (orders == null || orders.tAq == null) {
            ab.w("MicroMsg.WalletOrderInfoNewUI", "hy: orders is null");
            AppMethodBeat.o(47464);
            return;
        }
        for (Commodity commodity : orders.tAq) {
            if (commodity.tAh == 2 && !bo.isNullOrNil(commodity.tAS)) {
                ab.i("MicroMsg.WalletOrderInfoNewUI", "hy: has username and is force recommend");
                this.tIc.add(commodity.tAS);
            }
        }
        AppMethodBeat.o(47464);
    }

    public final void cRH() {
        String string;
        AppMethodBeat.i(47466);
        cRq();
        ap apVar = new ap();
        apVar.ctF.ctG = true;
        com.tencent.mm.sdk.b.a.xxA.m(apVar);
        gq gqVar = new gq();
        gqVar.cBo.cBp = "ok";
        com.tencent.mm.sdk.b.a.xxA.m(gqVar);
        Bundle bundle = new Bundle();
        bundle.putInt("intent_pay_end_errcode", this.mBundle.getInt("intent_pay_end_errcode"));
        bundle.putString("intent_pay_app_url", this.mBundle.getString("intent_pay_app_url"));
        bundle.putBoolean("intent_pay_end", this.mBundle.getBoolean("intent_pay_end"));
        ab.i("MicroMsg.WalletOrderInfoNewUI", "pay done...feedbackData errCode:" + this.mBundle.getInt("intent_pay_end_errcode"));
        for (String string2 : this.tIc) {
            if (!bo.isNullOrNil(string2)) {
                ab.i("MicroMsg.WalletOrderInfoNewUI", "hy: doing netscene subscribe...appName: %s", new Object[]{string2});
                if (this.tog == null || this.pVL == null) {
                    g.RO().eJo.a(new com.tencent.mm.wallet_core.c.r(string2), 0);
                } else {
                    String str;
                    p pVar = g.RO().eJo;
                    String str2 = this.tog.czZ;
                    if (this.tog.tAq.size() > 0) {
                        str = ((Commodity) this.tog.tAq.get(0)).cAa;
                    } else {
                        str = BuildConfig.FLAVOR;
                    }
                    pVar.a(new com.tencent.mm.wallet_core.c.r(string2, str2, str, this.pVL.cIf, this.pVL.cIb, this.tog.tAh), 0);
                }
            }
            h.pYm.e(13033, new Object[]{Integer.valueOf(2), string2, BuildConfig.FLAVOR, BuildConfig.FLAVOR, BuildConfig.FLAVOR});
        }
        if (this.tEX != null) {
            this.tEX.a(this, 0, bundle);
            this.tEX = null;
        } else {
            ab.i("MicroMsg.WalletOrderInfoNewUI", "process is null! finish directly");
            finish();
        }
        if (this.pVL != null && (this.pVL.cIf == 46 || this.pVL.cIf == 3)) {
            bg bgVar = new bg();
            if (this.pVL.cIf == 46) {
                bgVar.dcc = 2;
            } else if (this.pVL.cIf == 3) {
                bgVar.dcc = 1;
            }
            if (this.tog != null && this.tog.tAD == 0) {
                bgVar.dcd = 1;
            } else if (this.tog != null && this.tog.tAD == 1) {
                bgVar.dcd = 2;
            } else if (!(this.tog == null || this.tog.tAD != 0 || bo.isNullOrNil(this.tog.tAG) || bo.isNullOrNil(this.tog.tAF))) {
                bgVar.dcd = 3;
            }
            if (!(this.pVL == null || this.pVL.vwh == null)) {
                string2 = this.pVL.vwh.getString("extinfo_key_20", BuildConfig.FLAVOR);
                if (!bo.isNullOrNil(string2)) {
                    bgVar.fY(string2);
                }
                string2 = this.pVL.vwh.getString("extinfo_key_21", BuildConfig.FLAVOR);
                if (!bo.isNullOrNil(string2)) {
                    bgVar.ga(string2);
                }
                string2 = this.pVL.vwh.getString("extinfo_key_22", BuildConfig.FLAVOR);
                if (!bo.isNullOrNil(string2)) {
                    bgVar.fZ(string2);
                }
            }
            if (!(this.tog == null || this.tog.tAD != 0 || bo.isNullOrNil(this.tog.tAG) || bo.isNullOrNil(this.tog.tAF))) {
                bgVar.gc(this.tog.tAG);
                bgVar.gb(this.tog.tAF);
            }
            bgVar.ajK();
            if (!(this.tog == null || this.tog.tAD != 0 || bo.isNullOrNil(this.tog.tAG) || bo.isNullOrNil(this.tog.tAF))) {
                se seVar = new se();
                seVar.cOf.userName = this.tog.tAF;
                seVar.cOf.cOh = this.tog.tAG;
                seVar.cOf.scene = 1060;
                seVar.cOf.cst = this.oXY;
                seVar.cOf.cOi = 0;
                seVar.cOf.context = this;
                com.tencent.mm.sdk.b.a.xxA.m(seVar);
                AppMethodBeat.o(47466);
                return;
            }
        }
        if (!(this.tog == null || bo.isNullOrNil(this.tog.lvz))) {
            String d = d(this.tog.lvz, this.tog.czZ, this.tog.tAq.size() > 0 ? ((Commodity) this.tog.tAq.get(0)).cAa : BuildConfig.FLAVOR, this.pVL.kck, this.pVL.hHV);
            ab.d("MicroMsg.WalletOrderInfoNewUI", "url = ".concat(String.valueOf(d)));
            Intent intent = new Intent();
            intent.putExtra("rawUrl", d);
            intent.putExtra("showShare", false);
            intent.putExtra("geta8key_username", com.tencent.mm.model.r.Yz());
            intent.putExtra("stastic_scene", 8);
            com.tencent.mm.bp.d.b(this, "webview", "com.tencent.mm.plugin.webview.ui.tools.WebViewUI", intent);
        }
        AppMethodBeat.o(47466);
    }

    public boolean onKeyUp(int i, KeyEvent keyEvent) {
        AppMethodBeat.i(47467);
        if (i == 4) {
            done();
            AppMethodBeat.o(47467);
            return true;
        }
        boolean onKeyUp = super.onKeyUp(i, keyEvent);
        AppMethodBeat.o(47467);
        return onKeyUp;
    }

    public void onDestroy() {
        AppMethodBeat.i(47468);
        super.onDestroy();
        com.tencent.mm.sdk.b.a.xxA.d(this.tIy);
        com.tencent.mm.sdk.b.a.xxA.d(this.pap);
        ng(1979);
        ng(2948);
        ng(2710);
        this.pSR.dead();
        if (WalletSuccPageAwardWidget.a(this.pSK)) {
            this.pSL.onDestroy();
        }
        AppMethodBeat.o(47468);
    }

    /* Access modifiers changed, original: protected */
    public void cRq() {
        int i = 0;
        AppMethodBeat.i(47469);
        if (!this.tEC) {
            iy iyVar = new iy();
            iyVar.cEc.requestCode = 4;
            iy.a aVar = iyVar.cEc;
            if (this.mBundle.getBoolean("intent_pay_end", false)) {
                i = -1;
            }
            aVar.bFZ = i;
            iyVar.cEc.cEd = new Intent();
            if (this.tog != null) {
                iyVar.cEc.cEd.putExtra("key_jsapi_close_page_after_pay", this.tog.tAD);
            }
            if (!(this.tog == null || this.tog.tAD != 0 || bo.isNullOrNil(this.tog.tAG) || bo.isNullOrNil(this.tog.tAF))) {
                iyVar.cEc.cEd.putExtra("key_jsapi_close_page_after_pay", 1);
            }
            if (this.tEX != null) {
                iyVar.cEc.cEd.putExtra("key_is_clear_failure", this.tEX.mqu.getInt("key_is_clear_failure", -1));
            }
            com.tencent.mm.sdk.b.a.xxA.m(iyVar);
            this.tEC = true;
        }
        AppMethodBeat.o(47469);
    }

    public final boolean c(int i, int i2, String str, m mVar) {
        AppMethodBeat.i(47470);
        ab.i("MicroMsg.WalletOrderInfoNewUI", "onSceneEnd, errType: %s, errCode: %s, scene: %s", new Object[]{Integer.valueOf(i), Integer.valueOf(i2), mVar});
        if (WalletSuccPageAwardWidget.a(this.pSK) && this.pSL.c(i, i2, str, mVar)) {
            AppMethodBeat.o(47470);
            return true;
        }
        CharSequence string;
        if (mVar instanceof aa) {
            if (i == 0 && i2 == 0) {
                aa aaVar = (aa) mVar;
                a aVar = new a(aaVar.hwh);
                if (this.tEG != null) {
                    this.tEH.put(aaVar.tuv, aVar);
                    nk(false);
                    cRn();
                } else if (this.tEU) {
                    this.tEH.put(aaVar.tuv, aVar);
                    nk(false);
                    cRn();
                }
            }
            this.tIx = false;
        } else if (mVar instanceof k) {
            if (i == 0 && i2 == 0) {
                k kVar = (k) mVar;
                bnu bnu = kVar.tuc;
                if (bnu.kdT == 0) {
                    a aVar2 = new a(bnu);
                    if (this.tEG != null) {
                        this.tEH.put(kVar.ssr, aVar2);
                        nk(false);
                        cRn();
                    } else if (this.tEU) {
                        this.tEH.put(kVar.ssr, aVar2);
                        nk(false);
                        cRn();
                    }
                }
            }
            this.tIx = false;
        } else if (mVar instanceof n) {
            if (i == 0 && i2 == 0) {
                n nVar = (n) mVar;
                String str2 = nVar.tud;
                if (this.tIg != null && this.tIg.ttW == nVar.tug.ttW) {
                    ab.i("MicroMsg.WalletOrderInfoNewUI", "activityAwardState: %s", new Object[]{this.tIg});
                    this.tEK = str2;
                    ab.d("MicroMsg.WalletOrderInfoNewUI", "btnName: %s", new Object[]{nVar.tug.tzS});
                    nk(false);
                    cRn();
                    if (!(bo.isNullOrNil(nVar.ehr) || TMQQDownloaderOpenSDKConst.VERIFYTYPE_ALL.equals(str2))) {
                        this.tES.setText(nVar.ehr);
                    }
                }
                if (!"-1".equals(str2) && !"0".equals(str2) && !bo.isNullOrNil(nVar.tue)) {
                    com.tencent.mm.ui.base.h.b(this, nVar.tue, BuildConfig.FLAVOR, true);
                } else if ("0".equals(str2)) {
                    if (bo.isNullOrNil(nVar.tue)) {
                        string = getString(2131305156);
                    } else {
                        string = nVar.tue;
                    }
                    Toast.makeText(this, string, 0).show();
                }
                AppMethodBeat.o(47470);
                return true;
            }
            if (bo.isNullOrNil(str)) {
                str = getString(2131305389);
            }
            com.tencent.mm.ui.base.h.a(this, str, null, false, new 12(this));
            AppMethodBeat.o(47470);
            return true;
        } else if (mVar instanceof com.tencent.mm.plugin.wallet_core.c.h) {
            if (i == 0 && i2 == 0) {
                com.tencent.mm.plugin.wallet_core.c.h hVar = (com.tencent.mm.plugin.wallet_core.c.h) mVar;
                aeq aeq = hVar.ttV;
                if (aeq.kdT == 0) {
                    String str3 = aeq.wms;
                    if (this.tIg != null && this.tIg.ttW == hVar.ttW) {
                        ab.i("MicroMsg.WalletOrderInfoNewUI", "activityAwardState: %s", new Object[]{this.tIg});
                        this.tEK = str3;
                        ab.d("MicroMsg.WalletOrderInfoNewUI", "btnName: %s", new Object[]{aeq.wmu});
                        nk(false);
                        cRn();
                        if (!(bo.isNullOrNil(aeq.wmu) || TMQQDownloaderOpenSDKConst.VERIFYTYPE_ALL.equals(str3))) {
                            this.tES.setText(aeq.wmu);
                        }
                    }
                    if (!"-1".equals(str3) && !"0".equals(str3) && !bo.isNullOrNil(aeq.wmt)) {
                        com.tencent.mm.ui.base.h.b(this, aeq.wmt, BuildConfig.FLAVOR, true);
                    } else if ("0".equals(str3)) {
                        if (bo.isNullOrNil(aeq.wmt)) {
                            string = getString(2131305156);
                        } else {
                            string = aeq.wmt;
                        }
                        Toast.makeText(this, string, 0).show();
                    }
                }
                AppMethodBeat.o(47470);
                return true;
            }
            if (bo.isNullOrNil(str)) {
                str = getString(2131305389);
            }
            com.tencent.mm.ui.base.h.a(this, str, null, false, new 13(this));
            AppMethodBeat.o(47470);
            return true;
        }
        AppMethodBeat.o(47470);
        return false;
    }

    @Deprecated
    public Dialog onCreateDialog(int i) {
        AppMethodBeat.i(47463);
        Dialog a = com.tencent.mm.ui.base.h.a(this.mController.ylL, getString(2131305064), getResources().getStringArray(2131755065), BuildConfig.FLAVOR, new com.tencent.mm.ui.base.h.c() {
            public final void iE(int i) {
                AppMethodBeat.i(47433);
                switch (i) {
                    case 0:
                        Intent intent = new Intent("android.intent.action.DIAL", Uri.parse("tel:" + WalletOrderInfoNewUI.this.pdC));
                        intent.addFlags(ErrorDialogData.BINDER_CRASH);
                        WalletOrderInfoNewUI.this.startActivity(intent);
                        break;
                }
                AppMethodBeat.o(47433);
            }
        });
        AppMethodBeat.o(47463);
        return a;
    }

    public void done() {
        AppMethodBeat.i(47465);
        if (this.mBundle.containsKey("key_realname_guide_helper")) {
            RealnameGuideHelper realnameGuideHelper = (RealnameGuideHelper) this.mBundle.getParcelable("key_realname_guide_helper");
            if (realnameGuideHelper != null) {
                Bundle bundle = new Bundle();
                bundle.putString("realname_verify_process_jump_activity", ".ui.WalletOrderInfoNewUI");
                bundle.putString("realname_verify_process_jump_plugin", "wallet_core");
                boolean b = realnameGuideHelper.b(this, bundle, new 10(this));
                boolean a = realnameGuideHelper.a(this, bundle, new 11(this));
                this.mBundle.remove("key_realname_guide_helper");
                if (!(b || a)) {
                    cRH();
                }
            }
            AppMethodBeat.o(47465);
            return;
        }
        cRH();
        AppMethodBeat.o(47465);
    }

    public final void AM(int i) {
        AppMethodBeat.i(47471);
        this.mController.contentView.setVisibility(i);
        AppMethodBeat.o(47471);
    }

    static /* synthetic */ void q(WalletOrderInfoNewUI walletOrderInfoNewUI) {
        AppMethodBeat.i(47472);
        String str = "MicroMsg.WalletOrderInfoNewUI";
        String str2 = "onClickActivity, activityId: %s";
        Object[] objArr = new Object[1];
        objArr[0] = Long.valueOf(walletOrderInfoNewUI.tIg != null ? walletOrderInfoNewUI.tIg.ttW : 0);
        ab.i(str, str2, objArr);
        if (walletOrderInfoNewUI.tIg != null && walletOrderInfoNewUI.tIg.ttW > 0) {
            walletOrderInfoNewUI.tEV = true;
            if (walletOrderInfoNewUI.tEK.equals("-1") || walletOrderInfoNewUI.tEK.equals(TMQQDownloaderOpenSDKConst.VERIFYTYPE_ALL)) {
                h.pYm.e(13472, new Object[]{walletOrderInfoNewUI.pVl, Integer.valueOf(walletOrderInfoNewUI.tIg.tBo), Integer.valueOf(1), Long.valueOf(walletOrderInfoNewUI.tIg.ttW), Long.valueOf(walletOrderInfoNewUI.tIg.tzR)});
                h.pYm.e(13033, new Object[]{Integer.valueOf(2), BuildConfig.FLAVOR, walletOrderInfoNewUI.tIg.url, walletOrderInfoNewUI.tIg.name, BuildConfig.FLAVOR});
                if (!bo.isNullOrNil(walletOrderInfoNewUI.tIg.tBr) && !bo.isNullOrNil(walletOrderInfoNewUI.tIg.tBs)) {
                    ab.i("MicroMsg.WalletOrderInfoNewUI", "promotion jump tiny app, username: %s, path: %s, version: %s", new Object[]{walletOrderInfoNewUI.tIg.tBr, walletOrderInfoNewUI.tIg.tBs, Integer.valueOf(walletOrderInfoNewUI.tIg.tBt)});
                    walletOrderInfoNewUI.tEG = new b(walletOrderInfoNewUI.tIg.ttW, walletOrderInfoNewUI.tIg.tBp, walletOrderInfoNewUI.tIg.tzP, walletOrderInfoNewUI.tIg.tzQ, walletOrderInfoNewUI.cNH(), walletOrderInfoNewUI.pVl, walletOrderInfoNewUI.tIg.tzR, walletOrderInfoNewUI.tIg.tBv);
                    se seVar = new se();
                    seVar.cOf.userName = walletOrderInfoNewUI.tIg.tBr;
                    seVar.cOf.cOh = bo.bc(walletOrderInfoNewUI.tIg.tBs, BuildConfig.FLAVOR);
                    seVar.cOf.scene = 1060;
                    seVar.cOf.cst = walletOrderInfoNewUI.oXY;
                    seVar.cOf.cOi = 0;
                    if (walletOrderInfoNewUI.tIg.tBt > 0) {
                        seVar.cOf.axy = walletOrderInfoNewUI.tIg.tBt;
                    }
                    seVar.cOf.context = walletOrderInfoNewUI;
                    com.tencent.mm.sdk.b.a.xxA.m(seVar);
                    h.pYm.e(14118, new Object[]{walletOrderInfoNewUI.oXY, walletOrderInfoNewUI.cNH(), Integer.valueOf(2)});
                    AppMethodBeat.o(47472);
                    return;
                } else if (walletOrderInfoNewUI.tIg.tBo == 1) {
                    Promotions promotions = walletOrderInfoNewUI.tIg;
                    ab.i("MicroMsg.WalletOrderInfoNewUI", "doSceneSendPayAward, getAwardParams==null: %s, %s", new Object[]{Boolean.valueOf(bo.isNullOrNil(promotions.tBu)), promotions.tBu});
                    if (bo.isNullOrNil(promotions.tBu)) {
                        walletOrderInfoNewUI.a(new n(promotions, walletOrderInfoNewUI.cNH(), walletOrderInfoNewUI.oXY, promotions.tzR), true, false);
                        AppMethodBeat.o(47472);
                        return;
                    }
                    walletOrderInfoNewUI.a(new com.tencent.mm.plugin.wallet_core.c.h(promotions.tBu, promotions.ttW), true, false);
                    AppMethodBeat.o(47472);
                    return;
                } else if (walletOrderInfoNewUI.tIg.tBo != 2 || bo.isNullOrNil(walletOrderInfoNewUI.tIg.url)) {
                    ab.e("MicroMsg.WalletOrderInfoNewUI", "promotion's activityActionType != ACTION_TYPE_NORMAL and url is null,unknow option");
                } else if (walletOrderInfoNewUI.tEH.containsKey(walletOrderInfoNewUI.tIg.ttW)) {
                    a aVar = (a) walletOrderInfoNewUI.tEH.get(walletOrderInfoNewUI.tIg.ttW);
                    ab.i("MicroMsg.WalletOrderInfoNewUI", "go to new url %s", new Object[]{aVar.url});
                    if (bo.isNullOrNil(aVar.url)) {
                        walletOrderInfoNewUI.acZ(walletOrderInfoNewUI.tIg.url);
                        AppMethodBeat.o(47472);
                        return;
                    }
                    walletOrderInfoNewUI.acZ(aVar.url);
                    AppMethodBeat.o(47472);
                    return;
                } else {
                    walletOrderInfoNewUI.tEI = walletOrderInfoNewUI.tIg.url;
                    String str3 = walletOrderInfoNewUI.tIg.url;
                    b bVar = new b(walletOrderInfoNewUI.tIg.ttW, walletOrderInfoNewUI.tIg.tBp, walletOrderInfoNewUI.tIg.tzP, walletOrderInfoNewUI.tIg.tzQ, walletOrderInfoNewUI.cNH(), walletOrderInfoNewUI.pVl, walletOrderInfoNewUI.tIg.tzR, walletOrderInfoNewUI.tIg.tBv);
                    ab.i("MicroMsg.WalletOrderInfoNewUI", "jumpToH5: %s", new Object[]{str3});
                    walletOrderInfoNewUI.cRq();
                    walletOrderInfoNewUI.tEG = bVar;
                    e.a(walletOrderInfoNewUI, str3, false, 1);
                    AppMethodBeat.o(47472);
                    return;
                }
            }
        }
        AppMethodBeat.o(47472);
    }
}
