package com.mstar.android.tvapi.dtv.common;

import android.os.Parcel;
import android.text.format.Time;
import com.mstar.android.tvapi.common.exception.TvCommonException;
import com.mstar.android.tvapi.common.exception.TvNativeCallFailException;
import com.mstar.android.tvapi.common.exception.TvOutOfBoundException;
import com.mstar.android.tvapi.common.vo.EnumVideoType;
import com.mstar.android.tvapi.common.vo.PresentFollowingEventInfo;
import com.mstar.android.tvapi.dtv.atsc.vo.AtscEpgEventInfo;
import com.mstar.android.tvapi.dtv.atsc.vo.AtscProgramInfo;
import com.mstar.android.tvapi.dtv.vo.DtvEitInfo;
import com.mstar.android.tvapi.dtv.vo.DtvType;
import com.mstar.android.tvapi.dtv.vo.EpgCridEventInfo;
import com.mstar.android.tvapi.dtv.vo.EpgCridStatus;
import com.mstar.android.tvapi.dtv.vo.EpgEventInfo;
import com.mstar.android.tvapi.dtv.vo.EpgFirstMatchHdCast;
import com.mstar.android.tvapi.dtv.vo.EpgHdSimulcast;
import com.mstar.android.tvapi.dtv.vo.EpgTrailerLinkInfo;
import com.mstar.android.tvapi.dtv.vo.NvodEventInfo;
import java.lang.ref.WeakReference;
import java.util.ArrayList;

/* JADX INFO: loaded from: classes.dex */
public final class EpgManager {
    private static final int FALSE = 0;
    private static final String IEPG_MANAGER = "mstar.IEpgManager";
    private static EpgManager _epgManager;
    private int mEpgManagerContext;
    private long mNativeContext;

    static {
        try {
            System.loadLibrary("epgmanager_jni");
            native_init();
        } catch (UnsatisfiedLinkError e2) {
            System.err.println("Cannot load epgmanager_jni library:\n" + e2.toString());
        }
        _epgManager = null;
    }

    private EpgManager() {
        native_setup(new WeakReference(this));
    }

    private static void PostEvent_SnServiceDeadth(Object obj, int i2, int i3) {
    }

    private final native int _addingEpgPriority(Parcel parcel, Parcel parcel2) throws TvCommonException;

    private final native int _atsc_getEventInfoByTime(Parcel parcel, Parcel parcel2) throws TvCommonException;

    private final native int _getCridAlternateList(Parcel parcel, Parcel parcel2) throws TvCommonException;

    private final native int _getCridSeriesList(Parcel parcel, Parcel parcel2) throws TvCommonException;

    private final native int _getCridSplitList(Parcel parcel, Parcel parcel2) throws TvCommonException;

    private final native int _getCridStatus(Parcel parcel, Parcel parcel2) throws TvCommonException;

    private final native int _getEitInfo(Parcel parcel, Parcel parcel2) throws TvCommonException;

    private final native int _getEvent1stMatchHdBroadcast(Parcel parcel, Parcel parcel2) throws TvCommonException;

    private final native int _getEvent1stMatchHdSimulcast(Parcel parcel, Parcel parcel2) throws TvCommonException;

    private final native int _getEventDescriptor(Parcel parcel, Parcel parcel2) throws TvCommonException;

    private final native int _getEventExtendInfoByTime(Parcel parcel, Parcel parcel2) throws TvCommonException;

    private final native int _getEventHdSimulcast(Parcel parcel, Parcel parcel2) throws TvCommonException;

    private final native int _getEventInfo(Parcel parcel, Parcel parcel2) throws TvCommonException;

    private native int _getEventInfoById(Parcel parcel, Parcel parcel2) throws TvCommonException;

    private final native int _getEventInfoByRctLink(Parcel parcel, Parcel parcel2) throws TvCommonException;

    private final native int _getEventInfoByTime(Parcel parcel, Parcel parcel2) throws TvCommonException;

    private final native int _getFirstEventInformation(Parcel parcel, Parcel parcel2) throws TvCommonException;

    private final native int _getNextEventInformation(Parcel parcel, Parcel parcel2) throws TvCommonException;

    private final native int _getNvodTimeShiftEventInfo(Parcel parcel, Parcel parcel2) throws TvCommonException;

    private final native int _getPresentFollowingEventInfo(Parcel parcel, Parcel parcel2) throws TvCommonException;

    private final native int _getRctTrailerLink(Parcel parcel, Parcel parcel2) throws TvCommonException;

    private final native boolean beginGetEventInformation(int i2, int i3, int i4, int i5) throws TvCommonException;

    private final native void endGetEventInformation() throws TvCommonException;

    private final native int getEpgEventOffsetTime(int i2, boolean z2) throws TvCommonException;

    private final native int getEventCount(short s2, int i2, int i3) throws TvCommonException;

    protected static EpgManager getInstance() {
        if (_epgManager == null) {
            synchronized (EpgManager.class) {
                try {
                    if (_epgManager == null) {
                        _epgManager = new EpgManager();
                    }
                } finally {
                }
            }
        }
        return _epgManager;
    }

    private final native void native_finalize();

    private static final native void native_init();

    private final native void native_setup(Object obj);

    private static void postEventFromNative(Object obj, int i2, int i3, int i4, Object obj2) {
    }

    public final void addingEpgPriority(AtscProgramInfo atscProgramInfo, int i2) throws TvCommonException {
        Parcel parcelObtain = Parcel.obtain();
        Parcel parcelObtain2 = Parcel.obtain();
        parcelObtain.writeInterfaceToken(IEPG_MANAGER);
        atscProgramInfo.writeToParcel(parcelObtain, 0);
        parcelObtain.writeInt(i2);
        _addingEpgPriority(parcelObtain, parcelObtain2);
        if (parcelObtain2.readInt() != 0) {
            parcelObtain.recycle();
            parcelObtain2.recycle();
        } else {
            parcelObtain.recycle();
            parcelObtain2.recycle();
            throw new TvNativeCallFailException("funtion failed at tvservice ");
        }
    }

    public final boolean beginToGetEventInformation(int i2, int i3, int i4, int i5) throws TvCommonException {
        return beginGetEventInformation(i2, i3, i4, i5);
    }

    public final native boolean disableEpgBarkerChannel() throws TvCommonException;

    public final native boolean enableEpgBarkerChannel() throws TvCommonException;

    public final void endToGetEventInformation() throws TvCommonException {
        endGetEventInformation();
    }

