导航菜单

页面标题

页面副标题

饼干视频 v4.1.0 - ItemCacheingViewModel.java 源代码

正在查看: 饼干视频 v4.1.0 应用的 ItemCacheingViewModel.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.aamon.symmetry.originui.zj.cache.caching;

import amc.cd.p038.C0345;
import amc.cd.p058.C0641;
import amc.cd.p101.C0893;
import amc.cd.p101.C0900;
import amc.cd.p101.C0921;
import amc.cd.p106.C0936;
import amc.cd.अएऌऌएऌऋओऌ.अअआऊअआइआ;
import amc.cd.इऐइइऊ.ऊओइओआएआआए;
import amc.cd.ऋईऋइऔएऐऊ.औउऐऌ;
import amc.cd.ऌऊउऋऐअ.ऐऊऐएओऔऔऋऐऐ;
import amc.cd.ऌऐऊओऌऔऊ.ओऔईऔइएअओऐओ;
import amc.cd.एओईआ.ईऌओओआऊउउईउ;
import android.os.Handler;
import androidx.databinding.ObservableField;
import androidx.lifecycle.viewmodel.CacheingViewModel;
import com.aamon.symmetry.origin.data.database.local.table.VideoDownloadEntity;
import com.aamon.symmetry.origin.data.entry.cache.DownloadInfoEntry;
import com.aamon.symmetry.origin.data.entry.videodetail.VideoDetailBean;
import com.aamon.symmetry.origin.data.netData.RetrofitUtil;
import com.aamon.symmetry.origin.init.MyApplication;
import com.aamon.symmetry.originui.zj.cache.caching.ItemCacheingViewModel;
import com.alimm.tanx.core.ad.event.track.expose.ExposeManager;
import com.bottom.base.commonhttp.BaseInitResponse;
import io.reactivex.Single;
import io.reactivex.SingleObserver;
import io.reactivex.SingleSource;
import io.reactivex.SingleTransformer;
import io.reactivex.disposables.Disposable;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import kotlin.Metadata;
import okhttp3.Response;
import okhttp3.ResponseBody;

