package com.tencent.mm.plugin.account.friend.ui;

import android.app.ProgressDialog;
import android.content.Context;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.ai.f;
import com.tencent.mm.ai.m;
import com.tencent.mm.plugin.account.friend.a.ah;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.ui.base.h;
import com.tencent.ytcommon.BuildConfig;

public final class g implements f {
    private Context context;
    private ProgressDialog fsh;
    a gyh;
    private boolean gyi = true;
    String gyj = BuildConfig.FLAVOR;

    public g(Context context, a aVar) {
        this.context = context;
        this.gyh = aVar;
        this.gyi = true;
    }

    public g(Context context, a aVar, byte b) {
        this.context = context;
        this.gyh = aVar;
        this.gyi = false;
    }

    public final void m(int[] iArr) {
        AppMethodBeat.i(108650);
        com.tencent.mm.kernel.g.Rg().a(116, this);
        ah ahVar = new ah(iArr);
        com.tencent.mm.kernel.g.Rg().a(ahVar, 0);
        if (this.gyi) {
            Context context = this.context;
            this.context.getString(2131300660);
            this.fsh = h.b(context, this.context.getString(2131300658), true, new 1(this, ahVar));
        }
        AppMethodBeat.o(108650);
    }

    public final void onSceneEnd(int i, int i2, String str, m mVar) {
        AppMethodBeat.i(108651);
        if (mVar.getType() != 116) {
            AppMethodBeat.o(108651);
            return;
        }
        if (this.fsh != null) {
            this.fsh.dismiss();
            this.fsh = null;
        }
        com.tencent.mm.kernel.g.Rg().b(116, this);
        if (i == 0 && i2 == 0) {
            ab.i("MicroMsg.SendInviteEmail", "dealSendInviteEmailSuccess");
            if (this.gyi) {
                h.a(this.context, 2131300657, 2131297061, new 2(this));
                AppMethodBeat.o(108651);
                return;
            }
            this.gyh.e(true, this.gyj);
            AppMethodBeat.o(108651);
            return;
        }
        ab.i("MicroMsg.SendInviteEmail", "dealSendInviteEmailFail");
        this.gyh.e(false, this.gyj);
        AppMethodBeat.o(108651);
    }
}
