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.common.vo.Enum3dType;
import com.mstar.android.tvapi.common.vo.EnumThreeDVideo3DOutputAspect;
import com.mstar.android.tvapi.common.vo.EnumThreeDVideo3DTo2D;
import com.mstar.android.tvapi.common.vo.EnumThreeDVideoAutoStart;
import com.mstar.android.tvapi.common.vo.EnumThreeDVideoDisplayFormat;
import com.mstar.android.tvapi.common.vo.EnumThreeDVideoLrViewSwitch;
import com.mstar.android.tvapi.common.vo.EnumThreeDVideoSelfAdaptiveDetect;
import java.util.ArrayList;
import java.util.Iterator;

/* JADX INFO: loaded from: classes.dex */
public class TvS3DManager extends IEventClient.Stub {
    private static final String TAG = "TvS3DManager";
    public static final int THREED_COMMON_4K2K_UNSUPPORT_DUALVIEW = 2;
    public static final int THREED_COMMON_ENABLE_3D = 1;
    private static final int THREED_COMMON_EVENT_END = 999;
    private static final int THREED_COMMON_EVENT_START = 0;
    public static final int THREED_COMMON_UPDATE_3D_INFO = 3;
    public static final int THREE_DIMENSIONS_3D_GAIN_MAX = 31;
    public static final int THREE_DIMENSIONS_3D_GAIN_MIN = 0;
    public static final int THREE_DIMENSIONS_3D_ITEM_ASPECTRATIO = 2;
    public static final int THREE_DIMENSIONS_3D_ITEM_AUTODETECT = 3;
    public static final int THREE_DIMENSIONS_3D_ITEM_GAIN = 0;
    public static final int THREE_DIMENSIONS_3D_ITEM_OFFSET = 1;
    public static final int THREE_DIMENSIONS_3D_OFFSET_MAX = 31;
    public static final int THREE_DIMENSIONS_3D_OFFSET_MIN = 0;
    public static final int THREE_DIMENSIONS_DISPLAY_FORMAT_2DTO3D = 5;
    public static final int THREE_DIMENSIONS_DISPLAY_FORMAT_AUTO = 6;
    public static final int THREE_DIMENSIONS_DISPLAY_FORMAT_CHECK_BOARD = 7;
    public static final int THREE_DIMENSIONS_DISPLAY_FORMAT_FRAME_ALTERNATIVE = 9;
    public static final int THREE_DIMENSIONS_DISPLAY_FORMAT_FRAME_PACKING = 3;
    public static final int THREE_DIMENSIONS_DISPLAY_FORMAT_LINE_ALTERNATIVE = 4;
    public static final int THREE_DIMENSIONS_DISPLAY_FORMAT_NONE = 0;
    public static final int THREE_DIMENSIONS_DISPLAY_FORMAT_PIXEL_ALTERNATIVE = 8;
    public static final int THREE_DIMENSIONS_DISPLAY_FORMAT_SIDE_BY_SIDE = 1;
    public static final int THREE_DIMENSIONS_DISPLAY_FORMAT_TOP_BOTTOM = 2;
    public static final int THREE_DIMENSIONS_TYPE_2DTO3D = 9;
    public static final int THREE_DIMENSIONS_TYPE_4K2K_VIDEO_SPLIT = 12;
    public static final int THREE_DIMENSIONS_TYPE_CHECK_BORAD = 8;
    public static final int THREE_DIMENSIONS_TYPE_DUALVIEW = 10;
    public static final int THREE_DIMENSIONS_TYPE_FIELD_ALTERNATIVE = 7;
    public static final int THREE_DIMENSIONS_TYPE_FRAME_ALTERNATIVE = 6;
    public static final int THREE_DIMENSIONS_TYPE_FRAME_L = 13;
    public static final int THREE_DIMENSIONS_TYPE_FRAME_PACKING_1080P = 3;
    public static final int THREE_DIMENSIONS_TYPE_FRAME_PACKING_720P = 4;
    public static final int THREE_DIMENSIONS_TYPE_FRAME_R = 14;
    public static final int THREE_DIMENSIONS_TYPE_LINE_ALTERNATIVE = 5;
    public static final int THREE_DIMENSIONS_TYPE_NONE = 0;
    public static final int THREE_DIMENSIONS_TYPE_PIXEL_ALTERNATIVE = 11;
    public static final int THREE_DIMENSIONS_TYPE_SIDE_BY_SIDE_HALF = 1;
    public static final int THREE_DIMENSIONS_TYPE_TOP_BOTTOM = 2;
    public static final int THREE_DIMENSIONS_VIDEO_3DOUTPUTASPECT_AUTOADAPTED = 2;
    public static final int THREE_DIMENSIONS_VIDEO_3DOUTPUTASPECT_CENTER = 1;
    public static final int THREE_DIMENSIONS_VIDEO_3DOUTPUTASPECT_FULLSCREEN = 0;
    public static final int THREE_DIMENSIONS_VIDEO_3DTO2D_AUTO = 6;
    public static final int THREE_DIMENSIONS_VIDEO_3DTO2D_CHECK_BOARD = 7;
    public static final int THREE_DIMENSIONS_VIDEO_3DTO2D_FRAME_ALTERNATIVE = 5;
    public static final int THREE_DIMENSIONS_VIDEO_3DTO2D_FRAME_PACKING = 3;
    public static final int THREE_DIMENSIONS_VIDEO_3DTO2D_LINE_ALTERNATIVE = 4;
    public static final int THREE_DIMENSIONS_VIDEO_3DTO2D_NONE = 0;
    public static final int THREE_DIMENSIONS_VIDEO_3DTO2D_PIXEL_ALTERNATIVE = 8;
    public static final int THREE_DIMENSIONS_VIDEO_3DTO2D_SELF_ADAPTIVE_DETECT_OFF = 0;
    public static final int THREE_DIMENSIONS_VIDEO_3DTO2D_SELF_ADAPTIVE_DETECT_RIGHT_NOW = 1;
    public static final int THREE_DIMENSIONS_VIDEO_3DTO2D_SIDE_BY_SIDE = 1;
    public static final int THREE_DIMENSIONS_VIDEO_3DTO2D_TOP_BOTTOM = 2;
    public static final int THREE_DIMENSIONS_VIDEO_AUTOSTART_2D = 1;
    public static final int THREE_DIMENSIONS_VIDEO_AUTOSTART_3D = 2;
    public static final int THREE_DIMENSIONS_VIDEO_AUTOSTART_OFF = 0;
    public static final int THREE_DIMENSIONS_VIDEO_LRVIEWSWITCH_EXCHANGE = 1;
    public static final int THREE_DIMENSIONS_VIDEO_LRVIEWSWITCH_NOTEXCHANGE = 0;
    public static final int THREE_DIMENSIONS_VIDEO_SELF_ADAPTIVE_DETECT_OFF = 0;
    public static final int THREE_DIMENSIONS_VIDEO_SELF_ADAPTIVE_DETECT_REALTIME = 3;
    public static final int THREE_DIMENSIONS_VIDEO_SELF_ADAPTIVE_DETECT_RIGHT_NOW = 1;
    public static final int THREE_DIMENSIONS_VIDEO_SELF_ADAPTIVE_DETECT_WHEN_SOURCE_CHANGE = 2;
    static TvS3DManager mInstance;
    private static ITvS3D mService;
    private EventHandler mHandler;
    private final ArrayList<OnS3DCommonEventListener> mOnS3DCommonEventListeners = new ArrayList<>();

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

