package com.mstar.android.tv;

import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
import android.os.Message;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.util.Log;
import com.mstar.android.tv.IEventClient;
import com.mstar.android.tv.ITvService;
import com.mstar.android.tvapi.common.exception.TvCommonException;
import com.mstar.android.tvapi.dtv.common.CiManager;
import com.mstar.android.tvapi.dtv.common.DtvManager;
import com.mstar.android.tvapi.dtv.vo.EnumCardState;
import com.mstar.android.tvapi.dtv.vo.EnumMmiType;
import java.util.ArrayList;
import java.util.Iterator;

/* JADX INFO: loaded from: classes.dex */
public class TvCiManager extends IEventClient.Stub {
    public static final int CARD_STATE_INITIALIZING = 1;
    public static final int CARD_STATE_MAX = 4;
    public static final int CARD_STATE_NO = 0;
    public static final int CARD_STATE_READY = 2;
    public static final int CARD_STATE_RESET = 3;
    public static final int CIMMI_ENQ = 3;
    public static final int CIMMI_LIST = 2;
    public static final int CIMMI_MENU = 1;
    public static final int CIMMI_NONE = 0;
    public static final int CIMMI_TEXT = 4;
    public static final int CI_ASYNC_CMD_SWITCH_CI_SLOT = 2;
    public static final int CI_ASYNC_CMD_SWITCH_ROUTE = 1;
    public static final int CI_NOTIFY_CU_IS_PROGRESS = 0;
    public static final int CI_NOTIFY_OP_IS_TUNING = 1;
    private static final String TAG = "TvCiManager";
    public static final int TVCI_ASYNC_COMMAND_NOTIFY = 6;
    public static final int TVCI_STATUS_CHANGE_TUNER_OCCUPIED = 5;
    public static final int TVCI_UI_AUTOTEST_MESSAGE_SHOWN = 4;
    public static final int TVCI_UI_CARD_INSERTED = 2;
    public static final int TVCI_UI_CARD_REMOVED = 3;
    public static final int TVCI_UI_CLOSEMMI = 1;
    public static final int TVCI_UI_DATA_READY = 0;
    private static TvCiManager mInstance;
    private static ITvCi mService;
    private EventHandler mHandler;

    @Deprecated
    private ArrayList<CiManager.OnCiEventListener> mCiListeners = null;
    private ArrayList<OnUiEventListener> mUiEventListeners = null;
    private final ArrayList<OnCiStatusChangeEventListener> mCiStatusChangeEventListeners = new ArrayList<>();
    private final ArrayList<OnCiAsyncCmdNotifyListener> mCiCmdNotifyListeners = new ArrayList<>();

    private class EventHandler extends Handler {
        EventHandler(Looper looper) {
            super(looper);
        }

