package com.cvte.vman.impl;

import android.os.Parcel;
import android.text.TextUtils;
import com.cvte.vman.ExtendDisplayCtrl;
import com.cvte.vman.VmanMiddleWare;
import com.cvte.vman.instance.InvokeCmd;
import com.cvte.vman.utils.CLog;
import java.util.ArrayList;
import java.util.List;

/* JADX INFO: loaded from: classes.dex */
public class ExtendDisplayCtrlManager extends ExtendDisplayCtrl {
    public static final int AMP_MUTE = 1;
    public static final int AMP_UNMUTE = 0;
    public static final int OUT_DEV_TYPE_HDMIOUT = 1;
    public static final String TAG = "Cvte@ExtendDisplayCtrlManager";
    private static ExtendDisplayCtrlManager mExtendDisplayCtrlManager;

    private ExtendDisplayCtrlManager() {
    }

    public static synchronized ExtendDisplayCtrlManager getInstance() {
        if (mExtendDisplayCtrlManager == null) {
            synchronized (ExtendDisplayCtrlManager.class) {
                if (mExtendDisplayCtrlManager == null) {
                    mExtendDisplayCtrlManager = new ExtendDisplayCtrlManager();
                }
            }
        }
        return mExtendDisplayCtrlManager;
    }

    @Override // com.cvte.vman.ExtendDisplayCtrl
    public boolean getExtendDisplayEnabled() {
        int iExcuteCommandSet_int = VmanMiddleWare.getInstance().excuteCommandSet_int(4097);
        CLog.d("return " + iExcuteCommandSet_int);
        return iExcuteCommandSet_int == 1;
    }

    @Override // com.cvte.vman.ExtendDisplayCtrl
    public boolean getExtendDisplayForceDVI() {
        int iExcuteCommandSet_int = VmanMiddleWare.getInstance().excuteCommandSet_int(4104);
        CLog.d("return " + iExcuteCommandSet_int);
        return iExcuteCommandSet_int == 1;
    }

    @Override // com.cvte.vman.ExtendDisplayCtrl
    public boolean getExtendDisplayHDCPStatus() {
        int iExcuteCommandSet_int = VmanMiddleWare.getInstance().excuteCommandSet_int(4102);
        CLog.d("return " + iExcuteCommandSet_int);
        return iExcuteCommandSet_int == 1;
    }

    @Override // com.cvte.vman.ExtendDisplayCtrl
    public String getExtendDisplayResolution() {
        String strExcuteCommandSet_Str = VmanMiddleWare.getInstance().excuteCommandSet_Str(4100);
        CLog.d("return " + strExcuteCommandSet_Str);
        return strExcuteCommandSet_Str;
    }

    @Override // com.cvte.vman.ExtendDisplayCtrl
    public List<String> getExtendDisplaySuportResolutionList() {
        Parcel parcelExcuteCommandSet_Parcel = VmanMiddleWare.getInstance().excuteCommandSet_Parcel(4099);
        parcelExcuteCommandSet_Parcel.setDataPosition(0);
        parcelExcuteCommandSet_Parcel.readInt();
        int i2 = parcelExcuteCommandSet_Parcel.readInt();
        ArrayList arrayList = new ArrayList();
        for (int i3 = 0; i3 < i2; i3++) {
            arrayList.add(parcelExcuteCommandSet_Parcel.readString());
        }
        parcelExcuteCommandSet_Parcel.recycle();
        CLog.d("return " + TextUtils.join("; ", arrayList));
        return arrayList;
    }