        @Override // android.os.Handler
        public void handleMessage(Message message) {
            Log.d(TvS3DManager.TAG, "handleMessage(), msg.what = " + message.what);
            int i2 = message.what;
            if (i2 <= 0 || i2 >= 999) {
                return;
            }
            synchronized (TvS3DManager.this.mOnS3DCommonEventListeners) {
                try {
                    Iterator it = TvS3DManager.this.mOnS3DCommonEventListeners.iterator();
                    while (it.hasNext()) {
                        ((OnS3DCommonEventListener) it.next()).onEvent(message.what, message.arg1, message.arg2, message.obj);
                    }
                } finally {
                }
            }
        }
    }

    public interface OnS3DCommonEventListener {
        boolean onEvent(int i2, int i3, int i4, Object obj);
    }

    private TvS3DManager() 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.getTvS3D();
            } 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).getTvS3D();
            } 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 TvS3DManager getInstance() {
        if (mInstance == null) {
            synchronized (TvS3DManager.class) {
                if (mInstance == null) {
                    try {
                        mInstance = new TvS3DManager();
                    } catch (TvCommonException e2) {
                        e2.printStackTrace();
                        return null;
                    }
                }
            }
        }
        return mInstance;
    }

    private static ITvS3D getService() {
        return mService;
    }

    public boolean autoDetect3DFormat(int i2) {
        Log.d(TAG, "autoDetect3DFormat(), parameter nTimes = " + i2);
        ITvS3D service = getService();
        boolean zAutoDetect3DFormat = false;
        try {
            Log.d(TAG, "\u001b[31m autoDetect3DFormat: start\u001b[0m");
            zAutoDetect3DFormat = service.autoDetect3DFormat(i2);
            Log.d(TAG, "\u001b[31m autoDetect3DFormat: end\u001b[0m");
            return zAutoDetect3DFormat;
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return zAutoDetect3DFormat;
        }
    }

    public int detect3DFormat(int i2) {
        Log.d(TAG, "detect3DFormat(), nTimes = " + i2);
        ITvS3D service = getService();
        int iDetect3DFormat = 0;
        try {
            Log.d(TAG, "\u001b[31m detect3DFormat: start\u001b[0m");
            iDetect3DFormat = service.detect3DFormat(i2);
            Log.d(TAG, "\u001b[31m detect3DFormat: end\u001b[0m");
            return iDetect3DFormat;
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return iDetect3DFormat;
        }
    }

    public boolean enable3D(int i2) {
        Log.d(TAG, "enable3D(), mode = " + i2);
        ITvS3D service = getService();
        boolean zEnable3D = false;
        try {
            Log.d(TAG, "\u001b[31m enable3D: start\u001b[0m");
            zEnable3D = service.enable3D(i2);
            Log.d(TAG, "\u001b[31m enable3D: end\u001b[0m");
        } catch (RemoteException e2) {
            e2.printStackTrace();
        }
        Log.d(TAG, "enable3D(), return = " + zEnable3D);
        return zEnable3D;
    }

    public boolean enable3DTo2D(int i2) {
        Log.d(TAG, "enable3DTo2D(), mode = " + i2);
        ITvS3D service = getService();
        boolean zEnable3DTo2D = false;
        try {
            Log.d(TAG, "\u001b[31m enable3DTo2D: start\u001b[0m");
            zEnable3DTo2D = service.enable3DTo2D(i2);
            Log.d(TAG, "\u001b[31m enable3DTo2D: end\u001b[0m");
        } catch (RemoteException e2) {
            e2.printStackTrace();
        }
        Log.d(TAG, "enable3DTo2D(), return = " + zEnable3DTo2D);
        return zEnable3DTo2D;
    }

    protected void finalize() throws Throwable {
        try {
            mService.removeClient(this);
        } catch (RemoteException e2) {
            e2.printStackTrace();
        }
    }

    @Deprecated
    public int get3DDepthMode() {
        int i2;
        try {
            i2 = getService().get3DDepthMode();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            i2 = -1;
        }
        Log.d(TAG, "get3DDepthMode(), return int " + i2);
        return i2;
    }

    public int get3DGain() {
        int i2;
        try {
            i2 = getService().get3DGain();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            i2 = 0;
        }
        Log.d(TAG, "get3DGain(), return = " + i2);
        return i2;
    }

    public int get3DLrViewSwitch() {
        int i2;
        try {
            i2 = getService().get3DLrViewSwitch();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            i2 = 0;
        }
        Log.d(TAG, "get3DLrViewSwitch(), return = " + i2);
        return i2;
    }

    public int get3DOffset() {
        int i2;
        try {
            i2 = getService().get3DOffset();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            i2 = 0;
        }
        Log.d(TAG, "get3DOffset(), return = " + i2);
        return i2;
    }

    @Deprecated
    public int get3DOffsetMode() {
        int i2;
        try {
            i2 = getService().get3DOffsetMode();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            i2 = -1;
        }
        Log.d(TAG, "get3DOffsetMode(), return int " + i2);
        return i2;
    }

    @Deprecated
    public EnumThreeDVideo3DOutputAspect get3DOutputAspectMode() {
        return EnumThreeDVideo3DOutputAspect.values()[getThreeDVideoOutputAspectMode()];
    }

    public int get3DTo2DDisplayMode() {
        int display3DTo2DMode;
        try {
            display3DTo2DMode = getService().getDisplay3DTo2DMode();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            display3DTo2DMode = 0;
        }
        Log.d(TAG, "get3DTo2DDisplayMode(), return " + display3DTo2DMode);
        return display3DTo2DMode;
    }

    public int get3dDisplayFormat() {
        int displayFormat;
        try {
            displayFormat = getService().getDisplayFormat();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            displayFormat = 0;
        }
        Log.d(TAG, "getDisplayFormat(), return EnumThreeDVideoDisplayFormat " + displayFormat);
        return displayFormat;
    }

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

    @Deprecated
    public EnumThreeDVideoAutoStart getAutoStartMode() {
        return EnumThreeDVideoAutoStart.values()[getThreeDVideoAutoStartMode()];
    }

    @Deprecated
    public Enum3dType getCurrent3dFormat() {
        Log.d(TAG, "getCurrent3dFormat");
        try {
            return Enum3dType.values()[getService().getCurrent3dFormat()];
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return null;
        }
    }

    public int getCurrent3dType() {
        try {
            return Enum3dType.values()[getService().getCurrent3dFormat()].ordinal();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return 0;
        }
    }

    @Deprecated
    public EnumThreeDVideo3DTo2D getDisplay3DTo2DMode() {
        return EnumThreeDVideo3DTo2D.values()[get3DTo2DDisplayMode()];
    }

    @Deprecated
    public EnumThreeDVideoDisplayFormat getDisplayFormat() {
        return EnumThreeDVideoDisplayFormat.values()[get3dDisplayFormat()];
    }

    @Deprecated
    public EnumThreeDVideoLrViewSwitch getLrViewSwitch() {
        return EnumThreeDVideoLrViewSwitch.values()[getThreeDVideoLrViewSwitch()];
    }

    @Deprecated
    public EnumThreeDVideoSelfAdaptiveDetect getSelfAdaptiveDetect() {
        return EnumThreeDVideoSelfAdaptiveDetect.values()[getSelfAdaptiveDetectMode()];
    }

    public int getSelfAdaptiveDetectMode() {
        int selfAdaptiveDetect;
        try {
            selfAdaptiveDetect = getService().getSelfAdaptiveDetect();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            selfAdaptiveDetect = 0;
        }
        Log.d(TAG, "getSelfAdaptiveDetectMode(), return " + selfAdaptiveDetect);
        return selfAdaptiveDetect;
    }

    public int getThreeDVideoAutoStartMode() {
        int autoStartMode;
        try {
            autoStartMode = getService().getAutoStartMode();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            autoStartMode = 0;
        }
        Log.d(TAG, "getThreeDVideoAutoStartMode(), return " + autoStartMode);
        return autoStartMode;
    }

    @Deprecated
    public int getThreeDVideoLrViewSwitch() {
        int lrViewSwitch;
        try {
            lrViewSwitch = getService().getLrViewSwitch();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            lrViewSwitch = 0;
        }
        Log.d(TAG, "getThreeDVideoLrViewSwitch(), return " + lrViewSwitch);
        return lrViewSwitch;
    }

    public int getThreeDVideoOutputAspectMode() {
        int i2;
        try {
            i2 = getService().get3DOutputAspectMode();
        } catch (RemoteException e2) {
            e2.printStackTrace();
            i2 = 0;
        }
        Log.d(TAG, "getThreeDVideoOutputAspectMode(), return " + i2);
        return i2;
    }

    @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 query3dCapability(int i2) {
        try {
            return getService().query3dCapability(i2);
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return false;
        }
    }

    public boolean registerOnS3DCommonEventListener(OnS3DCommonEventListener onS3DCommonEventListener) {
        synchronized (this.mOnS3DCommonEventListeners) {
            this.mOnS3DCommonEventListeners.add(onS3DCommonEventListener);
        }
        return true;
    }

    @Deprecated
    public boolean set3DDepthMode(int i2) {
        Log.d(TAG, "set3DDepthMode(i), paras mode3DDepth = " + i2);
        try {
            return getService().set3DDepthMode(i2);
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return false;
        }
    }

    public boolean set3DGain(int i2) {
        Log.d(TAG, "set3DGain(), gain = " + i2);
        ITvS3D service = getService();
        if (i2 < 0 || 31 < i2) {
            return false;
        }
        try {
            return service.set3DGain(i2);
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return false;
        }
    }

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

    public boolean set3DOffset(int i2) {
        Log.d(TAG, "set3DOffset(), offset = " + i2);
        ITvS3D service = getService();
        if (i2 < 0 || 31 < i2) {
            return false;
        }
        try {
            return service.set3DOffset(i2);
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return false;
        }
    }

    @Deprecated
    public boolean set3DOffsetMode(int i2) {
        Log.d(TAG, "set3DOffsetMode(), paras mode3DOffset = " + i2);
        try {
            return getService().set3DOffsetMode(i2);
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return false;
        }
    }

    @Deprecated
    public boolean set3DOutputAspectMode(EnumThreeDVideo3DOutputAspect enumThreeDVideo3DOutputAspect) {
        return setThreeDVideoOutputAspectMode(enumThreeDVideo3DOutputAspect.ordinal());
    }

    @Deprecated
    public boolean set3DTo2D(EnumThreeDVideo3DTo2D enumThreeDVideo3DTo2D) {
        return set3DTo2DDisplayMode(enumThreeDVideo3DTo2D.ordinal());
    }

    public boolean set3DTo2DDisplayMode(int i2) {
        Log.d(TAG, "set3DTo2DDisplayMode(), paras displayMode = " + i2);
        try {
            return getService().set3DTo2D(i2);
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return false;
        }
    }

    public boolean set3dDisplayFormat(int i2) {
        Log.d(TAG, "set3dDisplayFormat(), paras displayFormat = " + i2);
        try {
            return getService().setDisplayFormat(i2);
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return false;
        }
    }

    @Deprecated
    public boolean setAutoStartMode(EnumThreeDVideoAutoStart enumThreeDVideoAutoStart) {
        return setThreeDVideoAutoStartMode(enumThreeDVideoAutoStart.ordinal());
    }

    @Deprecated
    public boolean setDisplayFormat(EnumThreeDVideoDisplayFormat enumThreeDVideoDisplayFormat) {
        return set3dDisplayFormat(enumThreeDVideoDisplayFormat.ordinal());
    }

    public void setDisplayFormatForUI(int i2) {
        try {
            getService().setDisplayFormatForUI(i2);
        } catch (RemoteException e2) {
            e2.printStackTrace();
        }
    }

    @Deprecated
    public boolean setLrViewSwitch(EnumThreeDVideoLrViewSwitch enumThreeDVideoLrViewSwitch) {
        return setThreeDVideoLrViewSwitch(enumThreeDVideoLrViewSwitch.ordinal());
    }

    @Deprecated
    public boolean setSelfAdaptiveDetect(EnumThreeDVideoSelfAdaptiveDetect enumThreeDVideoSelfAdaptiveDetect) {
        return setSelfAdaptiveDetectMode(enumThreeDVideoSelfAdaptiveDetect.ordinal());
    }

    public boolean setSelfAdaptiveDetectMode(int i2) {
        Log.d(TAG, "setSelfAdaptiveDetectMode(), paras selfAdaptiveDetect = " + i2);
        ITvS3D service = getService();
        boolean selfAdaptiveDetect = false;
        try {
            Log.d(TAG, "\u001b[31m setSelfAdaptiveDetectMode: start\u001b[0m");
            selfAdaptiveDetect = service.setSelfAdaptiveDetect(i2);
            Log.d(TAG, "\u001b[31m setSelfAdaptiveDetectMode: end\u001b[0m");
            return selfAdaptiveDetect;
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return selfAdaptiveDetect;
        }
    }

    public boolean setThreeDVideoAutoStartMode(int i2) {
        Log.d(TAG, "setThreeDVideoAutoStartMode(), paras autoStartMode = " + i2);
        try {
            return getService().setAutoStartMode(i2);
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return false;
        }
    }

    @Deprecated
    public boolean setThreeDVideoLrViewSwitch(int i2) {
        Log.d(TAG, "setThreeDVideoLrViewSwitch(), paras LrViewSwitchMode = " + i2);
        try {
            return getService().setLrViewSwitch(i2);
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return false;
        }
    }

    public boolean setThreeDVideoOutputAspectMode(int i2) {
        Log.d(TAG, "setThreeDVideoOutputAspectMode(), paras outputAspectMode = " + i2);
        try {
            return getService().set3DOutputAspectMode(i2);
        } catch (RemoteException e2) {
            e2.printStackTrace();
            return false;
        }
    }

    public boolean unregisterOnS3DCommonEventListener(OnS3DCommonEventListener onS3DCommonEventListener) {
        synchronized (this.mOnS3DCommonEventListeners) {
            this.mOnS3DCommonEventListeners.remove(onS3DCommonEventListener);
        }
        return true;
    }
}