        @Override // android.os.Handler
        public void handleMessage(Message message) {
            if (TvCiManager.this.mUiEventListeners == null || message.what > 4) {
                int i2 = message.what;
                if (i2 <= 5) {
                    synchronized (TvCiManager.this.mCiStatusChangeEventListeners) {
                        try {
                            Iterator it = TvCiManager.this.mCiStatusChangeEventListeners.iterator();
                            while (it.hasNext()) {
                                ((OnCiStatusChangeEventListener) it.next()).onCiStatusChanged(message.what, message.arg1, message.arg2);
                            }
                        } finally {
                        }
                    }
                } else if (i2 <= 6) {
                    synchronized (TvCiManager.this.mCiCmdNotifyListeners) {
                        try {
                            Iterator it2 = TvCiManager.this.mCiCmdNotifyListeners.iterator();
                            while (it2.hasNext()) {
                                ((OnCiAsyncCmdNotifyListener) it2.next()).onCiCmdNotify(message.what, message.arg1, message.arg2);
                            }
                        } finally {
                        }
                    }
                }
            } else {
                synchronized (TvCiManager.this.mUiEventListeners) {
                    try {
                        Iterator it3 = TvCiManager.this.mUiEventListeners.iterator();
                        while (it3.hasNext()) {
                            ((OnUiEventListener) it3.next()).onUiEvent(message.what);
                        }
                    } finally {
                    }
                }
            }
            if (TvCiManager.this.mCiListeners != null) {
                int i3 = message.what;
                if (i3 == 0) {
                    Iterator it4 = TvCiManager.this.mCiListeners.iterator();
                    while (it4.hasNext()) {
                        try {
                            ((CiManager.OnCiEventListener) it4.next()).onUiDataReady(DtvManager.getCiManager(), message.what);
                        } catch (TvCommonException e2) {
                            e2.printStackTrace();
                        }
                    }
                    return;
                }
                if (i3 == 1) {
                    Iterator it5 = TvCiManager.this.mCiListeners.iterator();
                    while (it5.hasNext()) {
                        try {
                            ((CiManager.OnCiEventListener) it5.next()).onUiCloseMmi(DtvManager.getCiManager(), message.what);
                        } catch (TvCommonException e3) {
                            e3.printStackTrace();
                        }
                    }
                    return;
                }
                if (i3 == 2) {
                    Iterator it6 = TvCiManager.this.mCiListeners.iterator();
                    while (it6.hasNext()) {
                        try {
                            ((CiManager.OnCiEventListener) it6.next()).onUiCardInserted(DtvManager.getCiManager(), message.what);
                        } catch (TvCommonException e4) {
                            e4.printStackTrace();
                        }
                    }
                    return;
                }
                if (i3 == 3) {
                    Iterator it7 = TvCiManager.this.mCiListeners.iterator();
                    while (it7.hasNext()) {
                        try {
                            ((CiManager.OnCiEventListener) it7.next()).onUiCardRemoved(DtvManager.getCiManager(), message.what);
                        } catch (TvCommonException e5) {
                            e5.printStackTrace();
                        }
                    }
                    return;
                }
                if (i3 != 4) {
                    Log.e(TvCiManager.TAG, "Unknown message type " + message.what);
                    return;
                }
                Iterator it8 = TvCiManager.this.mCiListeners.iterator();
                while (it8.hasNext()) {
                    try {
                        ((CiManager.OnCiEventListener) it8.next()).onUiAutotestMessageShown(DtvManager.getCiManager(), message.what);
                    } catch (TvCommonException e6) {
                        e6.printStackTrace();
                    }
                }
            }
        }
    }

    public interface OnCiAsyncCmdNotifyListener {
        boolean onCiCmdNotify(int i2, int i3, int i4);
    }

    public interface OnCiStatusChangeEventListener {
        boolean onCiStatusChanged(int i2, int i3, int i4);
    }

    public interface OnUiEventListener {
        boolean onUiEvent(int i2);
    }

    private TvCiManager() throws TvCommonException {
        this.mHandler = null;
        if (true == TvServiceBinder.isNeedBindService()) {
            ITvService tvService = TvServiceBinder.getTvService();
            if (tvService == null) {
                Log.e(TAG, "TvService doesn't exist!!");
                throw new TvCommonException("TvService doesn't exist.");
            }
            try {
                mService = tvService.getTvCi();
            } catch (RemoteException e2) {
                e2.printStackTrace();
            }
        } else {
            IBinder service = ServiceManager.getService("tv");
            if (service == null) {
                Log.e(TAG, "TvService doesn't exist!!");
                throw new TvCommonException("TvService doesn't exist.");
            }
            try {
                mService = ITvService.Stub.asInterface(service).getTvCi();
            } catch (RemoteException e3) {
                e3.printStackTrace();
            }
        }
        Looper looperMyLooper = Looper.myLooper();
        if (looperMyLooper != null) {
            this.mHandler = new EventHandler(looperMyLooper);
        } else {
            Looper mainLooper = Looper.getMainLooper();
            if (mainLooper != null) {
                this.mHandler = new EventHandler(mainLooper);
            } else {
                this.mHandler = null;
            }
        }
        try {
            mService.addClient(this);
        } catch (RemoteException e4) {
            e4.printStackTrace();
        }
    }

