package com.tencent.mm.app.plugin.a;

import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.aj.d;
import com.tencent.mm.aj.f;
import com.tencent.mm.g.a.lq;
import com.tencent.mm.sdk.b.b;
import com.tencent.mm.sdk.b.c;
import com.tencent.mm.sdk.platformtools.ab;

class a$b extends c<lq> {
    final /* synthetic */ a cgS;

    a$b(a aVar) {
        this.cgS = aVar;
        AppMethodBeat.i(15725);
        this.xxI = lq.class.getName().hashCode();
        AppMethodBeat.o(15725);
    }

    public final /* synthetic */ boolean a(b bVar) {
        AppMethodBeat.i(15726);
        lq lqVar = (lq) bVar;
        if (this.cgS.cgL != null) {
            if (!this.cgS.cgL.yTx.isFinishing()) {
                int i = lqVar.cHu.op;
                String str = lqVar.cHu.cEN;
                ab.i("MicroMsg.exdevice.ChattingUIExDeviceLogic", "opcode is %d, brand name is %s", new Object[]{Integer.valueOf(i), str});
                if (this.cgS.cgL.getTalkerUserName().equals(str)) {
                    switch (i) {
                        case 1:
                            a aVar = this.cgS;
                            ab.i("MicroMsg.exdevice.ChattingUIExDeviceLogic", "handleConnectFailedReason, reason : %d, brand name : %s", new Object[]{Integer.valueOf(lqVar.cHu.boZ), str});
                            d qX = f.qX(str);
                            if (a.a(qX)) {
                                if (qX.cJ(false).aej().fvI == 1) {
                                    aVar.cgL.yTx.setMMSubTitle(null);
                                    break;
                                }
                            }
                            ab.w("MicroMsg.exdevice.ChattingUIExDeviceLogic", "It's not a biz, brandName(%s).", new Object[]{str});
                            break;
                            break;
                        case 2:
                            this.cgS.d(lqVar.cHu.cxs, str, lqVar.cHu.ceI);
                            break;
                        case 3:
                            if (this.cgS.cgP != null) {
                                this.cgS.cgP.clear();
                                ab.i("MicroMsg.exdevice.ChattingUIExDeviceLogic", "clear connected device ids successfully.");
                                break;
                            }
                            break;
                    }
                }
                ab.i("MicroMsg.exdevice.ChattingUIExDeviceLogic", "not current brandname");
            } else {
                ab.e("MicroMsg.exdevice.ChattingUIExDeviceLogic", "context isFinishing");
            }
        } else {
            ab.e("MicroMsg.exdevice.ChattingUIExDeviceLogic", "context == null");
        }
        AppMethodBeat.o(15726);
        return false;
    }
}
