package com.tencent.mm.plugin.radar.b;

import a.f.b.j;
import a.k.m;
import a.l;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.ai.e;
import com.tencent.mm.model.bz.a;
import com.tencent.mm.platformtools.aa;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.br;
import com.tencent.mm.storage.ad;
import java.util.Map;

@l(dWo = {1, 1, 13}, dWp = {"\u0000\u001f\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J\u0010\u0010\u0006\u001a\u00020\u00072\u0006\u0010\b\u001a\u00020\tH\u0016R\u000e\u0010\u0002\u001a\u00020\u0003XD¢\u0006\u0002\n\u0000R\u000e\u0010\u0004\u001a\u00020\u0003XD¢\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0003XD¢\u0006\u0002\n\u0000¨\u0006\n"}, dWq = {"com/tencent/mm/plugin/radar/model/RadarAddContact$msgListener$1", "Lcom/tencent/mm/model/SysCmdMsgExtension$ISysCmdMsgListener;", "NODE_ENCRYPT_USERNAME", "", "NODE_TYPE", "NODE_USERNAME", "onRecieveMsg", "", "addMsgInfo", "Lcom/tencent/mm/modelbase/IMessageExtension$AddMsgInfo;", "plugin-radar_release"})
public final class c$g implements a {
    final /* synthetic */ c pAV;
    private final String pBc = ".sysmsg.addcontact.type";
    private final String pBd = ".sysmsg.addcontact.username";
    private final String pBe = ".sysmsg.addcontact.encryptusername";

    c$g(c cVar) {
        this.pAV = cVar;
    }

    public final void a(e.a aVar) {
        AppMethodBeat.i(102877);
        j.p(aVar, "addMsgInfo");
        Map z = br.z(aa.a(aVar.eAB.vED), "sysmsg");
        if (z == null) {
            AppMethodBeat.o(102877);
            return;
        }
        if (j.j((String) z.get(this.pBc), "1")) {
            int i;
            String str = (String) z.get(this.pBd);
            String str2 = (String) z.get(this.pBe);
            CharSequence charSequence = str;
            if (charSequence == null || m.ar(charSequence)) {
                i = 1;
            } else {
                i = 0;
            }
            if (i == 0) {
                charSequence = str2;
                i = (charSequence == null || m.ar(charSequence)) ? 1 : 0;
                if (i == 0) {
                    ad adVar = new ad();
                    adVar.setUsername(str);
                    adVar.iH(str2);
                    c.c(this.pAV, adVar);
                    ab.d(c.access$getTAG$cp(), "receive contact added system message useranme %s, encypt %s", new Object[]{adVar.getUsername(), adVar.Hv()});
                }
            }
            ab.e(c.access$getTAG$cp(), "error! server return incorrect content! : %s", new Object[]{r5});
            AppMethodBeat.o(102877);
            return;
        }
        AppMethodBeat.o(102877);
    }
}
