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

import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.ai.f;
import com.tencent.mm.ai.m;
import com.tencent.mm.plugin.backup.b.c;
import com.tencent.mm.plugin.backup.b.g;
import com.tencent.mm.plugin.backup.g.a;
import com.tencent.mm.plugin.backup.g.b;
import com.tencent.mm.plugin.report.service.h;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.ah;

class c$3 implements f {
    final /* synthetic */ c jwk;

    c$3(c cVar) {
        this.jwk = cVar;
    }

    public final void onSceneEnd(int i, int i2, String str, m mVar) {
        AppMethodBeat.i(17501);
        c.aMr();
        h.pYm.e(13736, new Object[]{Integer.valueOf(0), c.e(this.jwk), g.ds(ah.getContext()), Integer.valueOf(0), Integer.valueOf(b.aTD().aTE().jwg)});
        b.b(1, c.f(this.jwk));
        if (i == 0 && i2 == 0) {
            boolean z;
            boolean z2;
            boolean z3;
            a aVar = (a) mVar;
            if ((aVar.jwY.jCu & c.jqL) == 0) {
                z = false;
            } else {
                z = true;
            }
            if ((aVar.jwY.jCu & c.jqM) == 0) {
                z2 = false;
            } else {
                z2 = true;
            }
            if ((aVar.jwY.jCu & c.jqN) == 0) {
                z3 = false;
            } else {
                z3 = true;
            }
            ab.i("MicroMsg.BackupPcProcessMgr", "onBackupAuthEnd auth success, pcSupportTimeSelect[%b], pcSupportQuickBackup[%b], pcSupportReconnect[%b]", new Object[]{Boolean.valueOf(z), Boolean.valueOf(z2), Boolean.valueOf(z3)});
            if (z3) {
                com.tencent.mm.bt.b bVar;
                if (aVar.jwY.jCw == null) {
                    bVar = null;
                } else {
                    bVar = aVar.jwY.jCw;
                }
                if (bVar != null) {
                    this.jwk.a(true, bVar);
                    b.aTD().aTF().jwv = z;
                    b.aTD().aTF().jww = z2;
                    AppMethodBeat.o(17501);
                    return;
                }
                ab.e("MicroMsg.BackupPcProcessMgr", "onBackupAuthEnd pcSupportReconnect but token is null!");
            }
            this.jwk.a(false, null);
            b.aTD().aTF().jwv = z;
            b.aTD().aTF().jww = z2;
            AppMethodBeat.o(17501);
            return;
        }
        ab.e("MicroMsg.BackupPcProcessMgr", "onBackupAuthEnd auth failed, errType[%d], errCode[%d], errMsg[%s]", new Object[]{Integer.valueOf(i), Integer.valueOf(i2), str});
        switch (i2) {
            case -3:
                h.pYm.a(400, 115, 1, false);
                break;
            case -1:
                h.pYm.a(400, 114, 1, false);
                break;
            default:
                h.pYm.a(400, 116, 1, false);
                break;
        }
        h.pYm.e(13737, new Object[]{Integer.valueOf(1), Integer.valueOf(0), Integer.valueOf(0), Integer.valueOf(0), Integer.valueOf(c.g(this.jwk))});
        b.aTD().aSu().jqW = -5;
        b.aTD().aTF().ru(-5);
        AppMethodBeat.o(17501);
    }
}