    protected void finalize() throws Throwable {
        super.finalize();
        native_finalize();
    }

    public final ArrayList<EpgCridEventInfo> getCridAlternateList(short s2, int i2, Time time) throws TvCommonException {
        Parcel parcelObtain = Parcel.obtain();
        Parcel parcelObtain2 = Parcel.obtain();
        parcelObtain.writeInterfaceToken(IEPG_MANAGER);
        int millis = (int) (time.toMillis(true) / 1000);
        parcelObtain.writeInt(s2);
        parcelObtain.writeInt(i2);
        parcelObtain.writeInt(millis);
        _getCridAlternateList(parcelObtain, parcelObtain2);
        if (parcelObtain2.readInt() == 0) {
            parcelObtain.recycle();
            parcelObtain2.recycle();
            throw new TvNativeCallFailException("funtion failed at tvservice ");
        }
        ArrayList<EpgCridEventInfo> arrayList = new ArrayList<>();
        int i3 = parcelObtain2.readInt();
        for (int i4 = 0; i4 < i3; i4++) {
            EpgCridEventInfo epgCridEventInfo = new EpgCridEventInfo();
            epgCridEventInfo.serviceType = (short) parcelObtain2.readInt();
            epgCridEventInfo.serviceNumber = parcelObtain2.readInt();
            epgCridEventInfo.eventInfo.startTime = parcelObtain2.readInt();
            epgCridEventInfo.eventInfo.endTime = parcelObtain2.readInt();
            epgCridEventInfo.eventInfo.durationTime = parcelObtain2.readInt();
            epgCridEventInfo.eventInfo.name = parcelObtain2.readString();
            epgCridEventInfo.eventInfo.eventId = parcelObtain2.readInt();
            if (parcelObtain2.readInt() == 0) {
                epgCridEventInfo.eventInfo.isScrambled = false;
            } else {
                epgCridEventInfo.eventInfo.isScrambled = true;
            }
            epgCridEventInfo.eventInfo.genre = (short) parcelObtain2.readInt();
            epgCridEventInfo.eventInfo.parentalRating = (short) parcelObtain2.readInt();
            epgCridEventInfo.eventInfo.description = parcelObtain2.readString();
            epgCridEventInfo.eventInfo.originalStartTime = parcelObtain2.readInt();
            try {
                epgCridEventInfo.eventInfo.setEpgFunctionStatus(EpgEventInfo.EnumEpgFunctionStatus.values()[EpgEventInfo.EnumEpgFunctionStatus.getOrdinalThroughValue(parcelObtain2.readInt())]);
                arrayList.add(epgCridEventInfo);
            } catch (TvOutOfBoundException e2) {
                e2.printStackTrace();
            }
        }
        parcelObtain.recycle();
        parcelObtain2.recycle();
        return arrayList;
    }

    public final ArrayList<EpgCridEventInfo> getCridSeriesList(short s2, int i2, Time time) throws TvCommonException {
        Parcel parcelObtain = Parcel.obtain();
        Parcel parcelObtain2 = Parcel.obtain();
        parcelObtain.writeInterfaceToken(IEPG_MANAGER);
        int millis = (int) (time.toMillis(true) / 1000);
        parcelObtain.writeInt(s2);
        parcelObtain.writeInt(i2);
        parcelObtain.writeInt(millis);
        _getCridSeriesList(parcelObtain, parcelObtain2);
        if (parcelObtain2.readInt() == 0) {
            parcelObtain.recycle();
            parcelObtain2.recycle();
            throw new TvNativeCallFailException("funtion failed at tvservice ");
        }
        ArrayList<EpgCridEventInfo> arrayList = new ArrayList<>();
        int i3 = parcelObtain2.readInt();
        for (int i4 = 0; i4 < i3; i4++) {
            EpgCridEventInfo epgCridEventInfo = new EpgCridEventInfo();
            epgCridEventInfo.serviceType = (short) parcelObtain2.readInt();
            epgCridEventInfo.serviceNumber = parcelObtain2.readInt();
            epgCridEventInfo.eventInfo.startTime = parcelObtain2.readInt();
            epgCridEventInfo.eventInfo.endTime = parcelObtain2.readInt();
            epgCridEventInfo.eventInfo.durationTime = parcelObtain2.readInt();
            epgCridEventInfo.eventInfo.name = parcelObtain2.readString();
            epgCridEventInfo.eventInfo.eventId = parcelObtain2.readInt();
            if (parcelObtain2.readInt() == 0) {
                epgCridEventInfo.eventInfo.isScrambled = false;
            } else {
                epgCridEventInfo.eventInfo.isScrambled = true;
            }
            epgCridEventInfo.eventInfo.genre = (short) parcelObtain2.readInt();
            epgCridEventInfo.eventInfo.parentalRating = (short) parcelObtain2.readInt();
            epgCridEventInfo.eventInfo.description = parcelObtain2.readString();
            epgCridEventInfo.eventInfo.originalStartTime = parcelObtain2.readInt();
            try {
                epgCridEventInfo.eventInfo.setEpgFunctionStatus(EpgEventInfo.EnumEpgFunctionStatus.values()[EpgEventInfo.EnumEpgFunctionStatus.getOrdinalThroughValue(parcelObtain2.readInt())]);
                arrayList.add(epgCridEventInfo);
            } catch (TvOutOfBoundException e2) {
                e2.printStackTrace();
            }
        }
        parcelObtain.recycle();
        parcelObtain2.recycle();
        return arrayList;
    }