    public static TvCiManager getInstance() {
        if (mInstance == null) {
            synchronized (TvCiManager.class) {
                if (mInstance == null) {
                    try {
                        mInstance = new TvCiManager();
                    } catch (TvCommonException e2) {
                        e2.printStackTrace();
                        return null;
                    }
                }
            }
        }
        return mInstance;
    }

    public boolean answerEnq(String str) {
        Log.d(TAG, "answerEnq, password = " + str);
        try {
            return mService.answerEnq(str);
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return false;
        }
    }

    public void answerMenu(short s2) {
        Log.d(TAG, "answerMenu, index = " + ((int) s2));
        try {
            mService.answerMenu(s2);
        } catch (RemoteException e2) {
            e2.printStackTrace();
        }
    }

    public boolean backEnq() {
        Log.d(TAG, "backEnq");
        try {
            return mService.backEnq();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return false;
        }
    }

    public void backMenu() {
        Log.d(TAG, "backMenu");
        try {
            mService.backMenu();
        } catch (RemoteException e2) {
            e2.printStackTrace();
        }
    }

    public void ciClearOPSearchSuspended() {
        Log.d(TAG, "ciClearOPSearchSuspended");
        try {
            mService.ciClearOPSearchSuspended();
        } catch (RemoteException e2) {
            e2.printStackTrace();
        }
    }

    public void close() {
        Log.d(TAG, "close");
        try {
            mService.close();
        } catch (RemoteException e2) {
            e2.printStackTrace();
        }
    }

    public boolean deleteOpCacheByCicamId(int i2) {
        Log.d(TAG, "deleteOpCacheByCicamId, u32CicamId = " + i2);
        try {
            return mService.deleteOpCacheByCicamId(i2);
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return false;
        }
    }

    public boolean deleteOpCacheByIndex(short s2) {
        Log.d(TAG, "deleteOpCacheByIndex, Index = " + ((int) s2));
        try {
            return mService.deleteOpCacheByIndex(s2);
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return false;
        }
    }

    public void enablePerformanceMonitor(boolean z2) {
        Log.d(TAG, "enablePerformanceMonitor, bEnable = " + z2);
        try {
            mService.enablePerformanceMonitor(z2);
        } catch (RemoteException e2) {
            e2.printStackTrace();
        }
    }

    public void enterCiOperatorProfile(short s2) {
        Log.d(TAG, "enterCiOperatorProfile, Index = " + ((int) s2));
        try {
            mService.enterCiOperatorProfile(s2);
        } catch (RemoteException e2) {
            e2.printStackTrace();
        }
    }

    public void enterMenu() {
        Log.d(TAG, "enterMenu");
        try {
            mService.enterMenu();
        } catch (RemoteException e2) {
            e2.printStackTrace();
        }
    }

    public void exitCiOperatorProfile() {
        Log.d(TAG, "exitCiOperatorProfile");
        try {
            mService.exitCiOperatorProfile();
        } catch (RemoteException e2) {
            e2.printStackTrace();
        }
    }

    protected void finalize() throws Throwable {
        Log.d(TAG, "finalize TvCiManager ");
        try {
            mService.removeClient(this);
        } catch (RemoteException e2) {
            e2.printStackTrace();
        }
    }

    @Deprecated
    public EnumCardState getCardState() {
        return EnumCardState.values()[getCiCardState()];
    }

    public int getCiCamPinCode() {
        try {
            return mService.getCiCamPinCode();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return 65535;
        }
    }

    public int getCiCardState() {
        Log.d(TAG, "getCardState");
        try {
            return mService.getCardState();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return 0;
        }
    }

    public CiManager.CredentialValidDateRange getCiCredentialValidRange() {
        Log.d(TAG, "getCiCredentialValidRange");
        try {
            int i2 = mService.getCiCredentialValidRange()[0];
            throw null;
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return null;
        }
    }