    @Override // com.cvte.vman.ExtendDisplayCtrl
    public List<String> getExtendDisplayUserResolutionList() {
        Parcel parcelExcuteCommandSet_Parcel = VmanMiddleWare.getInstance().excuteCommandSet_Parcel(InvokeCmd.CMD_EXTENDDISPLAY_CTRL_GET_USER_RESOLUTION_LIST);
        parcelExcuteCommandSet_Parcel.setDataPosition(0);
        parcelExcuteCommandSet_Parcel.readInt();
        int i2 = parcelExcuteCommandSet_Parcel.readInt();
        ArrayList arrayList = new ArrayList();
        for (int i3 = 0; i3 < i2; i3++) {
            arrayList.add(parcelExcuteCommandSet_Parcel.readString());
        }
        parcelExcuteCommandSet_Parcel.recycle();
        CLog.d("return " + TextUtils.join("; ", arrayList));
        return arrayList;
    }

    @Override // com.cvte.vman.ExtendDisplayCtrl
    public boolean getHdmiInOutEnabled() {
        int iExcuteCommandSet_int = VmanMiddleWare.getInstance().excuteCommandSet_int(InvokeCmd.CMD_EXTENDDISPLAY_CTRL_GET_HDMI_IN_OUT);
        CLog.d("return " + iExcuteCommandSet_int);
        return iExcuteCommandSet_int == 1;
    }

    @Override // com.cvte.vman.ExtendDisplayCtrl
    public boolean getOverscan(int i2, int i3, int i4, int i5) {
        int iExcuteCommandSet_int = VmanMiddleWare.getInstance().excuteCommandSet_int(InvokeCmd.CMD_EXTENDDISPLAY_CTRL_GET_OVERSCAN, i2, i3, i4, i5);
        CLog.d("return " + iExcuteCommandSet_int);
        return iExcuteCommandSet_int == 1;
    }

    @Override // com.cvte.vman.ExtendDisplayCtrl
    public boolean getOverscanEnable() {
        int iExcuteCommandSet_int = VmanMiddleWare.getInstance().excuteCommandSet_int(InvokeCmd.CMD_EXTENDDISPLAY_CTRL_GET_OVERSCAN_ENABLE);
        CLog.d("return " + iExcuteCommandSet_int);
        return iExcuteCommandSet_int == 1;
    }

    @Override // com.cvte.vman.ExtendDisplayCtrl
    public int getSpeakerOutPutMode(int i2) {
        int iExcuteCommandSet_int = VmanMiddleWare.getInstance().excuteCommandSet_int(InvokeCmd.CMD_AUDIO_GET_SPEAKER_MODE, i2);
        CLog.i("getSpeakerOutPutMode mute = " + iExcuteCommandSet_int);
        return iExcuteCommandSet_int;
    }

    @Override // com.cvte.vman.ExtendDisplayCtrl
    public boolean getStreamOutDevPlugStatus(int i2) {
        int iExcuteCommandSet_int = VmanMiddleWare.getInstance().excuteCommandSet_int(InvokeCmd.CMD_EXTENDDISPLAY_CTRL_GET_OUT_DEV_PLUG_STATUS, i2);
        CLog.i("getStreamOutDevPlugStatus ret = " + iExcuteCommandSet_int);
        return iExcuteCommandSet_int == 1;
    }

    @Override // com.cvte.vman.ExtendDisplayCtrl
    public boolean getTypecOutHDCPStatus() {
        int iExcuteCommandSet_int = VmanMiddleWare.getInstance().excuteCommandSet_int(InvokeCmd.CMD_EXTENDDISPLAY_CTRL_GET_TYPEC_OUT_HDCP_STATUS);
        CLog.d("return " + iExcuteCommandSet_int);
        return iExcuteCommandSet_int == 1;
    }

    @Override // com.cvte.vman.ExtendDisplayCtrl
    public boolean isVedioMute() {
        boolean zExcuteCommandSet_bool = VmanMiddleWare.getInstance().excuteCommandSet_bool(InvokeCmd.CMD_EXTENDDISPLAY_CTRL_IS_VEDIO_MUTE);
        CLog.d("isVedioMute " + zExcuteCommandSet_bool);
        return zExcuteCommandSet_bool;
    }

    @Override // com.cvte.vman.ExtendDisplayCtrl
    public boolean setExtendDisplayEnabled(boolean z) {
        VmanMiddleWare.getInstance().excuteCommandSet_int(4098, z ? 1 : 0);
        CLog.d("set to " + (z ? 1 : 0));
        return true;
    }

