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

import android.view.View;
import android.view.View.OnClickListener;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.bi.d;
import com.tencent.mm.pluginsdk.ui.applet.a;
import com.tencent.mm.pluginsdk.ui.preference.b;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.bo;
import com.tencent.mm.storage.ad;
import java.util.LinkedList;

class b$2 implements OnClickListener {
    final /* synthetic */ b stz;

    b$2(b bVar) {
        this.stz = bVar;
    }

    public final void onClick(View view) {
        AppMethodBeat.i(25347);
        if (view.getTag() instanceof b) {
            ab.d("MicroMsg.FMessageConversationUI", "addOnClick onClick");
            b bVar = (b) view.getTag();
            if (bVar == null || bo.isNullOrNil(bVar.username)) {
                ab.e("MicroMsg.FMessageConversationUI", "cpan add contact failed. username is null.");
                AppMethodBeat.o(25347);
                return;
            }
            ad a = b.a(d.akO().apx(bVar.username));
            a aVar = new a(b.a(this.stz), new 1(this, bVar, a));
            ab.d("MicroMsg.FMessageConversationUI", "try to addcontact, username = " + bVar.username + ", opcode = MM_VERIFYUSER_ADDCONTACT");
            LinkedList linkedList = new LinkedList();
            linkedList.add(Integer.valueOf(bVar.qvb));
            aVar.ajw(a.dus);
            aVar.b(bVar.username, linkedList, true);
        }
        AppMethodBeat.o(25347);
    }
}