@Metadata(d1 = {"\u0000d\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\u0010\u000b\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\n\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0015\n\u0002\u0018\u0002\n\u0002\b+\n\u0002\u0018\u0002\n\u0002\b\u0010\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001:\u0001\u0014B1\u0012\u0007\u0010\u0080\u0001\u001a\u00020\u0002\u0012\u0006\u0010G\u001a\u00020.\u0012\f\u0010N\u001a\b\u0012\u0004\u0012\u00020H0-\u0012\u0007\u0010\u0081\u0001\u001a\u00020\u0012¢\u0006\u0006\b\u0082\u0001\u0010\u0083\u0001J,\u0010\n\u001a\u00020\t2\b\u0010\u0004\u001a\u0004\u0018\u00010\u00032\b\u0010\u0005\u001a\u0004\u0018\u00010\u00032\u0006\u0010\u0007\u001a\u00020\u00062\u0006\u0010\b\u001a\u00020\u0006H\u0002J,\u0010\f\u001a\u00020\t2\b\u0010\u0004\u001a\u0004\u0018\u00010\u00032\b\u0010\u000b\u001a\u0004\u0018\u00010\u00032\u0006\u0010\u0007\u001a\u00020\u00062\u0006\u0010\b\u001a\u00020\u0006H\u0002J\u0018\u0010\u000f\u001a\u00020\t2\u0006\u0010\r\u001a\u00020\u00032\u0006\u0010\u000e\u001a\u00020\u0006H\u0002J\u0012\u0010\u0010\u001a\u00020\t2\b\u0010\r\u001a\u0004\u0018\u00010\u0003H\u0002R0\u0010\u0016\u001a\u0010\u0012\f\u0012\n \u0013*\u0004\u0018\u00010\u00120\u00120\u00118\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b\u0014\u0010\u0015\u001a\u0004\b\u0016\u0010\u0017\"\u0004\b\u0018\u0010\u0019R$\u0010!\u001a\u0004\u0018\u00010\u001a8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b\u001b\u0010\u001c\u001a\u0004\b\u001d\u0010\u001e\"\u0004\b\u001f\u0010 R$\u0010)\u001a\u0004\u0018\u00010\"8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b#\u0010$\u001a\u0004\b%\u0010&\"\u0004\b'\u0010(R\u0018\u0010,\u001a\u0004\u0018\u00010\u00038\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b*\u0010+R\u001c\u00101\u001a\b\u0012\u0004\u0012\u00020.0-8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b/\u00100R&\u00109\u001a\u000602R\u00020\u00008\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b3\u00104\u001a\u0004\b5\u00106\"\u0004\b7\u00108R\"\u0010@\u001a\u00020\u00028\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b:\u0010;\u001a\u0004\b<\u0010=\"\u0004\b>\u0010?R\"\u0010G\u001a\u00020.8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\bA\u0010B\u001a\u0004\bC\u0010D\"\u0004\bE\u0010FR(\u0010N\u001a\b\u0012\u0004\u0012\u00020H0-8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\bI\u00100\u001a\u0004\bJ\u0010K\"\u0004\bL\u0010MR$\u0010U\u001a\u0004\u0018\u00010H8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\bO\u0010P\u001a\u0004\bQ\u0010R\"\u0004\bS\u0010TR0\u0010Y\u001a\u0010\u0012\f\u0012\n \u0013*\u0004\u0018\u00010\u00030\u00030\u00118\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\bV\u0010\u0015\u001a\u0004\bW\u0010\u0017\"\u0004\bX\u0010\u0019R0\u0010\\\u001a\u0010\u0012\f\u0012\n \u0013*\u0004\u0018\u00010\u00030\u00030\u00118\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\bW\u0010\u0015\u001a\u0004\bZ\u0010\u0017\"\u0004\b[\u0010\u0019R0\u0010_\u001a\u0010\u0012\f\u0012\n \u0013*\u0004\u0018\u00010\u00030\u00030\u00118\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\bC\u0010\u0015\u001a\u0004\b]\u0010\u0017\"\u0004\b^\u0010\u0019R*\u0010b\u001a\n\u0012\u0006\u0012\u0004\u0018\u00010\u00060\u00118\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b]\u0010\u0015\u001a\u0004\b`\u0010\u0017\"\u0004\ba\u0010\u0019R0\u0010f\u001a\u0010\u0012\f\u0012\n \u0013*\u0004\u0018\u00010\u00030\u00030\u00118\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\bc\u0010\u0015\u001a\u0004\bd\u0010\u0017\"\u0004\be\u0010\u0019R0\u0010i\u001a\u0010\u0012\f\u0012\n \u0013*\u0004\u0018\u00010\u00030\u00030\u00118\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b%\u0010\u0015\u001a\u0004\bg\u0010\u0017\"\u0004\bh\u0010\u0019R0\u0010l\u001a\u0010\u0012\f\u0012\n \u0013*\u0004\u0018\u00010\u00060\u00060\u00118\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b\u0010\u0010\u0015\u001a\u0004\bj\u0010\u0017\"\u0004\bk\u0010\u0019R0\u0010n\u001a\u0010\u0012\f\u0012\n \u0013*\u0004\u0018\u00010\u00120\u00120\u00118\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b\u000f\u0010\u0015\u001a\u0004\bc\u0010\u0017\"\u0004\bm\u0010\u0019R\"\u0010s\u001a\u00020\u00038\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b\f\u0010+\u001a\u0004\bo\u0010p\"\u0004\bq\u0010rR&\u0010{\u001a\u0006\u0012\u0002\b\u00030t8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\bu\u0010v\u001a\u0004\bw\u0010x\"\u0004\by\u0010zR&\u0010\u007f\u001a\u0006\u0012\u0002\b\u00030t8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b|\u0010v\u001a\u0004\b}\u0010x\"\u0004\b~\u0010z¨\u0006\u0084\u0001"}, d2 = {"Lcom/aamon/symmetry/originui/zj/cache/caching/ItemCacheingViewModel;", "Lamc/cd/अएऌऌएऌऋओऌ/अअआऊअआइआ;", "Landroidx/lifecycle/viewmodel/CacheingViewModel;", "", VideoDownloadEntity.VOD_TOKEN, VideoDownloadEntity.CUR_TIME, "", "vod_id", VideoDownloadEntity.COLLECTION_ID, "Lamc/cd/औउईऐऔएओओ/एऋऔऔइआ;", "ओओउऋ", "curTime", "औइईएई", "url", "status", "ओऔईऔइएअओऐओ", "एऋऔऔइआ", "Landroidx/databinding/ObservableField;", "", "kotlin.jvm.PlatformType", "ईऌओओआऊउउईउ", "Landroidx/databinding/ObservableField;", "isChecked", "()Landroidx/databinding/ObservableField;", "setChecked", "(Landroidx/databinding/ObservableField;)V", "Lamc/cd/ऌऊआए/ईअआऔईऌउऌऐ;", "ऐऊऐएओऔऔऋऐऐ", "Lamc/cd/ऌऊआए/ईअआऔईऌउऌऐ;", "ऐअएईअऌऔओ", "()Lamc/cd/ऌऊआए/ईअआऔईऌउऌऐ;", "ऋऋऊउ", "(Lamc/cd/ऌऊआए/ईअआऔईऌउऌऐ;)V", "rxTimer", "Landroid/os/Handler;", "औउऐऌ", "Landroid/os/Handler;", "औऌऌइई", "()Landroid/os/Handler;", "setMHandler", "(Landroid/os/Handler;)V", "mHandler", "इईऔओऋआऐइऐ", "Ljava/lang/String;", "json", "", "Lcom/aamon/symmetry/origin/data/entry/cache/DownloadInfoEntry;", "ओइऌऊएएऐ", "Ljava/util/List;", "downloadInfos", "Lcom/aamon/symmetry/originui/zj/cache/caching/ItemCacheingViewModel$ईऌओओआऊउउईउ;", "ऌऔऌआउउऊआ", "Lcom/aamon/symmetry/originui/zj/cache/caching/ItemCacheingViewModel$ईऌओओआऊउउईउ;", "ऌउऔअई", "()Lcom/aamon/symmetry/originui/zj/cache/caching/ItemCacheingViewModel$ईऌओओआऊउउईउ;", "setResultTask", "(Lcom/aamon/symmetry/originui/zj/cache/caching/ItemCacheingViewModel$ईऌओओआऊउउईउ;)V", "resultTask", "ऊएअऊऔ", "Landroidx/lifecycle/viewmodel/CacheingViewModel;", "एऊऋऐईइऊऋएऔ", "()Landroidx/lifecycle/viewmodel/CacheingViewModel;", "setViewModel1", "(Landroidx/lifecycle/viewmodel/CacheingViewModel;)V", "viewModel1", "एअऐऌए", "Lcom/aamon/symmetry/origin/data/entry/cache/DownloadInfoEntry;", "ओऌएऐऐऔओऋउउ", "()Lcom/aamon/symmetry/origin/data/entry/cache/DownloadInfoEntry;", "setDownloadInfoEntry", "(Lcom/aamon/symmetry/origin/data/entry/cache/DownloadInfoEntry;)V", "downloadInfoEntry", "Lcom/aamon/symmetry/origin/data/database/local/table/VideoDownloadEntity;", "अअआऊअआइआ", "getDownloadEntityList", "()Ljava/util/List;", "setDownloadEntityList", "(Ljava/util/List;)V", "downloadEntityList", "ईअअआऔऌएऌई", "Lcom/aamon/symmetry/origin/data/database/local/table/VideoDownloadEntity;", "getVideoDownloadEntity", "()Lcom/aamon/symmetry/origin/data/database/local/table/VideoDownloadEntity;", "setVideoDownloadEntity", "(Lcom/aamon/symmetry/origin/data/database/local/table/VideoDownloadEntity;)V", "videoDownloadEntity", "ओऌउऔ", "ऊओइओआएआआए", "setCoverUrl", "coverUrl", "getName", "setName", "name", "ईअआऔईऌउऌऐ", "setDownloadStatus", "downloadStatus", "उउऌऊ", "setPercent", "percent", "इऋऊऊ", "ईऊईऋऊउउऊ", "setRate", "rate", "आऋऐइऊईअईऋ", "setSize", VideoDownloadEntity.SIZE, "औअइऔओऌऐऌऔ", "setShowStatus", "showStatus", "setIcEnableClick", "icEnableClick", "ऊऌऐअइईअ", "()Ljava/lang/String;", "setStreamid", "(Ljava/lang/String;)V", VideoDownloadEntity.STREAMID, "Lamc/cd/ऌऊउऋऐअ/ऐऊऐएओऔऔऋऐऐ;", "ऐऐऔअई", "Lamc/cd/ऌऊउऋऐअ/ऐऊऐएओऔऔऋऐऐ;", "getItemClick", "()Lamc/cd/ऌऊउऋऐअ/ऐऊऐएओऔऔऋऐऐ;", "setItemClick", "(Lamc/cd/ऌऊउऋऐअ/ऐऊऐएओऔऔऋऐऐ;)V", "itemClick", "ऊईआएओउऐ", "ऐउएऔऐआ", "setPauseClick", "pauseClick", "viewModel", "flag", "<init>", "(Landroidx/lifecycle/viewmodel/CacheingViewModel;Lcom/aamon/symmetry/origin/data/entry/cache/DownloadInfoEntry;Ljava/util/List;Z)V", "app_cyBgsp_sp02Release"}, mv = {1, 7, 1})
public final class ItemCacheingViewModel extends अअआऊअआइआ<CacheingViewModel> {