    public int getCiMmiType() {
        Log.d(TAG, "getCiMmiType");
        try {
            return mService.getMmiType();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return 0;
        }
    }

    public int getCurrentOpCicamId() {
        Log.d(TAG, "getCurrentOpCicamId");
        try {
            return mService.getCurrentOpCicamId();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return 0;
        }
    }

    public short getCurrentOpIndexByCicamId(int i2) {
        Log.d(TAG, "getCurrentOpIndexByCicamId, u32CicamId = " + i2);
        try {
            return (short) mService.getCurrentOpIndexByCicamId(i2);
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return (short) 0;
        }
    }

    public short getEnqAnsLength() {
        Log.d(TAG, "getEnqAnsLength");
        try {
            return (short) mService.getEnqAnsLength();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return (short) 0;
        }
    }

    public short getEnqBlindAnswer() {
        Log.d(TAG, "getEnqBlindAnswer");
        try {
            return (short) mService.getEnqBlindAnswer();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return (short) 0;
        }
    }

    public short getEnqLength() {
        Log.d(TAG, "getEnqLength");
        try {
            return (short) mService.getEnqLength();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return (short) 0;
        }
    }

    public String getEnqString() {
        Log.d(TAG, "getEnqString");
        try {
            return mService.getEnqString();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return null;
        }
    }

    public int getListBottomLength() {
        Log.d(TAG, "getListBottomLength");
        try {
            return mService.getListBottomLength();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return 0;
        }
    }

    public String getListBottomString() {
        Log.d(TAG, "getListBottomString");
        try {
            return mService.getListBottomString();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return null;
        }
    }

    public short getListChoiceNumber() {
        Log.d(TAG, "getListChoiceNumber");
        try {
            return (short) mService.getListChoiceNumber();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return (short) 0;
        }
    }

    public String getListSelectionString(int i2) {
        Log.d(TAG, "getListSelectionString, index = " + i2);
        try {
            return mService.getListSelectionString(i2);
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return null;
        }
    }

    public int getListSubtitleLength() {
        Log.d(TAG, "getListSubtitleLength");
        try {
            return mService.getListSubtitleLength();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return 0;
        }
    }

    public String getListSubtitleString() {
        Log.d(TAG, "getListSubtitleString");
        try {
            return mService.getListSubtitleString();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return null;
        }
    }

    public int getListTitleLength() {
        Log.d(TAG, "getListTitleLength");
        try {
            return mService.getListTitleLength();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return 0;
        }
    }

    public String getListTitleString() {
        Log.d(TAG, "getListTitleString");
        try {
            return mService.getListTitleString();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return null;
        }
    }

    public int getMenuBottomLength() {
        Log.d(TAG, "getMenuBottomLength");
        try {
            return mService.getMenuBottomLength();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return 0;
        }
    }

    public String getMenuBottomString() {
        Log.d(TAG, "getMenuBottomString");
        try {
            return mService.getMenuBottomString();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return null;
        }
    }

    public short getMenuChoiceNumber() {
        Log.d(TAG, "getMenuChoiceNumber");
        try {
            return (short) mService.getMenuChoiceNumber();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return (short) 0;
        }
    }

    public String getMenuSelectionString(int i2) {
        Log.d(TAG, "getMenuSelectionString, index = " + i2);
        try {
            return mService.getMenuSelectionString(i2);
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return null;
        }
    }

    public String getMenuString() {
        Log.d(TAG, "getMenuString");
        try {
            return mService.getMenuString();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return null;
        }
    }

    public int getMenuSubtitleLength() {
        Log.d(TAG, "getMenuSubtitleLength");
        try {
            return mService.getMenuSubtitleLength();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return 0;
        }
    }

    public String getMenuSubtitleString() {
        Log.d(TAG, "getMenuSubtitleString");
        try {
            return mService.getMenuSubtitleString();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return null;
        }
    }

    public int getMenuTitleLength() {
        Log.d(TAG, "getMenuTitleLength");
        try {
            return mService.getMenuTitleLength();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return 0;
        }
    }