    public final ArrayList<EpgCridEventInfo> getCridSplitList(short s2, int i2, Time time) throws TvCommonException {
        int ordinalThroughValue;
        Parcel parcelObtain = Parcel.obtain();
        Parcel parcelObtain2 = Parcel.obtain();
        parcelObtain.writeInterfaceToken(IEPG_MANAGER);
        int millis = (int) (time.toMillis(true) / 1000);
        parcelObtain.writeInt(s2);
        parcelObtain.writeInt(i2);
        parcelObtain.writeInt(millis);
        _getCridSplitList(parcelObtain, parcelObtain2);
        if (parcelObtain2.readInt() == 0) {
            parcelObtain.recycle();
            parcelObtain2.recycle();
            throw new TvNativeCallFailException("funtion failed at tvservice ");
        }
        ArrayList<EpgCridEventInfo> arrayList = new ArrayList<>();
        int i3 = parcelObtain2.readInt();
        for (int i4 = 0; i4 < i3; i4++) {
            EpgCridEventInfo epgCridEventInfo = new EpgCridEventInfo();
            epgCridEventInfo.serviceType = (short) parcelObtain2.readInt();
            epgCridEventInfo.serviceNumber = parcelObtain2.readInt();
            epgCridEventInfo.eventInfo.startTime = parcelObtain2.readInt();
            epgCridEventInfo.eventInfo.endTime = parcelObtain2.readInt();
            epgCridEventInfo.eventInfo.durationTime = parcelObtain2.readInt();
            epgCridEventInfo.eventInfo.name = parcelObtain2.readString();
            epgCridEventInfo.eventInfo.eventId = parcelObtain2.readInt();
            if (parcelObtain2.readInt() == 0) {
                epgCridEventInfo.eventInfo.isScrambled = false;
            } else {
                epgCridEventInfo.eventInfo.isScrambled = true;
            }
            epgCridEventInfo.eventInfo.genre = (short) parcelObtain2.readInt();
            epgCridEventInfo.eventInfo.parentalRating = (short) parcelObtain2.readInt();
            epgCridEventInfo.eventInfo.description = parcelObtain2.readString();
            epgCridEventInfo.eventInfo.originalStartTime = parcelObtain2.readInt();
            try {
                ordinalThroughValue = EpgEventInfo.EnumEpgFunctionStatus.getOrdinalThroughValue(parcelObtain2.readInt());
            } catch (TvOutOfBoundException e2) {
                e2.printStackTrace();
                ordinalThroughValue = -1;
            }
            epgCridEventInfo.eventInfo.setEpgFunctionStatus(EpgEventInfo.EnumEpgFunctionStatus.values()[ordinalThroughValue]);
            arrayList.add(epgCridEventInfo);
        }
        parcelObtain.recycle();
        parcelObtain2.recycle();
        return arrayList;
    }

    public final EpgCridStatus getCridStatus(short s2, int i2, Time time) throws TvCommonException {
        Parcel parcelObtain = Parcel.obtain();
        Parcel parcelObtain2 = Parcel.obtain();
        parcelObtain.writeInterfaceToken(IEPG_MANAGER);
        int millis = (int) (time.toMillis(true) / 1000);
        parcelObtain.writeInt(s2);
        parcelObtain.writeInt(i2);
        parcelObtain.writeInt(millis);
        _getCridStatus(parcelObtain, parcelObtain2);
        if (parcelObtain2.readInt() == 0) {
            parcelObtain.recycle();
            parcelObtain2.recycle();
            throw new TvNativeCallFailException("funtion failed at tvservice ");
        }
        EpgCridStatus epgCridStatus = new EpgCridStatus();
        if (parcelObtain2.readInt() == 0) {
            epgCridStatus.isSeries = false;
        } else {
            epgCridStatus.isSeries = true;
        }
        if (parcelObtain2.readInt() == 0) {
            epgCridStatus.isSplit = false;
        } else {
            epgCridStatus.isSplit = true;
        }
        if (parcelObtain2.readInt() == 0) {
            epgCridStatus.isAlternate = false;
        } else {
            epgCridStatus.isAlternate = true;
        }
        if (parcelObtain2.readInt() == 0) {
            epgCridStatus.isRecommend = false;
        } else {
            epgCridStatus.isRecommend = true;
        }
        epgCridStatus.seriesCount = (short) parcelObtain2.readInt();
        parcelObtain.recycle();
        parcelObtain2.recycle();
        return epgCridStatus;
    }

    public final DtvEitInfo getEitInfo(boolean z2) throws TvCommonException {
        Parcel parcelObtain = Parcel.obtain();
        Parcel parcelObtain2 = Parcel.obtain();
        parcelObtain.writeInterfaceToken(IEPG_MANAGER);
        if (z2) {
            parcelObtain.writeInt(1);
        } else {
            parcelObtain.writeInt(0);
        }
        _getEitInfo(parcelObtain, parcelObtain2);
        if (parcelObtain2.readInt() == 0) {
            parcelObtain.recycle();
            parcelObtain2.recycle();
            throw new TvNativeCallFailException("funtion failed at tvservice ");
        }
        DtvEitInfo dtvEitInfo = new DtvEitInfo();
        dtvEitInfo.eitCurrentEventPf.eventName = parcelObtain2.readString();
        dtvEitInfo.eitCurrentEventPf.shortEventText = parcelObtain2.readString();
        dtvEitInfo.eitCurrentEventPf.extendedEventItem = parcelObtain2.readString();
        dtvEitInfo.eitCurrentEventPf.extendedEventText = parcelObtain2.readString();
        int i2 = parcelObtain2.readInt();
        dtvEitInfo.eitCurrentEventPf.stStartTime.set(((long) i2) * 1000);
        dtvEitInfo.eitCurrentEventPf.stStartTime.normalize(false);
        dtvEitInfo.eitCurrentEventPf.startTime = i2;
        if (parcelObtain2.readInt() == 0) {
            dtvEitInfo.eitCurrentEventPf.isStartTimeDayLightTime = false;
        } else {
            dtvEitInfo.eitCurrentEventPf.isStartTimeDayLightTime = true;
        }
        int i3 = parcelObtain2.readInt();
        dtvEitInfo.eitCurrentEventPf.stEndTime.set(((long) i3) * 1000);
        dtvEitInfo.eitCurrentEventPf.stEndTime.normalize(false);
        dtvEitInfo.eitCurrentEventPf.endTime = i3;
        if (parcelObtain2.readInt() == 0) {
            dtvEitInfo.eitCurrentEventPf.isEndTimeDayLightTime = false;
        } else {
            dtvEitInfo.eitCurrentEventPf.isEndTimeDayLightTime = true;
        }
        dtvEitInfo.eitCurrentEventPf.durationInSeconds = parcelObtain2.readInt();
        if (parcelObtain2.readInt() == 0) {
            dtvEitInfo.eitCurrentEventPf.isScrambled = false;
        } else {
            dtvEitInfo.eitCurrentEventPf.isScrambled = true;
        }
        dtvEitInfo.eitCurrentEventPf.parentalControl = (short) parcelObtain2.readInt();
        dtvEitInfo.eitCurrentEventPf.parentalObjectiveContent = (short) parcelObtain2.readInt();
        dtvEitInfo.eitCurrentEventPf.contentNibbleLevel1 = (short) parcelObtain2.readInt();
        dtvEitInfo.eitCurrentEventPf.contentNibbleLevel2 = (short) parcelObtain2.readInt();
        if (parcelObtain2.readInt() == 0) {
            dtvEitInfo.present = false;
        } else {
            dtvEitInfo.present = true;
        }
        parcelObtain.recycle();
        parcelObtain2.recycle();
        return dtvEitInfo;
    }