    public List<? extends VideoDownloadEntity> downloadEntityList;

    public String json;

    public ObservableField<String> rate;

    public VideoDownloadEntity videoDownloadEntity;

    public ObservableField<Integer> percent;

    public ObservableField<Boolean> isChecked;

    public ऐऊऐएओऔऔऋऐऐ<?> pauseClick;

    public CacheingViewModel viewModel1;

    public ObservableField<String> name;

    public RunnableC1848 resultTask;

    public DownloadInfoEntry downloadInfoEntry;

    public ObservableField<Integer> showStatus;

    public C0900 rxTimer;

    public ऐऊऐएओऔऔऋऐऐ<?> itemClick;

    public List<? extends DownloadInfoEntry> downloadInfos;

    public ObservableField<String> coverUrl;

    public ObservableField<String> downloadStatus;

    public ObservableField<Boolean> icEnableClick;

    public String streamid;

    public Handler mHandler;

    public ObservableField<String> size;

    @Metadata(d1 = {"\u0000'\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u0003\n\u0002\b\u0003*\u0001\u0000\b\n\u0018\u00002\u0010\u0012\f\u0012\n\u0012\u0006\u0012\u0004\u0018\u00010\u00030\u00020\u0001J\u0010\u0010\u0007\u001a\u00020\u00062\u0006\u0010\u0005\u001a\u00020\u0004H\u0016J\u0018\u0010\t\u001a\u00020\u00062\u000e\u0010\b\u001a\n\u0012\u0006\u0012\u0004\u0018\u00010\u00030\u0002H\u0016J\u0010\u0010\f\u001a\u00020\u00062\u0006\u0010\u000b\u001a\u00020\nH\u0016¨\u0006\r"}, d2 = {"com/aamon/symmetry/originui/zj/cache/caching/ItemCacheingViewModel$इईऔओऋआऐइऐ", "Lio/reactivex/SingleObserver;", "Lcom/bottom/base/commonhttp/BaseInitResponse;", "Lcom/aamon/symmetry/origin/data/entry/videodetail/VideoDetailBean;", "Lio/reactivex/disposables/Disposable;", "d", "Lamc/cd/औउईऐऔएओओ/एऋऔऔइआ;", "onSubscribe", "resp", "ईऌओओआऊउउईउ", "", "e", "onError", "app_cyBgsp_sp02Release"}, mv = {1, 7, 1})
    public static final class C1847 implements SingleObserver<BaseInitResponse<VideoDetailBean>> {
        public C1847() {
        }

