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

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.g.a;
import com.tencent.mm.plugin.backup.g.b;
import com.tencent.mm.plugin.backup.g.k;
import com.tencent.mm.plugin.report.service.h;
import com.tencent.mm.sdk.platformtools.ab;

class c$5 implements f {
    final /* synthetic */ c jtN;

    c$5(c cVar) {
        this.jtN = cVar;
    }

    public final void onSceneEnd(int i, int i2, String str, m mVar) {
        AppMethodBeat.i(17250);
        c.access$202(true);
        h.pYm.a(485, 42, 1, false);
        h.pYm.e(11787, new Object[]{Integer.valueOf(0)});
        b.b(1, c.e(this.jtN));
        if (i == 0 && i2 == 0) {
            ab.i("MicroMsg.BackupMoveRecoverServer", "onBackupAuthEnd auth success");
            a aVar = (a) mVar;
            if (aVar.jwY.Version < c.jqG) {
                ab.i("MicroMsg.BackupMoveRecoverServer", "onBackupAuthEnd start old move, version:%d", new Object[]{Integer.valueOf(aVar.jwY.Version)});
                h.pYm.a(485, 104, 1, false);
                b.aSZ().aSu().jqW = -12;
                this.jtN.rj(-12);
                AppMethodBeat.o(17250);
                return;
            }
            boolean z;
            int i3 = aVar.jwY.jCt;
            c cVar = this.jtN;
            if ((aVar.jwY.jCu & c.jqK) == 0) {
                z = false;
            } else {
                z = true;
            }
            c.a(cVar, z);
            ab.i("MicroMsg.BackupMoveRecoverServer", "onBackupAuthEnd start new move, version:%d, type:%d, isServerSupportKv:%b", new Object[]{Integer.valueOf(aVar.jwY.Version), Integer.valueOf(i3), Boolean.valueOf(c.f(this.jtN))});
            if (i3 == c.jqI && c.aTe()) {
                c.b(this.jtN, true);
                ab.i("MicroMsg.BackupMoveRecoverServer", "onBackupAuthEnd is Resume Move!!!.");
            } else {
                this.jtN.aTf();
                c.b(this.jtN, false);
                ab.i("MicroMsg.BackupMoveRecoverServer", "onBackupAuthEnd is Normal move.");
            }
            c.g(this.jtN);
            b.a(3, c.h(this.jtN));
            new k(b.aSZ().jqO).aUc();
            b.aSZ().aSu().jqW = 22;
            this.jtN.rj(22);
            AppMethodBeat.o(17250);
            return;
        }
        ab.e("MicroMsg.BackupMoveRecoverServer", "onBackupAuthEnd auth failed");
        b.aSZ().aSu().jqW = -5;
        this.jtN.rj(-5);
        this.jtN.rn(3);
        AppMethodBeat.o(17250);
    }
}