    public String getMenuTitleString() {
        Log.d(TAG, "getMenuTitleString");
        try {
            return mService.getMenuTitleString();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return null;
        }
    }

    @Deprecated
    public EnumMmiType getMmiType() {
        Log.d(TAG, "getMmiType");
        return EnumMmiType.values()[getCiMmiType()];
    }

    public short getOpCacheCount() {
        Log.d(TAG, "getOpCacheCount");
        try {
            return (short) mService.getOpCacheCount();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return (short) 0;
        }
    }

    public short getOpDtvSysTypeByIndex(short s2) {
        Log.d(TAG, "getOpDtvSysTypeByIndex, Index = " + ((int) s2));
        try {
            return (short) mService.getOpDtvSysTypeByIndex(s2);
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return (short) 0;
        }
    }

    public short getOpIso639LangCodeByCicamId(int i2) {
        Log.d(TAG, "getOpIso639LangCodeByCicamId, u32CicamId = " + i2);
        try {
            return (short) mService.getOpIso639LangCodeByCicamId(i2);
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return (short) 0;
        }
    }

    public String getOpProfileNameByIndex(short s2) {
        Log.d(TAG, "getOpProfileNameByIndex, Index = " + ((int) s2));
        try {
            return mService.getOpProfileNameByIndex(s2);
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return null;
        }
    }

    public boolean isCiCredentialModeValid(short s2) {
        Log.d(TAG, "isCiCredentialModeValid, credentialMode = " + ((int) s2));
        try {
            return mService.isCiCredentialModeValid(s2);
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return false;
        }
    }

    public boolean isCiMenuOn() {
        Log.d(TAG, "isCiMenuOn");
        try {
            return mService.isCiMenuOn();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return false;
        }
    }

    public boolean isCiOccupiedTuner(boolean z2) {
        Log.d(TAG, "isCiOccupiedTuner");
        try {
            return mService.isCiOccupiedTuner(z2);
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return false;
        }
    }

    public boolean isDataExisted() {
        Log.d(TAG, "isDataExisted");
        try {
            return mService.isDataExisted();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return false;
        }
    }

    public boolean isInCuProgress() {
        Log.d(TAG, "isInCuProgress");
        try {
            return mService.isInCuProgress();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return false;
        }
    }

    public boolean isOpMode() {
        Log.d(TAG, "isOpMode");
        try {
            return mService.isOpMode();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return false;
        }
    }

    public boolean isOpTuning() {
        Log.d(TAG, "isOpTuning");
        try {
            return mService.isOpTuning();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return false;
        }
    }

    public boolean notifyPowerDown() {
        Log.d(TAG, "notifyPowerDown");
        try {
            return mService.notifyPowerDown();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return false;
        }
    }

    @Override // com.mstar.android.tv.IEventClient
    public boolean onEvent(Message message) throws RemoteException {
        EventHandler eventHandler = this.mHandler;
        if (eventHandler == null) {
            return true;
        }
        Message messageObtainMessage = eventHandler.obtainMessage();
        messageObtainMessage.copyFrom(message);
        this.mHandler.sendMessage(messageObtainMessage);
        return true;
    }

    public boolean registerOnCiAsyncCmdNotifyListener(OnCiAsyncCmdNotifyListener onCiAsyncCmdNotifyListener) {
        synchronized (this.mCiCmdNotifyListeners) {
            this.mCiCmdNotifyListeners.add(onCiAsyncCmdNotifyListener);
        }
        return true;
    }

    @Deprecated
    public boolean registerOnCiEventListener(CiManager.OnCiEventListener onCiEventListener) {
        if (this.mCiListeners == null) {
            this.mCiListeners = new ArrayList<>();
        }
        this.mCiListeners.add(onCiEventListener);
        return true;
    }

    public boolean registerOnCiStatusChangeEventListener(OnCiStatusChangeEventListener onCiStatusChangeEventListener) {
        synchronized (this.mCiStatusChangeEventListeners) {
            this.mCiStatusChangeEventListeners.add(onCiStatusChangeEventListener);
        }
        return true;
    }

