package com.seewo.remote.e.h;

import android.util.Log;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;

/* JADX INFO: compiled from: ClientControlHandler.java */
/* JADX INFO: loaded from: classes.dex */
public class c extends ChannelInboundHandlerAdapter {
    private com.seewo.remote.e.i.a b;

    public c(com.seewo.remote.e.i.a aVar) {
        this.b = aVar;
    }

    @Override // io.netty.channel.ChannelInboundHandlerAdapter, io.netty.channel.ChannelInboundHandler
    public void channelActive(ChannelHandlerContext channelHandlerContext) throws Exception {
        Log.v("ClientControlHandler", "channelActive");
        if (this.b.c(channelHandlerContext)) {
            this.b.d(channelHandlerContext);
        } else {
            channelHandlerContext.disconnect();
        }
    }

    @Override // io.netty.channel.ChannelInboundHandlerAdapter, io.netty.channel.ChannelInboundHandler
    public void channelInactive(ChannelHandlerContext channelHandlerContext) throws Exception {
        Log.v("ClientControlHandler", "channelInactive");
        this.b.a(channelHandlerContext);
    }
}