        public void onError(Throwable th) {
            ओऔईऔइएअओऐओ.ऌऔऌआउउऊआ(th, "e");
            ItemCacheingViewModel.this.m3053().set(Boolean.TRUE);
        }

        public void onSubscribe(Disposable disposable) {
            ओऔईऔइएअओऐओ.ऌऔऌआउउऊआ(disposable, "d");
        }

        public void onSuccess(BaseInitResponse<VideoDetailBean> baseInitResponse) {
            ओऔईऔइएअओऐओ.ऌऔऌआउउऊआ(baseInitResponse, "resp");
            if (!baseInitResponse.isOk() || baseInitResponse.getResult() == null) {
                ItemCacheingViewModel.this.m3053().set(Boolean.TRUE);
                return;
            }
            ItemCacheingViewModel.this.m3053().set(Boolean.TRUE);
            ItemCacheingViewModel itemCacheingViewModel = ItemCacheingViewModel.this;
            StringBuilder sb = new StringBuilder();
            sb.append("http://127.0.0.1:");
            sb.append(MyApplication.f3650);
            sb.append("/download_control?resource=");
            sb.append(ItemCacheingViewModel.this.getDownloadInfoEntry().getResource());
            sb.append("&type=3&ck=");
            Object result = baseInitResponse.getResult();
            ओऔईऔइएअओऐओ.औउऐऌ(result);
            sb.append(((VideoDetailBean) result).getCk());
            itemCacheingViewModel.m3067(sb.toString(), 2);
        }
    }

    @Metadata(d1 = {"\u0000\u0010\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\b\u0086\u0004\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0004\u0010\u0005J\b\u0010\u0003\u001a\u00020\u0002H\u0016¨\u0006\u0006"}, d2 = {"Lcom/aamon/symmetry/originui/zj/cache/caching/ItemCacheingViewModel$ईऌओओआऊउउईउ;", "Ljava/lang/Runnable;", "Lamc/cd/औउईऐऔएओओ/एऋऔऔइआ;", "run", "<init>", "(Lcom/aamon/symmetry/originui/zj/cache/caching/ItemCacheingViewModel;)V", "app_cyBgsp_sp02Release"}, mv = {1, 7, 1})
    public final class RunnableC1848 implements Runnable {

        @Metadata(d1 = {"\u0000\u0013\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000*\u0001\u0000\b\n\u0018\u00002\u0012\u0012\u000e\u0012\f\u0012\u0006\u0012\u0004\u0018\u00010\u0003\u0018\u00010\u00020\u0001¨\u0006\u0004"}, d2 = {"com/aamon/symmetry/originui/zj/cache/caching/ItemCacheingViewModel$ईऌओओआऊउउईउ$ईऌओओआऊउउईउ", "Lamc/cd/एओईआ/ईऌओओआऊउउईउ;", "", "Lcom/aamon/symmetry/origin/data/entry/cache/DownloadInfoEntry;", "app_cyBgsp_sp02Release"}, mv = {1, 7, 1})
        public static final class C1849 extends ईऌओओआऊउउईउ<List<? extends DownloadInfoEntry>> {
        }

        public RunnableC1848() {
        }

