package com.tencent.mm.plugin.backup.backupmoveui;

import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.appbrand.appstorage.ZipJNI;
import com.tencent.mm.plugin.backup.b.b.d;
import com.tencent.mm.plugin.backup.b.e;
import com.tencent.mm.plugin.backup.b.g;
import com.tencent.mm.plugin.backup.d.b;
import com.tencent.mm.plugin.backup.d.c;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.bo;
import com.tencent.mm.ui.base.h;
import com.tencent.ttpic.baseutils.ApiHelper$VERSION_CODES;
import com.tencent.ytcommon.BuildConfig;

class BackupMoveRecoverUI$1 implements d {
    final /* synthetic */ BackupMoveRecoverUI jvc;

    BackupMoveRecoverUI$1(BackupMoveRecoverUI backupMoveRecoverUI) {
        this.jvc = backupMoveRecoverUI;
    }

    public final void rj(int i) {
        AppMethodBeat.i(17385);
        while (true) {
            e aSu = b.aSZ().aSu();
            ab.i("MicroMsg.BackupMoveRecoverUI", "onUpdateUIProgress state[%d], isActivityOnTop[%b], transferSession[%d], totalSession[%d], mergePercent[%d]", new Object[]{Integer.valueOf(i), Boolean.valueOf(BackupMoveRecoverUI.access$000()), Integer.valueOf(aSu.jqX), Integer.valueOf(aSu.jqY), Integer.valueOf(aSu.jqZ)});
            TextView textView;
            BackupMoveRecoverUI backupMoveRecoverUI;
            Object[] objArr;
            switch (i) {
                case ZipJNI.UNZ_END_OF_LIST_OF_FILE /*-100*/:
                    BackupMoveRecoverUI.a(this.jvc);
                    AppMethodBeat.o(17385);
                    return;
                case -22:
                    this.jvc.juZ.setImageResource(2131230939);
                    this.jvc.juW.setText(2131297298);
                    b.aSZ().aTa().stop();
                    this.jvc.juX.setVisibility(4);
                    this.jvc.juU.setVisibility(4);
                    this.jvc.juV.setVisibility(4);
                    BackupMoveRecoverUI.b(this.jvc).setVisibility(8);
                    BackupMoveRecoverUI.c(this.jvc);
                    break;
                case -21:
                    this.jvc.juZ.setImageResource(2131230939);
                    this.jvc.juW.setText(2131297306);
                    this.jvc.juX.setVisibility(4);
                    this.jvc.juU.setVisibility(4);
                    this.jvc.juV.setVisibility(4);
                    BackupMoveRecoverUI.b(this.jvc).setVisibility(8);
                    BackupMoveRecoverUI.c(this.jvc);
                    AppMethodBeat.o(17385);
                    return;
                case -13:
                    this.jvc.juZ.setImageResource(2131230939);
                    this.jvc.juW.setText(2131297222);
                    this.jvc.juX.setText(this.jvc.getString(2131297223, new Object[]{bo.ga(b.aSZ().aTc().jtJ)}));
                    this.jvc.juX.setVisibility(0);
                    this.jvc.juU.setVisibility(4);
                    this.jvc.juV.setVisibility(4);
                    BackupMoveRecoverUI.b(this.jvc).setVisibility(8);
                    BackupMoveRecoverUI.c(this.jvc);
                    AppMethodBeat.o(17385);
                    return;
                case -12:
                    this.jvc.juZ.setImageResource(2131230937);
                    this.jvc.juW.setText(2131297205);
                    this.jvc.juX.setText(2131297236);
                    this.jvc.juX.setVisibility(0);
                    this.jvc.juU.setVisibility(4);
                    this.jvc.juV.setVisibility(4);
                    BackupMoveRecoverUI.b(this.jvc).setVisibility(8);
                    BackupMoveRecoverUI.c(this.jvc);
                    h.a(this.jvc, 2131297220, 0, 2131297363, 0, false, new 14(this), null, 2131689744);
                    AppMethodBeat.o(17385);
                    return;
                case -5:
                    this.jvc.juZ.setImageResource(2131230939);
                    this.jvc.juW.setText(2131297214);
                    this.jvc.juU.setText(2131297252);
                    this.jvc.juV.setText(2131297255);
                    this.jvc.juX.setVisibility(4);
                    this.jvc.juU.setVisibility(0);
                    this.jvc.juV.setVisibility(0);
                    BackupMoveRecoverUI.b(this.jvc).setVisibility(8);
                    this.jvc.juU.setOnClickListener(new 11(this));
                    this.jvc.juV.setOnClickListener(new 13(this, i));
                    BackupMoveRecoverUI.c(this.jvc);
                    AppMethodBeat.o(17385);
                    return;
                case -4:
                    this.jvc.juZ.setImageResource(2131230939);
                    this.jvc.juW.setText(this.jvc.getString(2131297237, new Object[]{Integer.valueOf(aSu.jqX), Integer.valueOf(aSu.jqY), "0M"}));
                    this.jvc.juX.setText(2131297221);
                    this.jvc.juU.setText(2131297252);
                    this.jvc.juV.setText(2131297255);
                    this.jvc.juU.setOnClickListener(new 7(this));
                    this.jvc.juV.setOnClickListener(new 8(this, i));
                    this.jvc.juX.setTextColor(this.jvc.getResources().getColor(2131689745));
                    this.jvc.juX.setVisibility(0);
                    this.jvc.juU.setVisibility(0);
                    this.jvc.juV.setVisibility(0);
                    BackupMoveRecoverUI.b(this.jvc).setVisibility(8);
                    BackupMoveRecoverUI.d(this.jvc);
                    AppMethodBeat.o(17385);
                    return;
                case -3:
                    this.jvc.juZ.setImageResource(2131230939);
                    this.jvc.juW.setText(2131297212);
                    this.jvc.juX.setText(2131297213);
                    this.jvc.juU.setText(2131297250);
                    this.jvc.juV.setText(2131297255);
                    this.jvc.juX.setTextColor(this.jvc.getResources().getColor(2131689745));
                    this.jvc.juX.setVisibility(0);
                    this.jvc.juU.setVisibility(0);
                    this.jvc.juV.setVisibility(0);
                    BackupMoveRecoverUI.b(this.jvc).setVisibility(8);
                    this.jvc.juU.setOnClickListener(new 9(this));
                    this.jvc.juV.setOnClickListener(new 10(this, i));
                    BackupMoveRecoverUI.c(this.jvc);
                    AppMethodBeat.o(17385);
                    return;
                case -2:
                case -1:
                    this.jvc.juZ.setImageResource(2131230939);
                    this.jvc.juW.setText(2131297224);
                    String ds = g.ds(this.jvc);
                    if (ds == null || ds.equals(BuildConfig.FLAVOR)) {
                        this.jvc.juX.setText(this.jvc.getString(2131297225, new Object[]{"移动网络", b.aSZ().aTc().jtC}));
                    } else {
                        this.jvc.juX.setText(this.jvc.getString(2131297225, new Object[]{ds, b.aSZ().aTc().jtC}));
                    }
                    this.jvc.juX.setTextColor(this.jvc.getResources().getColor(2131689745));
                    this.jvc.juX.setVisibility(0);
                    this.jvc.juU.setVisibility(4);
                    this.jvc.juV.setVisibility(4);
                    BackupMoveRecoverUI.b(this.jvc).setVisibility(8);
                    BackupMoveRecoverUI.c(this.jvc);
                    AppMethodBeat.o(17385);
                    return;
                case 1:
                    this.jvc.juZ.setImageResource(2131230937);
                    this.jvc.juW.setText(2131297205);
                    this.jvc.juX.setText(2131297236);
                    this.jvc.juX.setVisibility(0);
                    this.jvc.juU.setVisibility(4);
                    this.jvc.juV.setVisibility(4);
                    BackupMoveRecoverUI.b(this.jvc).setVisibility(8);
                    BackupMoveRecoverUI.c(this.jvc);
                    AppMethodBeat.o(17385);
                    return;
                case 3:
                    this.jvc.finish();
                    AppMethodBeat.o(17385);
                    return;
                case 4:
                    this.jvc.juZ.setImageResource(2131230937);
                    textView = this.jvc.juW;
                    backupMoveRecoverUI = this.jvc;
                    objArr = new Object[3];
                    objArr[0] = Integer.valueOf(aSu.jqX);
                    objArr[1] = Integer.valueOf(aSu.jqY);
                    b.aSZ().aTc();
                    objArr[2] = c.aTi();
                    textView.setText(backupMoveRecoverUI.getString(2131297256, objArr));
                    this.jvc.juX.setText(2131297271);
                    this.jvc.juX.setTextColor(this.jvc.getResources().getColor(2131689746));
                    this.jvc.juX.setVisibility(0);
                    this.jvc.juU.setVisibility(8);
                    this.jvc.juV.setVisibility(0);
                    BackupMoveRecoverUI.b(this.jvc).setVisibility(0);
                    BackupMoveRecoverUI.b(this.jvc).setProgress(aSu.aSD());
                    BackupMoveRecoverUI.b(this.jvc).setOnClickListener(new 5(this));
                    this.jvc.juV.setText(2131297272);
                    this.jvc.juV.setOnClickListener(new 6(this));
                    BackupMoveRecoverUI.d(this.jvc);
                    AppMethodBeat.o(17385);
                    return;
                case ApiHelper$VERSION_CODES.LOLLIPOP_MR1 /*22*/:
                    this.jvc.juZ.setImageResource(2131230937);
                    this.jvc.juW.setText(2131297251);
                    this.jvc.juX.setText(2131297236);
                    this.jvc.juX.setTextColor(this.jvc.getResources().getColor(2131689746));
                    this.jvc.juX.setVisibility(0);
                    this.jvc.juU.setVisibility(4);
                    this.jvc.juV.setVisibility(4);
                    BackupMoveRecoverUI.b(this.jvc).setVisibility(8);
                    BackupMoveRecoverUI.d(this.jvc);
                    AppMethodBeat.o(17385);
                    return;
                case 23:
                    this.jvc.juZ.setImageResource(2131230937);
                    textView = this.jvc.juW;
                    backupMoveRecoverUI = this.jvc;
                    objArr = new Object[3];
                    objArr[0] = Integer.valueOf(aSu.jqX);
                    objArr[1] = Integer.valueOf(aSu.jqY);
                    b.aSZ().aTc();
                    objArr[2] = c.aTi();
                    textView.setText(backupMoveRecoverUI.getString(2131297256, objArr));
                    this.jvc.juX.setText(2131297236);
                    this.jvc.juX.setTextColor(this.jvc.getResources().getColor(2131689746));
                    this.jvc.juX.setVisibility(0);
                    this.jvc.juU.setVisibility(8);
                    this.jvc.juV.setVisibility(4);
                    BackupMoveRecoverUI.b(this.jvc).setVisibility(0);
                    BackupMoveRecoverUI.b(this.jvc).setProgress(aSu.aSD());
                    BackupMoveRecoverUI.b(this.jvc).setOnClickListener(new 15(this));
                    BackupMoveRecoverUI.d(this.jvc);
                    AppMethodBeat.o(17385);
                    return;
                case ApiHelper$VERSION_CODES.NOUGAT /*24*/:
                    ab.i("MicroMsg.BackupMoveRecoverUI", "backupmove BACKUP_STATE_RECOVER_TRANSFER_FINISH isFromBanner[%b]", new Object[]{Boolean.valueOf(BackupMoveRecoverUI.aTx())});
                    if (BackupMoveRecoverUI.aTx()) {
                        this.jvc.juZ.setImageResource(2131230937);
                        this.jvc.juW.setText(2131297257);
                        this.jvc.juX.setText(2131297259);
                        this.jvc.juX.setTextColor(this.jvc.getResources().getColor(2131689746));
                        this.jvc.juU.setText(2131297253);
                        this.jvc.juV.setText(2131297254);
                        this.jvc.juY.setText(2131297346);
                        this.jvc.juX.setVisibility(0);
                        this.jvc.juU.setVisibility(0);
                        this.jvc.juV.setVisibility(0);
                        BackupMoveRecoverUI.b(this.jvc).setVisibility(8);
                        this.jvc.juU.setOnClickListener(new OnClickListener() {
                            public final void onClick(View view) {
                                AppMethodBeat.i(17384);
                                ab.i("MicroMsg.BackupMoveRecoverUI", "backupmove click start merge button.");
                                b.aSZ().aTc();
                                if (c.aTe()) {
                                    b.aSZ().aTc().aSL();
                                    AppMethodBeat.o(17384);
                                    return;
                                }
                                ab.e("MicroMsg.BackupMoveRecoverUI", "miss recover merge data.");
                                b.aSZ().aSu().jqW = -22;
                                BackupMoveRecoverUI$1.this.rj(-22);
                                com.tencent.mm.plugin.report.service.h.pYm.a(485, 6, 1, false);
                                AppMethodBeat.o(17384);
                            }
                        });
                        this.jvc.juV.setOnClickListener(new 2(this, i));
                        this.jvc.juY.setOnClickListener(new 3(this));
                        AppMethodBeat.o(17385);
                        return;
                    } else if (BackupMoveRecoverUI.access$000()) {
                        b.aSZ().aTc();
                        if (c.aTe()) {
                            b.aSZ().aTc().aSL();
                            AppMethodBeat.o(17385);
                            return;
                        }
                        ab.e("MicroMsg.BackupMoveRecoverUI", "miss recover merge data.");
                        b.aSZ().aSu().jqW = -22;
                        rj(-22);
                        com.tencent.mm.plugin.report.service.h.pYm.a(485, 6, 1, false);
                        AppMethodBeat.o(17385);
                        return;
                    }
                    break;
                case 25:
                    if (!BackupMoveRecoverUI.access$000()) {
                        break;
                    }
                    b.aSZ().aSu().jqW = 24;
                    i = 24;
                case ApiHelper$VERSION_CODES.O /*26*/:
                    this.jvc.juZ.setImageResource(2131230943);
                    this.jvc.juW.setText(this.jvc.getString(2131297248, new Object[]{Integer.valueOf(aSu.jqZ)}));
                    this.jvc.juX.setText(2131297249);
                    this.jvc.juX.setTextColor(this.jvc.getResources().getColor(2131689746));
                    this.jvc.juX.setVisibility(0);
                    this.jvc.juU.setVisibility(4);
                    this.jvc.juV.setVisibility(4);
                    BackupMoveRecoverUI.b(this.jvc).setVisibility(8);
                    BackupMoveRecoverUI.c(this.jvc);
                    AppMethodBeat.o(17385);
                    return;
                case ApiHelper$VERSION_CODES.O_MR1 /*27*/:
                    this.jvc.juZ.setImageResource(2131230945);
                    this.jvc.juW.setText(2131297246);
                    this.jvc.juX.setText(this.jvc.getString(2131297247, new Object[]{Integer.valueOf(aSu.jqX), Integer.valueOf(aSu.jqY)}));
                    this.jvc.juX.setTextColor(this.jvc.getResources().getColor(2131689746));
                    this.jvc.juU.setText(2131297195);
                    this.jvc.juX.setVisibility(0);
                    this.jvc.juU.setVisibility(0);
                    this.jvc.juV.setVisibility(4);
                    BackupMoveRecoverUI.b(this.jvc).setVisibility(8);
                    this.jvc.juU.setOnClickListener(new OnClickListener() {
                        public final void onClick(View view) {
                            AppMethodBeat.i(17363);
                            b.aSZ().aTa().stop();
                            b.aSZ().aSu().jqW = -100;
                            BackupMoveRecoverUI.g(BackupMoveRecoverUI$1.this.jvc);
                            AppMethodBeat.o(17363);
                        }
                    });
                    BackupMoveRecoverUI.c(this.jvc);
                    AppMethodBeat.o(17385);
                    return;
                case 28:
                    this.jvc.juZ.setImageResource(2131230937);
                    this.jvc.juW.setText(2131297239);
                    this.jvc.juX.setText(2131297241);
                    this.jvc.juX.setTextColor(this.jvc.getResources().getColor(2131689746));
                    this.jvc.juX.setVisibility(0);
                    this.jvc.juU.setVisibility(0);
                    BackupMoveRecoverUI.b(this.jvc).setVisibility(8);
                    this.jvc.juU.setText(2131297240);
                    this.jvc.juU.setOnClickListener(new 16(this));
                    this.jvc.juV.setVisibility(0);
                    this.jvc.juV.setText(2131297255);
                    this.jvc.juV.setOnClickListener(new OnClickListener() {
                        public final void onClick(View view) {
                            AppMethodBeat.i(17379);
                            ab.i("MicroMsg.BackupMoveRecoverUI", "backupmove pause click stop move button.");
                            ab.i("MicroMsg.BackupMoveRecoverUI", "backupmove pause click stop move.");
                            b.aSZ().aSu().jqW = 29;
                            BackupMoveRecoverUI$1.this.rj(29);
                            AppMethodBeat.o(17379);
                        }
                    });
                    BackupMoveRecoverUI.d(this.jvc);
                    AppMethodBeat.o(17385);
                    return;
                case 29:
                    this.jvc.juZ.setImageResource(2131230937);
                    this.jvc.juW.setText(2131297266);
                    this.jvc.juX.setText(2131297268);
                    this.jvc.juX.setTextColor(this.jvc.getResources().getColor(2131689746));
                    this.jvc.juX.setVisibility(0);
                    this.jvc.juU.setVisibility(0);
                    BackupMoveRecoverUI.b(this.jvc).setVisibility(8);
                    this.jvc.juU.setText(2131297265);
                    this.jvc.juU.setOnClickListener(new 18(this));
                    this.jvc.juV.setVisibility(0);
                    this.jvc.juV.setText(2131297206);
                    this.jvc.juV.setOnClickListener(new 19(this, i));
                    this.jvc.juY.setText(2131297346);
                    this.jvc.juY.setOnClickListener(new OnClickListener() {
                        public final void onClick(View view) {
                            AppMethodBeat.i(17383);
                            b.aSZ().aSu().jqW = 25;
                            BackupMoveRecoverUI.e(BackupMoveRecoverUI$1.this.jvc);
                            AppMethodBeat.o(17383);
                        }
                    });
                    AppMethodBeat.o(17385);
                    return;
                case 30:
                    this.jvc.juZ.setImageResource(2131230943);
                    this.jvc.juW.setText(2131297345);
                    this.jvc.juX.setText(2131297249);
                    this.jvc.juX.setTextColor(this.jvc.getResources().getColor(2131689746));
                    this.jvc.juX.setVisibility(0);
                    this.jvc.juU.setVisibility(4);
                    this.jvc.juV.setVisibility(4);
                    BackupMoveRecoverUI.b(this.jvc).setVisibility(8);
                    BackupMoveRecoverUI.c(this.jvc);
                    AppMethodBeat.o(17385);
                    return;
                case 52:
                    this.jvc.juZ.setImageResource(2131230937);
                    this.jvc.juW.setText(2131297233);
                    this.jvc.juU.setText(2131297235);
                    this.jvc.juV.setText(2131297234);
                    this.jvc.juX.setVisibility(4);
                    this.jvc.juU.setVisibility(0);
                    this.jvc.juV.setVisibility(0);
                    BackupMoveRecoverUI.b(this.jvc).setVisibility(8);
                    this.jvc.juU.setOnClickListener(new 1(this));
                    this.jvc.juV.setOnClickListener(new 12(this));
                    BackupMoveRecoverUI.c(this.jvc);
                    AppMethodBeat.o(17385);
                    return;
                default:
                    break;
            }
        }
        AppMethodBeat.o(17385);
    }

    public final void aSt() {
    }
}