    public boolean registerOnUiEventListener(OnUiEventListener onUiEventListener) {
        if (this.mUiEventListeners == null) {
            synchronized (TvCiManager.class) {
                try {
                    if (this.mUiEventListeners == null) {
                        this.mUiEventListeners = new ArrayList<>();
                    }
                } finally {
                }
            }
        }
        synchronized (TvCiManager.class) {
            this.mUiEventListeners.add(onUiEventListener);
        }
        return true;
    }

    public void resetAppInfoPowerDown() {
        Log.d(TAG, "resetAppInfoPowerDown");
        try {
            mService.resetAppInfoPowerDown();
        } catch (RemoteException e2) {
            e2.printStackTrace();
        }
    }

    public boolean resetOPCacheDB(boolean z2) {
        Log.d(TAG, "resetOPCacheDB, bDisableChannel = " + z2);
        try {
            return mService.resetOPCacheDB(z2);
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return false;
        }
    }

    public boolean sendCiOpSearchCancel() {
        Log.d(TAG, "sendCiOpSearchCancel");
        try {
            return mService.sendCiOpSearchCancel();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return false;
        }
    }

    public boolean sendCiOpSearchStart(boolean z2) {
        Log.d(TAG, "sendCiOpSearchStart, bUnattendedFlag = " + z2);
        try {
            return mService.sendCiOpSearchStart(z2);
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return false;
        }
    }

    public void setCIDebugLevel(int i2, int i3) {
        Log.d(TAG, "setCIDebugLevel, debugindex = " + i2 + ", debuglevel = " + i3);
        try {
            mService.setCIDebugLevel(i2, i3);
        } catch (RemoteException e2) {
            e2.printStackTrace();
        }
    }

    public void setCiCamPinCode(int i2) {
        try {
            mService.setCiCamPinCode(i2);
        } catch (RemoteException e2) {
            e2.printStackTrace();
        }
    }

    public void setCiCredentialMode(short s2) {
        Log.d(TAG, "setCiCredentialMode, credentialMode = " + ((int) s2));
        try {
            mService.setCiCredentialMode(s2);
        } catch (RemoteException e2) {
            e2.printStackTrace();
        }
    }

    public void setDebugMode(boolean z2) {
        Log.d(TAG, "setDebugMode, mode" + z2);
        try {
            mService.setDebugMode(z2);
        } catch (RemoteException e2) {
            e2.printStackTrace();
        }
    }

    public boolean unregisterOnCiAsyncCmdNotifyListener(OnCiAsyncCmdNotifyListener onCiAsyncCmdNotifyListener) {
        synchronized (this.mCiCmdNotifyListeners) {
            this.mCiCmdNotifyListeners.remove(onCiAsyncCmdNotifyListener);
        }
        return true;
    }

    @Deprecated
    public synchronized boolean unregisterOnCiEventListener(CiManager.OnCiEventListener onCiEventListener) {
        this.mCiListeners.remove(onCiEventListener);
        if (this.mCiListeners.size() == 0) {
            this.mCiListeners = null;
        }
        return true;
    }

    public boolean unregisterOnCiStatusChangeEventListener(OnCiStatusChangeEventListener onCiStatusChangeEventListener) {
        synchronized (this.mCiStatusChangeEventListeners) {
            this.mCiStatusChangeEventListeners.remove(onCiStatusChangeEventListener);
        }
        return true;
    }

    public boolean unregisterOnUiEventListener(OnUiEventListener onUiEventListener) {
        synchronized (TvCiManager.class) {
            this.mUiEventListeners.remove(onUiEventListener);
        }
        return true;
    }

    public boolean updateOpCurrentServiceTripleId() {
        Log.d(TAG, "updateOpCurrentServiceTripleId");
        try {
            return mService.updateOpCurrentServiceTripleId();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return false;
        }
    }
}