        @Override
        public void run() {
            if (C0893.m769(ItemCacheingViewModel.this.json, DownloadInfoEntry.class)) {
                ItemCacheingViewModel itemCacheingViewModel = ItemCacheingViewModel.this;
                Object m776 = C0893.m776(itemCacheingViewModel.json, new C1849().getType());
                ओऔईऔइएअओऐओ.ओइऌऊएएऐ(m776, "fromJson(\n              …{}.type\n                )");
                itemCacheingViewModel.downloadInfos = (List) m776;
                if (!(!ItemCacheingViewModel.this.downloadInfos.isEmpty())) {
                    C0900 rxTimer = ItemCacheingViewModel.this.getRxTimer();
                    if (rxTimer != null) {
                        rxTimer.m780();
                        return;
                    }
                    return;
                }
                int size = ItemCacheingViewModel.this.downloadInfos.size();
                for (int i = 0; i < size; i++) {
                    if (((DownloadInfoEntry) ItemCacheingViewModel.this.downloadInfos.get(i)).getDownload_status() == 2 && ((DownloadInfoEntry) ItemCacheingViewModel.this.downloadInfos.get(i)).getResource().equals(ItemCacheingViewModel.this.getStreamid())) {
                        ItemCacheingViewModel.this.m3052().set(C0921.m986(((DownloadInfoEntry) ItemCacheingViewModel.this.downloadInfos.get(i)).getDownload_size()));
                        ItemCacheingViewModel.this.m3056().set(Integer.valueOf(((DownloadInfoEntry) ItemCacheingViewModel.this.downloadInfos.get(i)).getDownload_percent()));
                        ItemCacheingViewModel.this.m3055().set(C0921.m986(((DownloadInfoEntry) ItemCacheingViewModel.this.downloadInfos.get(i)).getDownload_rate()) + "/s");
                    } else if (((DownloadInfoEntry) ItemCacheingViewModel.this.downloadInfos.get(i)).getDownload_status() == 5 && ((DownloadInfoEntry) ItemCacheingViewModel.this.downloadInfos.get(i)).getResource().equals(ItemCacheingViewModel.this.getStreamid())) {
                        ItemCacheingViewModel.this.m3068().set(5);
                        ItemCacheingViewModel.this.m3054().set("下载错误,点击重试");
                    }
                    if (((DownloadInfoEntry) ItemCacheingViewModel.this.downloadInfos.get(i)).getResource().equals(ItemCacheingViewModel.this.getStreamid()) && ((DownloadInfoEntry) ItemCacheingViewModel.this.downloadInfos.get(i)).getDownload_status() == 4) {
                        C0900 rxTimer2 = ItemCacheingViewModel.this.getRxTimer();
                        if (rxTimer2 != null) {
                            rxTimer2.m780();
                        }
                        amc.cd.अऋएईऋउएअ.ऐऊऐएओऔऔऋऐऐ.ईऌओओआऊउउईउ().ऐऊऐएओऔऔऋऐऐ(new C0641());
                    }
                }
            }
        }
    }

    @Metadata(d1 = {"\u0000\u001d\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J\u0010\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u0002H\u0016J\u0010\u0010\b\u001a\u00020\u00042\u0006\u0010\u0007\u001a\u00020\u0006H\u0016¨\u0006\t"}, d2 = {"com/aamon/symmetry/originui/zj/cache/caching/ItemCacheingViewModel$ऐऊऐएओऔऔऋऐऐ", "Lamc/cd/ऌऔआआऌ/ऐऊऐएओऔऔऋऐऐ$ऐऊऐएओऔऔऋऐऐ;", "Ljava/io/IOException;", "e", "Lamc/cd/औउईऐऔएओओ/एऋऔऔइआ;", "onFailure", "Lokhttp3/Response;", "response", "onSuccess", "app_cyBgsp_sp02Release"}, mv = {1, 7, 1})
    public static final class C1850 implements C0936.InterfaceC0938 {
        public C1850() {
        }

        @Override
        public void onFailure(IOException iOException) {
            ओऔईऔइएअओऐओ.ऌऔऌआउउऊआ(iOException, "e");
            औउऐऌ.इईऔओऋआऐइऐ("wangyi", "get失败:" + iOException);
        }