    public final int getEpgEventOffsetTime(Time time, boolean z2) throws TvCommonException {
        return getEpgEventOffsetTime((int) (time.toMillis(true) / 1000), z2);
    }

    public final EpgFirstMatchHdCast getEvent1stMatchHdBroadcast(short s2, int i2, Time time) throws TvCommonException {
        Parcel parcelObtain = Parcel.obtain();
        Parcel parcelObtain2 = Parcel.obtain();
        parcelObtain.writeInterfaceToken(IEPG_MANAGER);
        int millis = (int) (time.toMillis(true) / 1000);
        parcelObtain.writeInt(s2);
        parcelObtain.writeInt(i2);
        parcelObtain.writeInt(millis);
        _getEvent1stMatchHdBroadcast(parcelObtain, parcelObtain2);
        if (parcelObtain2.readInt() == 0) {
            parcelObtain.recycle();
            parcelObtain2.recycle();
            throw new TvNativeCallFailException("funtion failed at tvservice ");
        }
        EpgFirstMatchHdCast epgFirstMatchHdCast = new EpgFirstMatchHdCast();
        epgFirstMatchHdCast.epgEventInfoVO.startTime = parcelObtain2.readInt();
        epgFirstMatchHdCast.epgEventInfoVO.endTime = parcelObtain2.readInt();
        epgFirstMatchHdCast.epgEventInfoVO.durationTime = parcelObtain2.readInt();
        epgFirstMatchHdCast.epgEventInfoVO.name = parcelObtain2.readString();
        epgFirstMatchHdCast.epgEventInfoVO.eventId = parcelObtain2.readInt();
        if (parcelObtain2.readInt() == 0) {
            epgFirstMatchHdCast.epgEventInfoVO.isScrambled = false;
        } else {
            epgFirstMatchHdCast.epgEventInfoVO.isScrambled = true;
        }
        epgFirstMatchHdCast.epgEventInfoVO.genre = (short) parcelObtain2.readInt();
        epgFirstMatchHdCast.epgEventInfoVO.parentalRating = (short) parcelObtain2.readInt();
        epgFirstMatchHdCast.epgEventInfoVO.description = parcelObtain2.readString();
        epgFirstMatchHdCast.epgEventInfoVO.originalStartTime = parcelObtain2.readInt();
        epgFirstMatchHdCast.epgEventInfoVO.setEpgFunctionStatus(EpgEventInfo.EnumEpgFunctionStatus.values()[EpgEventInfo.EnumEpgFunctionStatus.getOrdinalThroughValue(parcelObtain2.readInt())]);
        epgFirstMatchHdCast.serviceName = parcelObtain2.readString();
        if (parcelObtain2.readInt() == 0) {
            epgFirstMatchHdCast.isResolvable = false;
        } else {
            epgFirstMatchHdCast.isResolvable = true;
        }
        parcelObtain.recycle();
        parcelObtain2.recycle();
        return epgFirstMatchHdCast;
    }

    public final EpgFirstMatchHdCast getEvent1stMatchHdSimulcast(short s2, int i2, Time time) throws TvCommonException {
        Parcel parcelObtain = Parcel.obtain();
        Parcel parcelObtain2 = Parcel.obtain();
        parcelObtain.writeInterfaceToken(IEPG_MANAGER);
        int millis = (int) (time.toMillis(true) / 1000);
        parcelObtain.writeInt(s2);
        parcelObtain.writeInt(i2);
        parcelObtain.writeInt(millis);
        _getEvent1stMatchHdSimulcast(parcelObtain, parcelObtain2);
        if (parcelObtain2.readInt() == 0) {
            parcelObtain.recycle();
            parcelObtain2.recycle();
            throw new TvNativeCallFailException("funtion failed at tvservice ");
        }
        EpgFirstMatchHdCast epgFirstMatchHdCast = new EpgFirstMatchHdCast();
        epgFirstMatchHdCast.epgEventInfoVO.startTime = parcelObtain2.readInt();
        epgFirstMatchHdCast.epgEventInfoVO.endTime = parcelObtain2.readInt();
        epgFirstMatchHdCast.epgEventInfoVO.durationTime = parcelObtain2.readInt();
        epgFirstMatchHdCast.epgEventInfoVO.name = parcelObtain2.readString();
        epgFirstMatchHdCast.epgEventInfoVO.eventId = parcelObtain2.readInt();
        if (parcelObtain2.readInt() == 0) {
            epgFirstMatchHdCast.epgEventInfoVO.isScrambled = false;
        } else {
            epgFirstMatchHdCast.epgEventInfoVO.isScrambled = true;
        }
        epgFirstMatchHdCast.epgEventInfoVO.genre = (short) parcelObtain2.readInt();
        epgFirstMatchHdCast.epgEventInfoVO.parentalRating = (short) parcelObtain2.readInt();
        epgFirstMatchHdCast.epgEventInfoVO.description = parcelObtain2.readString();
        epgFirstMatchHdCast.epgEventInfoVO.originalStartTime = parcelObtain2.readInt();
        epgFirstMatchHdCast.epgEventInfoVO.setEpgFunctionStatus(EpgEventInfo.EnumEpgFunctionStatus.values()[EpgEventInfo.EnumEpgFunctionStatus.getOrdinalThroughValue(parcelObtain2.readInt())]);
        epgFirstMatchHdCast.serviceName = parcelObtain2.readString();
        if (parcelObtain2.readInt() == 0) {
            epgFirstMatchHdCast.isResolvable = false;
        } else {
            epgFirstMatchHdCast.isResolvable = true;
        }
        parcelObtain.recycle();
        parcelObtain2.recycle();
        return epgFirstMatchHdCast;
    }

    public final native int getEventCount(int i2, int i3, int i4, int i5, int i6) throws TvCommonException;

    public final int getEventCount(short s2, int i2, Time time) throws TvCommonException {
        return getEventCount(s2, i2, (int) (time.toMillis(true) / 1000));
    }

