package com.letv.core.db;

import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.text.TextUtils;
import com.letv.core.bean.DownloadDBListBean;
import com.letv.core.bean.DownloadDBListBean.DownloadDBBean;
import com.letv.core.constant.DownloadConstant;
import com.letv.core.utils.DownloadUtils;
import com.letv.core.utils.LetvTools;
import com.letv.download.db.Download.DownloadAlbumTable;
import com.letv.download.db.Download.DownloadVideoTable;
import com.letv.mobile.lebox.jump.PageJumpUtil;
import io.fabric.sdk.android.services.settings.SettingsJsonConstants;
import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.concurrent.Executors;

public class DownloadTraceHandler {
    AsyDataBaseHandler asyDataBaseHandler;
    private Context mContext;

    public boolean isInFinish(java.lang.String r11) {
        /* JADX: method processing error */
/*
Error: java.lang.NullPointerException
*/
        /*
        r10 = this;
        r8 = 0;
        r6 = 0;
        r7 = 0;
        r0 = r10.mContext;	 Catch:{ Exception -> 0x0030, all -> 0x0036 }
        r0 = r0.getContentResolver();	 Catch:{ Exception -> 0x0030, all -> 0x0036 }
        r1 = com.letv.core.db.LetvContentProvider.URI_DOWNLOADTRACE;	 Catch:{ Exception -> 0x0030, all -> 0x0036 }
        r2 = 1;	 Catch:{ Exception -> 0x0030, all -> 0x0036 }
        r2 = new java.lang.String[r2];	 Catch:{ Exception -> 0x0030, all -> 0x0036 }
        r3 = 0;	 Catch:{ Exception -> 0x0030, all -> 0x0036 }
        r4 = "episodetitle";	 Catch:{ Exception -> 0x0030, all -> 0x0036 }
        r2[r3] = r4;	 Catch:{ Exception -> 0x0030, all -> 0x0036 }
        r3 = "episodeid=? AND finish=?";	 Catch:{ Exception -> 0x0030, all -> 0x0036 }
        r4 = 2;	 Catch:{ Exception -> 0x0030, all -> 0x0036 }
        r4 = new java.lang.String[r4];	 Catch:{ Exception -> 0x0030, all -> 0x0036 }
        r5 = 0;	 Catch:{ Exception -> 0x0030, all -> 0x0036 }
        r4[r5] = r11;	 Catch:{ Exception -> 0x0030, all -> 0x0036 }
        r5 = 1;	 Catch:{ Exception -> 0x0030, all -> 0x0036 }
        r9 = "4";	 Catch:{ Exception -> 0x0030, all -> 0x0036 }
        r4[r5] = r9;	 Catch:{ Exception -> 0x0030, all -> 0x0036 }
        r5 = 0;	 Catch:{ Exception -> 0x0030, all -> 0x0036 }
        r6 = r0.query(r1, r2, r3, r4, r5);	 Catch:{ Exception -> 0x0030, all -> 0x0036 }
        r0 = r6.getCount();	 Catch:{ Exception -> 0x0030, all -> 0x0036 }
        if (r0 <= 0) goto L_0x002c;
    L_0x002b:
        r7 = 1;
    L_0x002c:
        com.letv.core.utils.LetvTools.closeCursor(r6);
    L_0x002f:
        return r7;
    L_0x0030:
        r0 = move-exception;
        com.letv.core.utils.LetvTools.closeCursor(r6);
        r7 = r8;
        goto L_0x002f;
    L_0x0036:
        r0 = move-exception;
        com.letv.core.utils.LetvTools.closeCursor(r6);
        throw r0;
        */
        throw new UnsupportedOperationException("Method not decompiled: com.letv.core.db.DownloadTraceHandler.isInFinish(java.lang.String):boolean");
    }

    public DownloadTraceHandler(Context context) {
        this.mContext = context;
    }