        @Override
        public void onSuccess(Response response) {
            ओऔईऔइएअओऐओ.ऌऔऌआउउऊआ(response, "response");
            try {
                ItemCacheingViewModel itemCacheingViewModel = ItemCacheingViewModel.this;
                ResponseBody body = response.body();
                ओऔईऔइएअओऐओ.औउऐऌ(body);
                itemCacheingViewModel.json = body.string();
                if (ItemCacheingViewModel.this.getMHandler() != null) {
                    Handler mHandler = ItemCacheingViewModel.this.getMHandler();
                    ओऔईऔइएअओऐओ.औउऐऌ(mHandler);
                    mHandler.removeCallbacks(ItemCacheingViewModel.this.getResultTask());
                    Handler mHandler2 = ItemCacheingViewModel.this.getMHandler();
                    ओऔईऔइएअओऐओ.औउऐऌ(mHandler2);
                    mHandler2.postDelayed(ItemCacheingViewModel.this.getResultTask(), 500L);
                }
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }

    @Metadata(d1 = {"\u0000\u001d\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J\u0010\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u0002H\u0016J\u0012\u0010\b\u001a\u00020\u00042\b\u0010\u0007\u001a\u0004\u0018\u00010\u0006H\u0016¨\u0006\t"}, d2 = {"com/aamon/symmetry/originui/zj/cache/caching/ItemCacheingViewModel$औउऐऌ", "Lamc/cd/ऌऔआआऌ/ऐऊऐएओऔऔऋऐऐ$ऐऊऐएओऔऔऋऐऐ;", "Ljava/io/IOException;", "e", "Lamc/cd/औउईऐऔएओओ/एऋऔऔइआ;", "onFailure", "Lokhttp3/Response;", "response", "onSuccess", "app_cyBgsp_sp02Release"}, mv = {1, 7, 1})
    public static final class C1851 implements C0936.InterfaceC0938 {
        public C1851() {
        }

        public static final void m3073(ItemCacheingViewModel itemCacheingViewModel) {
            ओऔईऔइएअओऐओ.ऌऔऌआउउऊआ(itemCacheingViewModel, "this$0");
            C0900 rxTimer = itemCacheingViewModel.getRxTimer();
            if (rxTimer != null) {
                rxTimer.m780();
            }
            Handler mHandler = itemCacheingViewModel.getMHandler();
            ओऔईऔइएअओऐओ.औउऐऌ(mHandler);
            mHandler.removeCallbacks(itemCacheingViewModel.getResultTask());
            amc.cd.अऋएईऋउएअ.ऐऊऐएओऔऔऋऐऐ.ईऌओओआऊउउईउ().ऐऊऐएओऔऔऋऐऐ(new C0641());
        }

        @Override
        public void onFailure(IOException iOException) {
            ओऔईऔइएअओऐओ.ऌऔऌआउउऊआ(iOException, "e");
            औउऐऌ.इईऔओऋआऐइऐ("wangyi", "get失败:" + iOException);
        }

        @Override
        public void onSuccess(Response response) {
            औउऐऌ.इईऔओऋआऐइऐ("wangyi", "成功");
            Handler mHandler = ItemCacheingViewModel.this.getMHandler();
            ओऔईऔइएअओऐओ.औउऐऌ(mHandler);
            final ItemCacheingViewModel itemCacheingViewModel = ItemCacheingViewModel.this;
            mHandler.postDelayed(new Runnable() {
                @Override
                public final void run() {
                    ItemCacheingViewModel.C1851.m3073(ItemCacheingViewModel.this);
                }
            }, 500L);
        }
    }

    public ItemCacheingViewModel(final CacheingViewModel cacheingViewModel, final DownloadInfoEntry downloadInfoEntry, List<? extends VideoDownloadEntity> list, boolean z) {
        super(cacheingViewModel);
        ओऔईऔइएअओऐओ.ऌऔऌआउउऊआ(cacheingViewModel, "viewModel");
        ओऔईऔइएअओऐओ.ऌऔऌआउउऊआ(downloadInfoEntry, "downloadInfoEntry");
        ओऔईऔइएअओऐओ.ऌऔऌआउउऊआ(list, "downloadEntityList");
        this.isChecked = new ObservableField<>(Boolean.FALSE);
        this.rxTimer = new C0900();
        this.mHandler = new Handler();
        this.downloadInfos = new ArrayList();
        this.resultTask = new RunnableC1848();
        this.coverUrl = new ObservableField<>("");
        this.name = new ObservableField<>("");
        this.downloadStatus = new ObservableField<>("");
        this.percent = new ObservableField<>();
        this.rate = new ObservableField<>("");
        this.size = new ObservableField<>("");
        this.showStatus = new ObservableField<>(0);
        this.icEnableClick = new ObservableField<>(Boolean.TRUE);
        this.streamid = "";
        this.itemClick = new ऐऊऐएओऔऔऋऐऐ<>(new amc.cd.ऌऊउऋऐअ.ईऌओओआऊउउईउ() {
            public final void call() {
                ItemCacheingViewModel.m3043(CacheingViewModel.this, this);
            }
        });
        this.pauseClick = new ऐऊऐएओऔऔऋऐऐ<>(new amc.cd.ऌऊउऋऐअ.ईऌओओआऊउउईउ() {
            public final void call() {
                ItemCacheingViewModel.m3038(CacheingViewModel.this, this, downloadInfoEntry);
            }
        });
        this.viewModel1 = cacheingViewModel;
        this.downloadInfoEntry = downloadInfoEntry;
        this.downloadEntityList = list;
        if (downloadInfoEntry.getDownload_status() == 2) {
            this.showStatus.set(2);
            this.downloadStatus.set("下载中");
        } else if (downloadInfoEntry.getDownload_status() == 3) {
            this.showStatus.set(3);
            this.downloadStatus.set("暂停中");
        } else if (downloadInfoEntry.getDownload_status() == 1) {
            this.showStatus.set(1);
            this.downloadStatus.set("等待中...");
        } else if (downloadInfoEntry.getDownload_status() == 5) {
            this.showStatus.set(5);
            this.downloadStatus.set("下载错误,点击重试");
        }
        this.percent.set(Integer.valueOf(downloadInfoEntry.getDownload_percent()));
        this.rate.set(C0921.m986(downloadInfoEntry.getDownload_rate()) + "/s");
        this.size.set(C0921.m986(downloadInfoEntry.getDownload_size()));
        int size = list.size();
        for (int i = 0; i < size; i++) {
            if (downloadInfoEntry.getResource().equals(list.get(i).getStreamid())) {
                this.videoDownloadEntity = list.get(i);
                this.coverUrl.set(list.get(i).getCoverUrl());
                this.name.set(list.get(i).getComplete_name());
            }
        }
        if (downloadInfoEntry.getDownload_status() == 2) {
            String resource = downloadInfoEntry.getResource();
            ओऔईऔइएअओऐओ.ओइऌऊएएऐ(resource, "downloadInfoEntry.resource");
            this.streamid = resource;
            C0900 c0900 = this.rxTimer;
            if (c0900 != null) {
                c0900.m781(2000L, new C0900.InterfaceC0903() {
                    @Override
                    public final void mo204(long j) {
                        ItemCacheingViewModel.m3045(ItemCacheingViewModel.this, j);
                    }
                });
            }
        }
    }

    public static final void m3038(CacheingViewModel cacheingViewModel, ItemCacheingViewModel itemCacheingViewModel, DownloadInfoEntry downloadInfoEntry) {
        Integer num;
        ओऔईऔइएअओऐओ.ऌऔऌआउउऊआ(cacheingViewModel, "$viewModel");
        ओऔईऔइएअओऐओ.ऌऔऌआउउऊआ(itemCacheingViewModel, "this$0");
        ओऔईऔइएअओऐओ.ऌऔऌआउउऊआ(downloadInfoEntry, "$downloadInfoEntry");
        if (MyApplication.f3650 <= 0 || cacheingViewModel.getIsSelectMode().get()) {
            return;
        }
        Integer num2 = itemCacheingViewModel.showStatus.get();
        if ((num2 == null || num2.intValue() != 2) && ((num = itemCacheingViewModel.showStatus.get()) == null || num.intValue() != 1)) {
            itemCacheingViewModel.downloadStatus.set("下载中");
            itemCacheingViewModel.showStatus.set(2);
            downloadInfoEntry.setDownload_status(2);
            itemCacheingViewModel.icEnableClick.set(Boolean.FALSE);
            VideoDownloadEntity videoDownloadEntity = itemCacheingViewModel.videoDownloadEntity;
            if (videoDownloadEntity != null) {
                itemCacheingViewModel.m3066(videoDownloadEntity.getVod_token(), videoDownloadEntity.getCur_time(), videoDownloadEntity.getId(), videoDownloadEntity.getCollection_id());
                return;
            }
            return;
        }
        itemCacheingViewModel.downloadStatus.set("暂停中");
        itemCacheingViewModel.showStatus.set(3);
        downloadInfoEntry.setDownload_status(3);
        ObservableField<Integer> observableField = itemCacheingViewModel.percent;
        observableField.set(observableField.get());
        itemCacheingViewModel.m3067("http://127.0.0.1:" + MyApplication.f3650 + "/download_control?resource=" + downloadInfoEntry.getResource() + "&type=4", 4);
    }

    public static final SingleSource m3042(ऊओइओआएआआए r1, Single single) {
        ओऔईऔइएअओऐओ.ऌऔऌआउउऊआ(r1, "$tmp0");
        ओऔईऔइएअओऐओ.ऌऔऌआउउऊआ(single, "p0");
        return (SingleSource) r1.invoke(single);
    }

    public static final void m3043(CacheingViewModel cacheingViewModel, ItemCacheingViewModel itemCacheingViewModel) {
        ओऔईऔइएअओऐओ.ऌऔऌआउउऊआ(cacheingViewModel, "$viewModel");
        ओऔईऔइएअओऐओ.ऌऔऌआउउऊआ(itemCacheingViewModel, "this$0");
        if (cacheingViewModel.getIsSelectMode().get()) {
            ObservableField<Boolean> observableField = itemCacheingViewModel.isChecked;
            ओऔईऔइएअओऐओ.औउऐऌ(observableField.get());
            observableField.set(Boolean.valueOf(!r1.booleanValue()));
            Boolean bool = itemCacheingViewModel.isChecked.get();
            ओऔईऔइएअओऐओ.औउऐऌ(bool);
            if (!bool.booleanValue()) {
                cacheingViewModel.getSelectList().remove(itemCacheingViewModel);
                cacheingViewModel.getButtonSelect().set("全选");
            } else {
                cacheingViewModel.getSelectList().add(itemCacheingViewModel);
                if (cacheingViewModel.getObservableList().size() == cacheingViewModel.getSelectList().size()) {
                    cacheingViewModel.getButtonSelect().set("取消全选");
                }
            }
        }
    }

    public static final void m3045(ItemCacheingViewModel itemCacheingViewModel, long j) {
        ओऔईऔइएअओऐओ.ऌऔऌआउउऊआ(itemCacheingViewModel, "this$0");
        itemCacheingViewModel.m3062("http://127.0.0.1:" + MyApplication.f3650 + "/control?msg=download_info");
    }

    public static final SingleSource m3048(ऊओइओआएआआए r1, Single single) {
        ओऔईऔइएअओऐओ.ऌऔऌआउउऊआ(r1, "$tmp0");
        ओऔईऔइएअओऐओ.ऌऔऌआउउऊआ(single, "p0");
        return (SingleSource) r1.invoke(single);
    }

    public final ऐऊऐएओऔऔऋऐऐ<?> getItemClick() {
        return this.itemClick;
    }

    public final ObservableField<String> getName() {
        return this.name;
    }

    public final ObservableField<Boolean> isChecked() {
        return this.isChecked;
    }

    public final ObservableField<String> m3052() {
        return this.size;
    }

    public final ObservableField<Boolean> m3053() {
        return this.icEnableClick;
    }

    public final ObservableField<String> m3054() {
        return this.downloadStatus;
    }

    public final ObservableField<String> m3055() {
        return this.rate;
    }

    public final ObservableField<Integer> m3056() {
        return this.percent;
    }

    public final String getStreamid() {
        return this.streamid;
    }

    public final ObservableField<String> m3058() {
        return this.coverUrl;
    }

    public final void m3059(C0900 c0900) {
        this.rxTimer = c0900;
    }

    public final RunnableC1848 getResultTask() {
        return this.resultTask;
    }

    public final CacheingViewModel getViewModel1() {
        return this.viewModel1;
    }

    public final void m3062(String str) {
        C0936.m989(str, new C1850());
    }

    public final C0900 getRxTimer() {
        return this.rxTimer;
    }

    public final ऐऊऐएओऔऔऋऐऐ<?> m3064() {
        return this.pauseClick;
    }

    public final DownloadInfoEntry getDownloadInfoEntry() {
        return this.downloadInfoEntry;
    }

    public final void m3066(String str, String str2, int i, int i2) {
        m3069(str, str2, i, i2);
    }

    public final void m3067(String str, int i) {
        औउऐऌ.इईऔओऋआऐइऐ("wangyi", "下载url:" + str);
        C0936.m989(str, new C1851());
    }

    public final ObservableField<Integer> m3068() {
        return this.showStatus;
    }

    public final void m3069(String str, String str2, int i, int i2) {
        HashMap hashMap = new HashMap();
        hashMap.put(VideoDownloadEntity.VOD_TOKEN, str);
        hashMap.put(VideoDownloadEntity.CUR_TIME, str2);
        hashMap.put("vod_id", Integer.valueOf(i));
        hashMap.put(VideoDownloadEntity.COLLECTION_ID, Integer.valueOf(i2));
        hashMap.put(ExposeManager.UtArgsNames.sessionId, "");
        hashMap.put("sig", "");
        hashMap.put("nc_token", "");
        hashMap.put("phone", "");
        hashMap.put("code", "");
        Single<BaseInitResponse<VideoDetailBean>> m2889 = RetrofitUtil.INSTANCE.m2923().m2889(hashMap);
        C0345 c0345 = C0345.f575;
        final ItemCacheingViewModel$getMyDownloadVerifyInfo$1 itemCacheingViewModel$getMyDownloadVerifyInfo$1 = new ItemCacheingViewModel$getMyDownloadVerifyInfo$1(c0345);
        Single compose = m2889.compose(new SingleTransformer() {
            public final SingleSource apply(Single single) {
                SingleSource m3048;
                m3048 = ItemCacheingViewModel.m3048(itemCacheingViewModel$getMyDownloadVerifyInfo$1, single);
                return m3048;
            }
        });
        final ItemCacheingViewModel$getMyDownloadVerifyInfo$2 itemCacheingViewModel$getMyDownloadVerifyInfo$2 = new ItemCacheingViewModel$getMyDownloadVerifyInfo$2(c0345);
        compose.compose(new SingleTransformer() {
            public final SingleSource apply(Single single) {
                SingleSource m3042;
                m3042 = ItemCacheingViewModel.m3042(itemCacheingViewModel$getMyDownloadVerifyInfo$2, single);
                return m3042;
            }
        }).subscribe(new C1847());
    }

    public final Handler getMHandler() {
        return this.mHandler;
    }
}