package com.tencent.mm.ar;

import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.ai.b;
import com.tencent.mm.ai.m;
import com.tencent.mm.ai.w.a;
import com.tencent.mm.openim.b.s;
import com.tencent.mm.protocal.protobuf.all;
import com.tencent.mm.sdk.platformtools.ab;

class c$5 implements a {
    final /* synthetic */ c fCH;
    final /* synthetic */ String fCK;

    c$5(c cVar, String str) {
        this.fCH = cVar;
        this.fCK = str;
    }

    public final int a(int i, int i2, String str, b bVar, m mVar) {
        AppMethodBeat.i(16474);
        if (mVar.getType() != 881) {
            AppMethodBeat.o(16474);
        } else {
            this.fCH.frc = false;
            if (i == 0 && i2 == 0) {
                if (!this.fCH.fCA.isEmpty() && this.fCH.fCF.doT()) {
                    this.fCH.fCF.ae(500, 500);
                }
                s.a((all) bVar.fsH.fsP);
                boolean rY = d.agM().rY(this.fCK);
                ab.i("MicroMsg.GetContactService", "getopenimcontact onResult %s %s", new Object[]{Boolean.valueOf(rY), this.fCK});
                this.fCH.H(this.fCK, true);
                AppMethodBeat.o(16474);
            } else {
                ab.e("MicroMsg.GetContactService", "tryStartNetscene onSceneEnd openImUser errType: %s  errCode: %s username %s will retry/del ", new Object[]{Integer.valueOf(i), Integer.valueOf(i2), this.fCK});
                if (i == 4) {
                    d.agM().rY(this.fCK);
                }
                this.fCH.fCF.ae(10000, 10000);
                this.fCH.H(this.fCK, false);
                AppMethodBeat.o(16474);
            }
        }
        return 0;
    }
}