    @Override // com.cvte.vman.ExtendDisplayCtrl
    public boolean setExtendDisplayForceDVI(boolean z) {
        VmanMiddleWare.getInstance().excuteCommandSet_int(4105, z ? 1 : 0);
        CLog.d("set to " + (z ? 1 : 0));
        return true;
    }

    @Override // com.cvte.vman.ExtendDisplayCtrl
    public boolean setExtendDisplayHDCPStatus(boolean z) {
        VmanMiddleWare.getInstance().excuteCommandSet_int(4103, z ? 1 : 0);
        CLog.d("set to " + (z ? 1 : 0));
        return true;
    }

    @Override // com.cvte.vman.ExtendDisplayCtrl
    public boolean setExtendDisplayResolution(String str) {
        CLog.d(str + " return " + VmanMiddleWare.getInstance().excuteCommandSet_Str(4101, str));
        return true;
    }

    @Override // com.cvte.vman.ExtendDisplayCtrl
    public boolean setHdmiInOutEnabled(boolean z) {
        VmanMiddleWare.getInstance().excuteCommandSet_int(InvokeCmd.CMD_EXTENDDISPLAY_CTRL_SET_HDMI_IN_OUT, z ? 1 : 0);
        CLog.d("set to " + (z ? 1 : 0));
        return true;
    }

    @Override // com.cvte.vman.ExtendDisplayCtrl
    public boolean setOverscan(int i2, int i3) {
        VmanMiddleWare.getInstance().excuteCommandSet_int(InvokeCmd.CMD_EXTENDDISPLAY_CTRL_SET_OVERSCAN, i2, i3);
        CLog.d("set to " + i3);
        return true;
    }

    @Override // com.cvte.vman.ExtendDisplayCtrl
    public boolean setOverscanEnable(boolean z) {
        VmanMiddleWare.getInstance().excuteCommandSet_int(InvokeCmd.CMD_EXTENDDISPLAY_CTRL_SET_OVERSCAN_ENABLE, z ? 1 : 0);
        CLog.d("set to " + (z ? 1 : 0));
        return true;
    }

    @Override // com.cvte.vman.ExtendDisplayCtrl
    public boolean setSpeakerOutPutMode(int i2, int i3) {
        CLog.i("setSpeakerOutPutMode  typt = " + i2 + " mute = " + i3);
        VmanMiddleWare.getInstance().excuteCommandSet_int(InvokeCmd.CMD_AUDIO_SET_SPEAKER_MODE, i2, i3);
        return true;
    }

    @Override // com.cvte.vman.ExtendDisplayCtrl
    public boolean setTypecOutHDCPStatus(boolean z) {
        VmanMiddleWare.getInstance().excuteCommandSet_int(InvokeCmd.CMD_EXTENDDISPLAY_CTRL_SET_TYPEC_OUT_HDCP_STATUS, z ? 1 : 0);
        CLog.d("set to " + (z ? 1 : 0));
        return true;
    }

    @Override // com.cvte.vman.ExtendDisplayCtrl
    public boolean setVedioMute(boolean z) {
        boolean zExcuteCommandSet_bool = VmanMiddleWare.getInstance().excuteCommandSet_bool(InvokeCmd.CMD_EXTENDDISPLAY_CTRL_SET_VEDIO_MUTE, z ? 1 : 0);
        CLog.d("setVedioMute " + zExcuteCommandSet_bool);
        return zExcuteCommandSet_bool;
    }

    @Override // com.cvte.vman.ExtendDisplayCtrl
    public boolean toDoScreenShake(boolean z) {
        CLog.d("set to " + VmanMiddleWare.getInstance().excuteCommandSet_int(InvokeCmd.CMD_EXTENDDISPLAY_CTRL_SET_DISPLAYOFFSET, z ? 1 : 0));
        return true;
    }
}