    public String getEventDescriptor(short s2, int i2, Time time, DtvType.EnumEpgDescriptionType enumEpgDescriptionType) throws TvCommonException {
        Parcel parcelObtain = Parcel.obtain();
        Parcel parcelObtain2 = Parcel.obtain();
        parcelObtain.writeInterfaceToken(IEPG_MANAGER);
        int millis = (int) (time.toMillis(true) / 1000);
        parcelObtain.writeInt(s2);
        parcelObtain.writeInt(i2);
        parcelObtain.writeInt(millis);
        parcelObtain.writeInt(enumEpgDescriptionType.ordinal());
        _getEventDescriptor(parcelObtain, parcelObtain2);
        if (parcelObtain2.readInt() == 0) {
            parcelObtain.recycle();
            parcelObtain2.recycle();
            throw new TvNativeCallFailException("funtion failed at tvservice ");
        }
        String string = parcelObtain2.readString();
        parcelObtain.recycle();
        parcelObtain2.recycle();
        return string;
    }

    public final AtscEpgEventInfo getEventExtendInfoByTime(int i2, int i3, int i4, int i5, int i6) throws TvCommonException {
        Parcel parcelObtain = Parcel.obtain();
        Parcel parcelObtain2 = Parcel.obtain();
        parcelObtain.writeInterfaceToken(IEPG_MANAGER);
        parcelObtain.writeInt(i2);
        parcelObtain.writeInt(i3);
        parcelObtain.writeInt(i4);
        parcelObtain.writeInt(i5);
        parcelObtain.writeInt(i6);
        _getEventExtendInfoByTime(parcelObtain, parcelObtain2);
        if (parcelObtain2.readInt() == 0) {
            parcelObtain.recycle();
            parcelObtain2.recycle();
            throw new TvNativeCallFailException("funtion failed at tvservice ");
        }
        AtscEpgEventInfo atscEpgEventInfo = new AtscEpgEventInfo(parcelObtain2);
        parcelObtain.recycle();
        parcelObtain2.recycle();
        return atscEpgEventInfo;
    }

    public final ArrayList<EpgHdSimulcast> getEventHdSimulcast(short s2, int i2, Time time, short s3) throws TvCommonException {
        Parcel parcelObtain = Parcel.obtain();
        Parcel parcelObtain2 = Parcel.obtain();
        parcelObtain.writeInterfaceToken(IEPG_MANAGER);
        int millis = (int) (time.toMillis(true) / 1000);
        parcelObtain.writeInt(s2);
        parcelObtain.writeInt(i2);
        parcelObtain.writeInt(millis);
        parcelObtain.writeInt(s3);
        _getEventHdSimulcast(parcelObtain, parcelObtain2);
        if (parcelObtain2.readInt() == 0) {
            parcelObtain.recycle();
            parcelObtain2.recycle();
            throw new TvNativeCallFailException("funtion failed at tvservice ");
        }
        ArrayList<EpgHdSimulcast> arrayList = new ArrayList<>();
        int i3 = parcelObtain2.readInt();
        for (int i4 = 0; i4 < i3; i4++) {
            EpgHdSimulcast epgHdSimulcast = new EpgHdSimulcast();
            epgHdSimulcast.stEventInfo.startTime = parcelObtain2.readInt();
            epgHdSimulcast.stEventInfo.endTime = parcelObtain2.readInt();
            epgHdSimulcast.stEventInfo.durationTime = parcelObtain2.readInt();
            epgHdSimulcast.stEventInfo.name = parcelObtain2.readString();
            epgHdSimulcast.stEventInfo.eventId = parcelObtain2.readInt();
            if (parcelObtain2.readInt() == 0) {
                epgHdSimulcast.stEventInfo.isScrambled = false;
            } else {
                epgHdSimulcast.stEventInfo.isScrambled = true;
            }
            epgHdSimulcast.stEventInfo.genre = (short) parcelObtain2.readInt();
            epgHdSimulcast.stEventInfo.parentalRating = (short) parcelObtain2.readInt();
            epgHdSimulcast.stEventInfo.description = parcelObtain2.readString();
            epgHdSimulcast.stEventInfo.originalStartTime = parcelObtain2.readInt();
            try {
                epgHdSimulcast.stEventInfo.setEpgFunctionStatus(EpgEventInfo.EnumEpgFunctionStatus.values()[EpgEventInfo.EnumEpgFunctionStatus.getOrdinalThroughValue(parcelObtain2.readInt())]);
                epgHdSimulcast.serviceType = (short) parcelObtain2.readInt();
                epgHdSimulcast.serviceNumber = parcelObtain2.readInt();
                if (parcelObtain2.readInt() == 0) {
                    epgHdSimulcast.isHdEeventResolvable = false;
                } else {
                    epgHdSimulcast.isHdEeventResolvable = true;
                }
                if (parcelObtain2.readInt() == 0) {
                    epgHdSimulcast.isHdServiceResolvable = false;
                } else {
                    epgHdSimulcast.isHdServiceResolvable = true;
                }
                if (parcelObtain2.readInt() == 0) {
                    epgHdSimulcast.isSimulcast = false;
                } else {
                    epgHdSimulcast.isSimulcast = true;
                }
                epgHdSimulcast.serviceName = parcelObtain2.readString();
                arrayList.add(epgHdSimulcast);
            } catch (TvOutOfBoundException e2) {
                e2.printStackTrace();
            }
        }
        parcelObtain.recycle();
        parcelObtain2.recycle();
        return arrayList;
    }

    public final ArrayList<EpgEventInfo> getEventInfo(short s2, int i2, Time time, int i3) throws TvCommonException {
        Parcel parcelObtain = Parcel.obtain();
        Parcel parcelObtain2 = Parcel.obtain();
        parcelObtain.writeInterfaceToken(IEPG_MANAGER);
        int millis = (int) (time.toMillis(false) / 1000);
        parcelObtain.writeInt(s2);
        parcelObtain.writeInt(i2);
        parcelObtain.writeInt(millis);
        parcelObtain.writeInt(i3);
        _getEventInfo(parcelObtain, parcelObtain2);
        if (parcelObtain2.readInt() == 0) {
            parcelObtain.recycle();
            parcelObtain2.recycle();
            throw new TvNativeCallFailException("funtion failed at tvservice ");
        }
        ArrayList<EpgEventInfo> arrayList = new ArrayList<>();
        int i4 = parcelObtain2.readInt();
        for (int i5 = 0; i5 < i4; i5++) {
            EpgEventInfo epgEventInfo = new EpgEventInfo();
            epgEventInfo.startTime = parcelObtain2.readInt();
            epgEventInfo.endTime = parcelObtain2.readInt();
            epgEventInfo.durationTime = parcelObtain2.readInt();
            epgEventInfo.name = parcelObtain2.readString();
            epgEventInfo.eventId = parcelObtain2.readInt();
            if (parcelObtain2.readInt() == 0) {
                epgEventInfo.isScrambled = false;
            } else {
                epgEventInfo.isScrambled = true;
            }
            epgEventInfo.genre = (short) parcelObtain2.readInt();
            epgEventInfo.parentalRating = (short) parcelObtain2.readInt();
            epgEventInfo.description = parcelObtain2.readString();
            epgEventInfo.originalStartTime = parcelObtain2.readInt();
            try {
                epgEventInfo.setEpgFunctionStatus(EpgEventInfo.EnumEpgFunctionStatus.values()[EpgEventInfo.EnumEpgFunctionStatus.getOrdinalThroughValue(parcelObtain2.readInt())]);
                arrayList.add(epgEventInfo);
            } catch (TvOutOfBoundException e2) {
                e2.printStackTrace();
            }
        }
        parcelObtain.recycle();
        parcelObtain2.recycle();
        return arrayList;
    }

    public final EpgEventInfo getEventInfoById(short s2, int i2, short s3) throws TvCommonException {
        Parcel parcelObtain = Parcel.obtain();
        Parcel parcelObtain2 = Parcel.obtain();
        parcelObtain.writeInterfaceToken(IEPG_MANAGER);
        parcelObtain.writeInt(s2);
        parcelObtain.writeInt(i2);
        parcelObtain.writeInt(s3);
        _getEventInfoById(parcelObtain, parcelObtain2);
        if (parcelObtain2.readInt() == 0) {
            parcelObtain.recycle();
            parcelObtain2.recycle();
            throw new TvNativeCallFailException("funtion failed at tvservice ");
        }
        EpgEventInfo epgEventInfo = new EpgEventInfo();
        epgEventInfo.startTime = parcelObtain2.readInt();
        epgEventInfo.endTime = parcelObtain2.readInt();
        epgEventInfo.durationTime = parcelObtain2.readInt();
        epgEventInfo.name = parcelObtain2.readString();
        epgEventInfo.eventId = parcelObtain2.readInt();
        if (parcelObtain2.readInt() == 0) {
            epgEventInfo.isScrambled = false;
        } else {
            epgEventInfo.isScrambled = true;
        }
        epgEventInfo.genre = (short) parcelObtain2.readInt();
        epgEventInfo.parentalRating = (short) parcelObtain2.readInt();
        epgEventInfo.description = parcelObtain2.readString();
        epgEventInfo.originalStartTime = parcelObtain2.readInt();
        epgEventInfo.setEpgFunctionStatus(EpgEventInfo.EnumEpgFunctionStatus.values()[EpgEventInfo.EnumEpgFunctionStatus.getOrdinalThroughValue(parcelObtain2.readInt())]);
        parcelObtain.recycle();
        parcelObtain2.recycle();
        return epgEventInfo;
    }

    public final ArrayList<EpgCridEventInfo> getEventInfoByRctLink(EpgTrailerLinkInfo epgTrailerLinkInfo) throws TvCommonException {
        Parcel parcelObtain = Parcel.obtain();
        Parcel parcelObtain2 = Parcel.obtain();
        parcelObtain.writeInterfaceToken(IEPG_MANAGER);
        parcelObtain.writeInt(epgTrailerLinkInfo.cridType);
        parcelObtain.writeInt(epgTrailerLinkInfo.iconId);
        parcelObtain.writeString(epgTrailerLinkInfo.pEventTitle);
        parcelObtain.writeString(epgTrailerLinkInfo.promotionText);
        parcelObtain.writeString(epgTrailerLinkInfo.trailerCrid);
        _getEventInfoByRctLink(parcelObtain, parcelObtain2);
        if (parcelObtain2.readInt() == 0) {
            parcelObtain.recycle();
            parcelObtain2.recycle();
            throw new TvNativeCallFailException("funtion failed at tvservice ");
        }
        ArrayList<EpgCridEventInfo> arrayList = new ArrayList<>();
        int i2 = parcelObtain2.readInt();
        for (int i3 = 0; i3 < i2; i3++) {
            EpgCridEventInfo epgCridEventInfo = new EpgCridEventInfo();
            epgCridEventInfo.serviceType = (short) parcelObtain2.readInt();
            epgCridEventInfo.serviceNumber = parcelObtain2.readInt();
            epgCridEventInfo.eventInfo.startTime = parcelObtain2.readInt();
            epgCridEventInfo.eventInfo.endTime = parcelObtain2.readInt();
            epgCridEventInfo.eventInfo.durationTime = parcelObtain2.readInt();
            epgCridEventInfo.eventInfo.name = parcelObtain2.readString();
            epgCridEventInfo.eventInfo.eventId = parcelObtain2.readInt();
            if (parcelObtain2.readInt() == 0) {
                epgCridEventInfo.eventInfo.isScrambled = false;
            } else {
                epgCridEventInfo.eventInfo.isScrambled = true;
            }
            epgCridEventInfo.eventInfo.genre = (short) parcelObtain2.readInt();
            epgCridEventInfo.eventInfo.parentalRating = (short) parcelObtain2.readInt();
            epgCridEventInfo.eventInfo.description = parcelObtain2.readString();
            epgCridEventInfo.eventInfo.originalStartTime = parcelObtain2.readInt();
            try {
                epgCridEventInfo.eventInfo.setEpgFunctionStatus(EpgEventInfo.EnumEpgFunctionStatus.values()[EpgEventInfo.EnumEpgFunctionStatus.getOrdinalThroughValue(parcelObtain2.readInt())]);
                arrayList.add(epgCridEventInfo);
            } catch (TvOutOfBoundException e2) {
                e2.printStackTrace();
            }
        }
        parcelObtain.recycle();
        parcelObtain2.recycle();
        return arrayList;
    }

    public final EpgEventInfo getEventInfoByTime(short s2, int i2, Time time) throws TvCommonException {
        Parcel parcelObtain = Parcel.obtain();
        Parcel parcelObtain2 = Parcel.obtain();
        parcelObtain.writeInterfaceToken(IEPG_MANAGER);
        int millis = (int) (time.toMillis(true) / 1000);
        parcelObtain.writeInt(s2);
        parcelObtain.writeInt(i2);
        parcelObtain.writeInt(millis);
        _getEventInfoByTime(parcelObtain, parcelObtain2);
        if (parcelObtain2.readInt() == 0) {
            parcelObtain.recycle();
            parcelObtain2.recycle();
            throw new TvNativeCallFailException("funtion failed at tvservice ");
        }
        EpgEventInfo epgEventInfo = new EpgEventInfo();
        epgEventInfo.startTime = parcelObtain2.readInt();
        epgEventInfo.endTime = parcelObtain2.readInt();
        epgEventInfo.durationTime = parcelObtain2.readInt();
        epgEventInfo.name = parcelObtain2.readString();
        epgEventInfo.eventId = parcelObtain2.readInt();
        if (parcelObtain2.readInt() == 0) {
            epgEventInfo.isScrambled = false;
        } else {
            epgEventInfo.isScrambled = true;
        }
        epgEventInfo.genre = (short) parcelObtain2.readInt();
        epgEventInfo.parentalRating = (short) parcelObtain2.readInt();
        epgEventInfo.description = parcelObtain2.readString();
        epgEventInfo.originalStartTime = parcelObtain2.readInt();
        epgEventInfo.setEpgFunctionStatus(EpgEventInfo.EnumEpgFunctionStatus.values()[EpgEventInfo.EnumEpgFunctionStatus.getOrdinalThroughValue(parcelObtain2.readInt())]);
        parcelObtain.recycle();
        parcelObtain2.recycle();
        return epgEventInfo;
    }

    public final AtscEpgEventInfo getFirstEventInformation(int i2) throws TvCommonException {
        Parcel parcelObtain = Parcel.obtain();
        Parcel parcelObtain2 = Parcel.obtain();
        parcelObtain.writeInterfaceToken(IEPG_MANAGER);
        parcelObtain.writeInt(i2);
        _getFirstEventInformation(parcelObtain, parcelObtain2);
        if (parcelObtain2.readInt() == 0) {
            parcelObtain.recycle();
            parcelObtain2.recycle();
            throw new TvNativeCallFailException("funtion failed at tvservice ");
        }
        AtscEpgEventInfo atscEpgEventInfo = new AtscEpgEventInfo(parcelObtain2);
        parcelObtain.recycle();
        parcelObtain2.recycle();
        return atscEpgEventInfo;
    }

    public final AtscEpgEventInfo getNextEventInformation() throws TvCommonException {
        Parcel parcelObtain = Parcel.obtain();
        Parcel parcelObtain2 = Parcel.obtain();
        parcelObtain.writeInterfaceToken(IEPG_MANAGER);
        _getNextEventInformation(parcelObtain, parcelObtain2);
        if (parcelObtain2.readInt() == 0) {
            parcelObtain.recycle();
            parcelObtain2.recycle();
            throw new TvNativeCallFailException("funtion failed at tvservice ");
        }
        AtscEpgEventInfo atscEpgEventInfo = new AtscEpgEventInfo(parcelObtain2);
        parcelObtain.recycle();
        parcelObtain2.recycle();
        return atscEpgEventInfo;
    }

    public final native int getNvodTimeShiftEventCount(short s2, int i2) throws TvCommonException;

    public ArrayList<NvodEventInfo> getNvodTimeShiftEventInfo(short s2, int i2, int i3, DtvType.EnumEpgDescriptionType enumEpgDescriptionType) throws TvCommonException {
        Parcel parcelObtain = Parcel.obtain();
        Parcel parcelObtain2 = Parcel.obtain();
        parcelObtain.writeInterfaceToken(IEPG_MANAGER);
        parcelObtain.writeInt(s2);
        parcelObtain.writeInt(i2);
        parcelObtain.writeInt(i3);
        parcelObtain.writeInt(enumEpgDescriptionType.ordinal());
        _getNvodTimeShiftEventInfo(parcelObtain, parcelObtain2);
        if (parcelObtain2.readInt() == 0) {
            parcelObtain.recycle();
            parcelObtain2.recycle();
            throw new TvNativeCallFailException("funtion failed at tvservice ");
        }
        ArrayList<NvodEventInfo> arrayList = new ArrayList<>();
        int i4 = parcelObtain2.readInt();
        for (int i5 = 0; i5 < i4; i5++) {
            NvodEventInfo nvodEventInfo = new NvodEventInfo();
            nvodEventInfo.epgEventInfo.startTime = parcelObtain2.readInt();
            nvodEventInfo.epgEventInfo.endTime = parcelObtain2.readInt();
            nvodEventInfo.epgEventInfo.durationTime = parcelObtain2.readInt();
            nvodEventInfo.epgEventInfo.name = parcelObtain2.readString();
            nvodEventInfo.epgEventInfo.eventId = parcelObtain2.readInt();
            if (parcelObtain2.readInt() == 0) {
                nvodEventInfo.epgEventInfo.isScrambled = false;
            } else {
                nvodEventInfo.epgEventInfo.isScrambled = true;
            }
            nvodEventInfo.epgEventInfo.genre = (short) parcelObtain2.readInt();
            nvodEventInfo.epgEventInfo.parentalRating = (short) parcelObtain2.readInt();
            nvodEventInfo.epgEventInfo.description = parcelObtain2.readString();
            nvodEventInfo.epgEventInfo.originalStartTime = parcelObtain2.readInt();
            try {
                nvodEventInfo.epgEventInfo.setEpgFunctionStatus(EpgEventInfo.EnumEpgFunctionStatus.values()[EpgEventInfo.EnumEpgFunctionStatus.getOrdinalThroughValue(parcelObtain2.readInt())]);
                nvodEventInfo.timeShiftedServiceIds.originalNetworkId = parcelObtain2.readInt();
                nvodEventInfo.timeShiftedServiceIds.transportStreamId = parcelObtain2.readInt();
                nvodEventInfo.timeShiftedServiceIds.serviceId = parcelObtain2.readInt();
                arrayList.add(nvodEventInfo);
            } catch (TvOutOfBoundException e2) {
                e2.printStackTrace();
            }
        }
        parcelObtain.recycle();
        parcelObtain2.recycle();
        return arrayList;
    }

    public PresentFollowingEventInfo getPresentFollowingEventInfo(short s2, int i2, boolean z2, DtvType.EnumEpgDescriptionType enumEpgDescriptionType) throws TvCommonException {
        Parcel parcelObtain = Parcel.obtain();
        Parcel parcelObtain2 = Parcel.obtain();
        parcelObtain.writeInterfaceToken(IEPG_MANAGER);
        parcelObtain.writeInt(s2);
        parcelObtain.writeInt(i2);
        if (z2) {
            parcelObtain.writeInt(1);
        } else {
            parcelObtain.writeInt(0);
        }
        parcelObtain.writeInt(enumEpgDescriptionType.ordinal());
        _getPresentFollowingEventInfo(parcelObtain, parcelObtain2);
        if (parcelObtain2.readInt() == 0) {
            parcelObtain.recycle();
            parcelObtain2.recycle();
            return null;
        }
        PresentFollowingEventInfo presentFollowingEventInfo = new PresentFollowingEventInfo();
        presentFollowingEventInfo.componentInfo.setVideoType(EnumVideoType.values()[parcelObtain2.readInt()]);
        if (parcelObtain2.readInt() == 0) {
            presentFollowingEventInfo.componentInfo.mheg5Service = false;
        } else {
            presentFollowingEventInfo.componentInfo.mheg5Service = true;
        }
        if (parcelObtain2.readInt() == 0) {
            presentFollowingEventInfo.componentInfo.subtitleService = false;
        } else {
            presentFollowingEventInfo.componentInfo.subtitleService = true;
        }
        if (parcelObtain2.readInt() == 0) {
            presentFollowingEventInfo.componentInfo.teletextService = false;
        } else {
            presentFollowingEventInfo.componentInfo.teletextService = true;
        }
        if (parcelObtain2.readInt() == 0) {
            presentFollowingEventInfo.componentInfo.ccService = false;
        } else {
            presentFollowingEventInfo.componentInfo.ccService = true;
        }
        presentFollowingEventInfo.componentInfo.setDtvVideoQuality(DtvType.EnumDtvVideoQuality.values()[parcelObtain2.readInt()]);
        if (parcelObtain2.readInt() == 0) {
            presentFollowingEventInfo.componentInfo.isAd = false;
        } else {
            presentFollowingEventInfo.componentInfo.isAd = true;
        }
        presentFollowingEventInfo.componentInfo.audioTrackNum = (short) parcelObtain2.readInt();
        presentFollowingEventInfo.componentInfo.subtitleNum = (short) parcelObtain2.readInt();
        presentFollowingEventInfo.componentInfo.setAspectRatioCode(DtvType.EnumAspectRatioCode.values()[parcelObtain2.readInt()]);
        presentFollowingEventInfo.componentInfo.setGenreType(DtvType.EnumEpgMainGenreType.values()[DtvType.EnumEpgMainGenreType.getOrdinalThroughValue(parcelObtain2.readInt())]);
        presentFollowingEventInfo.componentInfo.parentalRating = (short) parcelObtain2.readInt();
        presentFollowingEventInfo.eventInfo.originalStartTime = parcelObtain2.readInt();
        presentFollowingEventInfo.eventInfo.durationTime = parcelObtain2.readInt();
        presentFollowingEventInfo.eventInfo.startTime = parcelObtain2.readInt();
        presentFollowingEventInfo.eventInfo.endTime = parcelObtain2.readInt();
        presentFollowingEventInfo.eventInfo.setEpgFunctionStatus(EpgEventInfo.EnumEpgFunctionStatus.values()[EpgEventInfo.EnumEpgFunctionStatus.getOrdinalThroughValue(parcelObtain2.readInt())]);
        presentFollowingEventInfo.eventInfo.name = parcelObtain2.readString();
        presentFollowingEventInfo.eventInfo.eventId = parcelObtain2.readInt();
        if (parcelObtain2.readInt() == 0) {
            presentFollowingEventInfo.eventInfo.isScrambled = false;
        } else {
            presentFollowingEventInfo.eventInfo.isScrambled = true;
        }
        presentFollowingEventInfo.eventInfo.genre = (short) parcelObtain2.readInt();
        presentFollowingEventInfo.eventInfo.parentalRating = (short) parcelObtain2.readInt();
        presentFollowingEventInfo.eventInfo.description = parcelObtain2.readString();
        parcelObtain.recycle();
        parcelObtain2.recycle();
        return presentFollowingEventInfo;
    }

    public final ArrayList<EpgTrailerLinkInfo> getRctTrailerLink() throws TvCommonException {
        Parcel parcelObtain = Parcel.obtain();
        Parcel parcelObtain2 = Parcel.obtain();
        parcelObtain.writeInterfaceToken(IEPG_MANAGER);
        _getRctTrailerLink(parcelObtain, parcelObtain2);
        if (parcelObtain2.readInt() == 0) {
            parcelObtain.recycle();
            parcelObtain2.recycle();
            throw new TvNativeCallFailException("funtion failed at tvservice ");
        }
        ArrayList<EpgTrailerLinkInfo> arrayList = new ArrayList<>();
        int i2 = parcelObtain2.readInt();
        for (int i3 = 0; i3 < i2; i3++) {
            EpgTrailerLinkInfo epgTrailerLinkInfo = new EpgTrailerLinkInfo();
            epgTrailerLinkInfo.cridType = parcelObtain2.readInt();
            epgTrailerLinkInfo.iconId = (short) parcelObtain2.readInt();
            epgTrailerLinkInfo.pEventTitle = parcelObtain2.readString();
            epgTrailerLinkInfo.promotionText = parcelObtain2.readString();
            epgTrailerLinkInfo.trailerCrid = parcelObtain2.readString();
            arrayList.add(epgTrailerLinkInfo);
        }
        parcelObtain.recycle();
        parcelObtain2.recycle();
        return arrayList;
    }

    public final native void resetEpgProgramPriority() throws TvCommonException;

    public final native void setEpgProgramPriority(int i2) throws TvCommonException;

    public final native void setEpgProgramPriority(short s2, int i2) throws TvCommonException;

    public final AtscEpgEventInfo getEventInfoByTime(int i2, int i3, int i4, int i5, int i6) throws TvCommonException {
        Parcel parcelObtain = Parcel.obtain();
        Parcel parcelObtain2 = Parcel.obtain();
        parcelObtain.writeInterfaceToken(IEPG_MANAGER);
        parcelObtain.writeInt(i2);
        parcelObtain.writeInt(i3);
        parcelObtain.writeInt(i4);
        parcelObtain.writeInt(i5);
        parcelObtain.writeInt(i6);
        _atsc_getEventInfoByTime(parcelObtain, parcelObtain2);
        if (parcelObtain2.readInt() != 0) {
            AtscEpgEventInfo atscEpgEventInfo = new AtscEpgEventInfo(parcelObtain2);
            parcelObtain.recycle();
            parcelObtain2.recycle();
            return atscEpgEventInfo;
        }
        parcelObtain.recycle();
        parcelObtain2.recycle();
        throw new TvNativeCallFailException("funtion failed at tvservice ");
    }
}
