整点视频 v3.3.0版本的 MD5 值为:cba0457dc37421eed445b30f92de25d3

以下内容为反编译后的 o00Ooo.java 源代码,内容仅作参考


package com.ys.resemble.widgets.dialog;

import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.graphics.Rect;
import android.os.Build;
import android.os.Handler;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.PopupWindow;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.bytedance.sdk.openadsdk.api.plugin.PluginConstants;
import com.moqi.sdk.manager.MQRewardProperty;
import com.moqi.sdk.manager.MQRewardVideoLoader;
import com.wholepoint.wpfilms.R;
import com.ys.resemble.app.AppApplication;
import com.ys.resemble.data.local.AdNumShowDao;
import com.ys.resemble.data.local.VideoDownloadDao;
import com.ys.resemble.entity.AdInfoDetailEntry;
import com.ys.resemble.entity.DownloadInfoEntry;
import com.ys.resemble.entity.RecommandVideosEntity;
import com.ys.resemble.entity.VideoBean;
import com.ys.resemble.entity.table.VideoDownloadEntity;
import com.ys.resemble.ui.homecontent.videodetail.VideoPlayDetailViewModel;
import com.ys.resemble.ui.mine.DownloadActivity;
import com.ys.resemble.util.FlyAnimUtil;
import com.ys.resemble.util.OkHttp3Util;
import com.ys.resemble.util.adset.ADSetRewardCacheVideoAd;
import com.ys.resemble.util.o0000;
import com.ys.resemble.util.o00000;
import com.ys.resemble.util.o0Oo0oo;
import com.ys.resemble.widgets.dialog.VarietyDownnloadAdapter;
import io.reactivex.SingleObserver;
import io.reactivex.disposables.Disposable;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import me.goldze.mvvmhabit.base.BaseApplication;
import me.goldze.mvvmhabit.http.BaseResponse;
import me.goldze.mvvmhabit.http.NetworkUtil;
import okhttp3.Response;
public class o00Ooo extends PopupWindow {
    private TextView OooO;
    private Context OooO00o;
    private VideoPlayDetailViewModel OooO0O0;
    private RecyclerView OooO0OO;
    private TextView OooO0Oo;
    private RelativeLayout OooO0o;
    public VarietyDownnloadAdapter OooO0o0;
    private RelativeLayout OooO0oO;
    private TextView OooO0oo;
    private TextView OooOO0;
    public List<VideoDownloadEntity> OooOO0O;
    private List<DownloadInfoEntry> OooOO0o;
    private Dialog OooOOO;
    private List<VideoBean> OooOOO0;
    private TextView OooOOOO;
    private TextView OooOOOo;
    public Handler OooOOo;
    private TextView OooOOo0;
    private String OooOOoo;
    private List<VideoBean> OooOo;
    private int OooOo0;
    private OooOo OooOo00;
    private String OooOo0O;
    private String OooOo0o;
    int OooOoO0;

    class OooO implements View.OnClickListener {
        final VideoPlayDetailViewModel OooO00o;

        OooO(VideoPlayDetailViewModel videoPlayDetailViewModel) {
            this.OooO00o = videoPlayDetailViewModel;
        }

        @Override
        public void onClick(View view) {
            o00Ooo.this.dismiss();
            this.OooO00o.startActivity(DownloadActivity.class);
        }
    }

    public class OooO00o implements SingleObserver<BaseResponse<VideoBean>> {
        final int OooO00o;
        final TextView OooO0O0;
        final RecommandVideosEntity OooO0OO;

        OooO00o(int i, TextView textView, RecommandVideosEntity recommandVideosEntity) {
            this.OooO00o = i;
            this.OooO0O0 = textView;
            this.OooO0OO = recommandVideosEntity;
        }

        @Override
        public void onSuccess(BaseResponse<VideoBean> baseResponse) {
            if (baseResponse.isOk() && baseResponse.getResult() != null) {
                o00Ooo.this.OooOOOo(this.OooO00o, this.OooO0O0, this.OooO0OO, baseResponse.getResult());
            } else {
                me.goldze.mvvmhabit.utils.o000oOoO.OooO0OO(baseResponse.getMessage());
            }
        }

        @Override
        public void onError(Throwable th) {
            me.goldze.mvvmhabit.utils.o000oOoO.OooO0OO("下载失败,请重新下载");
        }

        @Override
        public void onSubscribe(Disposable disposable) {
        }
    }

    public class OooO0O0 implements FlyAnimUtil.OnAfterAnimListener {
        final VideoBean OooO00o;
        final RecommandVideosEntity OooO0O0;

        OooO0O0(VideoBean videoBean, RecommandVideosEntity recommandVideosEntity) {
            this.OooO00o = videoBean;
            this.OooO0O0 = recommandVideosEntity;
        }

        @Override
        public void afterAnim() {
            o00Ooo.this.OooO0O0.OooOO0(com.ys.resemble.util.OooOOO0.Oooo0o(this.OooO00o.getVod_url()), this.OooO0O0, o00Ooo.this.OooOoO0, this.OooO00o);
        }
    }

    class OooO0OO implements View.OnClickListener {
        OooO0OO() {
        }

        @Override
        public void onClick(View view) {
            if (o00Ooo.this.OooO0Oo.isEnabled()) {
                o00Ooo.this.OooO0Oo.setEnabled(false);
                o00Ooo.this.OooO0Oo.setText("正序");
            } else {
                o00Ooo.this.OooO0Oo.setEnabled(true);
                o00Ooo.this.OooO0Oo.setText("倒序");
            }
            Collections.reverse(o00Ooo.this.OooOo);
            o00Ooo.this.OooO0o0.notifyDataSetChanged();
            o00Ooo.this.OooO0OO.scrollToPosition(0);
        }
    }

    class OooO0o implements VarietyDownnloadAdapter.onItemClickListener {
        final Context OooO00o;
        final Activity OooO0O0;
        final RecommandVideosEntity OooO0OO;

        OooO0o(Context context, Activity activity, RecommandVideosEntity recommandVideosEntity) {
            this.OooO00o = context;
            this.OooO0O0 = activity;
            this.OooO0OO = recommandVideosEntity;
        }

        @Override
        public void itemClick(int i, TextView textView) {
            if (com.ys.resemble.util.OooOOO0.OooOo0()) {
                return;
            }
            if (NetworkUtil.isNetworkAvailable(this.OooO00o)) {
                o00Ooo.this.OooOo0 = i;
                if (((VideoBean) o00Ooo.this.OooOo.get(i)).isDownload()) {
                    if (((VideoBean) o00Ooo.this.OooOo.get(i)).isCompleteDownload()) {
                        me.goldze.mvvmhabit.utils.o000oOoO.OooO0OO("你已经下载完该视频");
                        return;
                    }
                    for (int i2 = 0; i2 < o00Ooo.this.OooOO0O.size(); i2++) {
                        if (((VideoBean) o00Ooo.this.OooOo.get(i)).getId() == o00Ooo.this.OooOO0O.get(i2).getCollection_id()) {
                            o00Ooo o00ooo = o00Ooo.this;
                            o00ooo.OooOo0O = o00ooo.OooOO0O.get(i2).getStreamid();
                        }
                    }
                    o00Ooo o00ooo2 = o00Ooo.this;
                    o00ooo2.OooOOo0("http://127.0.0.1:" + AppApplication.OooO0OO + "/control?msg=download_info", this.OooO00o, i);
                    return;
                } else if (o0000.OooOo0o() || AppApplication.OooO0Oo.getAd_position_5() == null || AppApplication.OooO0Oo.getAd_position_5().size() <= 0) {
                    o00Ooo.this.OooOOo(this.OooO0OO.getId(), ((VideoBean) o00Ooo.this.OooOo.get(i)).getCollection(), ((VideoBean) o00Ooo.this.OooOo.get(i)).getId(), i, textView, this.OooO0OO);
                    return;
                } else if (o0000.OooOooo() > 0) {
                    o00Ooo.this.OooOOo(this.OooO0OO.getId(), ((VideoBean) o00Ooo.this.OooOo.get(i)).getCollection(), ((VideoBean) o00Ooo.this.OooOo.get(i)).getId(), i, textView, this.OooO0OO);
                    return;
                } else {
                    List<AdInfoDetailEntry> ad_position_5 = AppApplication.OooO0Oo.getAd_position_5();
                    int num = AdNumShowDao.getInstance().getNum(24);
                    int i3 = num >= ad_position_5.size() - 1 ? 0 : num + 1;
                    if (o0000.OooO0oO() == 1) {
                        o00Ooo.this.OooOoO(ad_position_5, this.OooO00o, this.OooO0O0, this.OooO0OO, i, textView, i3, false);
                        return;
                    } else {
                        o00Ooo.this.OooOoO(ad_position_5, this.OooO00o, this.OooO0O0, this.OooO0OO, i, textView, i3, true);
                        return;
                    }
                }
            }
            me.goldze.mvvmhabit.utils.o000oOoO.OooO0OO("网络不可用,请检查网络");
        }
    }

    class OooOO0 implements View.OnClickListener {
        OooOO0() {
        }

        @Override
        public void onClick(View view) {
            o00Ooo.this.dismiss();
        }
    }

    public class OooOO0O implements OkHttp3Util.OkHttpCallBack {
        OooOO0O() {
        }

        @Override
        public void onFailure(IOException iOException) {
            Log.i("wangyi", "get失败:" + iOException.toString());
        }

        @Override
        public void onSuccess(Response response) {
            try {
                o00Ooo.this.OooOOoo = response.body().string();
                o00Ooo o00ooo = o00Ooo.this;
                Handler handler = o00ooo.OooOOo;
                if (handler != null) {
                    handler.removeCallbacks(o00ooo.OooOo00);
                    o00Ooo o00ooo2 = o00Ooo.this;
                    o00ooo2.OooOOo.postDelayed(o00ooo2.OooOo00, 500L);
                }
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }

    public class OooOOO implements View.OnClickListener {
        OooOOO() {
        }

        @Override
        public void onClick(View view) {
            o00Ooo o00ooo = o00Ooo.this;
            o00ooo.OooO0o0.OooO0o0(o00ooo.OooOo, o00Ooo.this.OooOo0);
            o00Ooo.this.OooOOO.dismiss();
            if (me.goldze.mvvmhabit.utils.Oooo000.OooO00o(o00Ooo.this.OooOo0O)) {
                return;
            }
            o00Ooo o00ooo2 = o00Ooo.this;
            o00ooo2.OooOOoo(o00ooo2.OooOo0O);
        }
    }

    public class OooOOO0 implements View.OnClickListener {
        OooOOO0() {
        }

        @Override
        public void onClick(View view) {
            o00Ooo.this.OooOOO.dismiss();
        }
    }

    public class OooOOOO implements OkHttp3Util.OkHttpCallBack {
        final String OooO00o;

        OooOOOO(o00Ooo o00ooo, String str) {
            this.OooO00o = str;
        }

        @Override
        public void onFailure(IOException iOException) {
            Log.i("wangyi", "get失败:" + iOException.toString());
        }

        @Override
        public void onSuccess(Response response) {
            Log.i("wangyi", "成功");
            VideoDownloadDao.getInstance().deleteHistory(this.OooO00o);
        }
    }

    class OooOo implements Runnable {

        class OooO00o extends com.od.OooOOOO.OooO00o<List<DownloadInfoEntry>> {
            OooO00o(OooOo oooOo) {
            }
        }

        OooOo() {
        }

        @Override
        public void run() {
            if (com.ys.resemble.util.Oooo0.OooO0Oo(o00Ooo.this.OooOOoo, DownloadInfoEntry.class)) {
                o00Ooo o00ooo = o00Ooo.this;
                o00ooo.OooOO0o = (List) com.ys.resemble.util.Oooo0.OooO0OO(o00ooo.OooOOoo, new OooO00o(this).getType());
                if (o00Ooo.this.OooOO0o.size() > 0) {
                    o00Ooo o00ooo2 = o00Ooo.this;
                    o00ooo2.OooOo0O(o00ooo2.OooO00o, o00Ooo.this.OooOO0o);
                }
            }
        }
    }

    public class OooOo00 implements SingleObserver<BaseResponse<String>> {
        final int OooO00o;
        final int OooO0O0;
        final int OooO0OO;
        final TextView OooO0Oo;
        final RecommandVideosEntity OooO0o0;

        OooOo00(int i, int i2, int i3, TextView textView, RecommandVideosEntity recommandVideosEntity) {
            this.OooO00o = i;
            this.OooO0O0 = i2;
            this.OooO0OO = i3;
            this.OooO0Oo = textView;
            this.OooO0o0 = recommandVideosEntity;
        }

        @Override
        public void onSuccess(BaseResponse<String> baseResponse) {
            if (baseResponse.isOk()) {
                o00Ooo.this.OooOo0(this.OooO00o, this.OooO0O0, this.OooO0OO, this.OooO0Oo, this.OooO0o0);
            } else {
                me.goldze.mvvmhabit.utils.o000oOoO.OooO0OO(baseResponse.getMessage());
            }
        }

        @Override
        public void onError(Throwable th) {
            me.goldze.mvvmhabit.utils.o000oOoO.OooO0OO("下载失败,请重新下载");
        }

        @Override
        public void onSubscribe(Disposable disposable) {
        }
    }

    public o00Ooo(Activity activity, Context context, List<VideoBean> list, String str, int i, RecommandVideosEntity recommandVideosEntity, VideoPlayDetailViewModel videoPlayDetailViewModel) {
        super(context);
        this.OooOO0O = new ArrayList();
        this.OooOO0o = new ArrayList();
        this.OooOOo = new Handler();
        this.OooOo0O = "";
        this.OooOo0o = "";
        this.OooOo = new ArrayList();
        this.OooOoO0 = 0;
        this.OooO00o = context;
        this.OooO0O0 = videoPlayDetailViewModel;
        recommandVideosEntity.getId();
        this.OooOo00 = new OooOo();
        this.OooOOO0 = list;
        ArrayList<VideoDownloadEntity> queryHistory = VideoDownloadDao.getInstance().queryHistory();
        this.OooOO0O = queryHistory;
        if (queryHistory.size() > 0) {
            for (int i2 = 0; i2 < this.OooOO0O.size(); i2++) {
                if (this.OooOO0O.get(i2).getId() == recommandVideosEntity.getId()) {
                    for (int i3 = 0; i3 < list.size(); i3++) {
                        if (list.get(i3).getId() == this.OooOO0O.get(i2).getCollection_id()) {
                            list.get(i3).setDownload(true);
                            if (this.OooOO0O.get(i2).getComplete() == 1) {
                                list.get(i3).setCompleteDownload(true);
                            }
                        }
                    }
                }
            }
        } else {
            for (int i4 = 0; i4 < list.size(); i4++) {
                if (list.get(i4).isDownload()) {
                    list.get(i4).setDownload(false);
                }
            }
        }
        View inflate = LayoutInflater.from(context).inflate(R.layout.pop_layout_video_detail_variety_download, (ViewGroup) null);
        this.OooO0o = (RelativeLayout) inflate.findViewById(R.id.rl_view);
        this.OooO0OO = (RecyclerView) inflate.findViewById(R.id.rv_list);
        this.OooO0Oo = (TextView) inflate.findViewById(R.id.tv_sort);
        this.OooO0oo = (TextView) inflate.findViewById(R.id.tv_already_used);
        this.OooO = (TextView) inflate.findViewById(R.id.tv_available);
        this.OooOO0 = (TextView) inflate.findViewById(R.id.tv_open_download);
        this.OooO0oO = (RelativeLayout) inflate.findViewById(R.id.rl_open_cache);
        this.OooO0OO.setLayoutManager(new LinearLayoutManager(context));
        TextView textView = this.OooO0oo;
        textView.setText("已用" + o00000.OooO0O0(context) + ",");
        TextView textView2 = this.OooO;
        textView2.setText("可用" + o00000.OooO0OO(context));
        for (int i5 = 0; i5 < list.size(); i5++) {
            if (i == i5) {
                list.get(i5).setCheck(true);
            } else {
                list.get(i5).setCheck(false);
            }
        }
        this.OooOo.addAll(list);
        VarietyDownnloadAdapter varietyDownnloadAdapter = new VarietyDownnloadAdapter(context, this.OooOo, str);
        this.OooO0o0 = varietyDownnloadAdapter;
        this.OooO0OO.setAdapter(varietyDownnloadAdapter);
        this.OooO0OO.scrollToPosition(i);
        inflate.findViewById(R.id.ll_sort).setOnClickListener(new OooO0OO());
        this.OooO0o0.OooO0Oo(new OooO0o(context, activity, recommandVideosEntity));
        this.OooO0oO.setOnClickListener(new OooO(videoPlayDetailViewModel));
        inflate.findViewById(R.id.rl_top).setOnClickListener(new OooOO0());
        setContentView(inflate);
        setWidth(-1);
        setHeight(-1);
        setTouchable(true);
        setOutsideTouchable(true);
        setFocusable(true);
        setAnimationStyle(R.style.pop_shop_anim);
        setBackgroundDrawable(context.getResources().getDrawable(R.color.popupwindow_background));
    }

    public void OooOOOo(int i, TextView textView, RecommandVideosEntity recommandVideosEntity, VideoBean videoBean) {
        if (o0000.OooOooo() > 0) {
            o0000.oo0o0Oo(o0000.OooOooo() - 1);
        }
        this.OooO0o0.OooO0o(this.OooOo, i);
        for (int i2 = 0; i2 < this.OooOOO0.size(); i2++) {
            if (this.OooOo.get(i).getCollection() == this.OooOOO0.get(i2).getCollection()) {
                this.OooOoO0 = i2;
            }
        }
        FlyAnimUtil flyAnimUtil = new FlyAnimUtil(this.OooO00o, this.OooO0o);
        flyAnimUtil.OooO0o(textView);
        flyAnimUtil.OooO0oO(this.OooOO0);
        flyAnimUtil.OooO0o0(R.drawable.ic_video_download_icon);
        flyAnimUtil.OooO0Oo(new OooO0O0(videoBean, recommandVideosEntity));
    }

    public void OooOOo(int i, int i2, int i3, int i4, TextView textView, RecommandVideosEntity recommandVideosEntity) {
        HashMap hashMap = new HashMap();
        hashMap.put("vod_id", Integer.valueOf(i));
        hashMap.put(VideoDownloadEntity.COLLECTION_ID, Integer.valueOf(i2));
        com.ys.resemble.app.OooO0O0.OooO00o().getDownloadStatisInfo(hashMap).compose(com.ys.resemble.widgets.dialog.OooO0O0.OooO00o).compose(com.ys.resemble.widgets.dialog.OooO00o.OooO00o).subscribe(new OooOo00(i, i3, i4, textView, recommandVideosEntity));
    }

    public void OooOOo0(String str, Context context, int i) {
        Log.i("wangyi", "下载链接为:" + str);
        OkHttp3Util.OooO00o(str, new OooOO0O());
    }

    public void OooOOoo(String str) {
        String str2 = "http://127.0.0.1:" + AppApplication.OooO0OO + "/download_control?resource=" + str + "&type=5";
        Log.i("wangyi", "删除链接为:" + str2);
        OkHttp3Util.OooO00o(str2, new OooOOOO(this, str));
    }

    public void OooOo(Context context, Activity activity, AdInfoDetailEntry adInfoDetailEntry, int i, RecommandVideosEntity recommandVideosEntity, int i2, TextView textView, boolean z) {
        if (z && adInfoDetailEntry.getNew_user_has_ad() == 0) {
            OooOOo(recommandVideosEntity.getId(), this.OooOo.get(i2).getCollection(), this.OooOo.get(i2).getId(), i2, textView, recommandVideosEntity);
            return;
        }
        dismiss();
        AdNumShowDao.getInstance().updateDownloadIndex(i);
        com.ys.resemble.util.adgdt.OooO00o oooO00o = new com.ys.resemble.util.adgdt.OooO00o(context, adInfoDetailEntry.getSdk_ad_id());
        o0Oo0oo.OooO0OO(oooO00o, this.OooO0o, adInfoDetailEntry, new ShowAdDownloadPop(context, null, oooO00o, null, null), context, recommandVideosEntity.getId(), this.OooOo.get(i2).getCollection());
    }

    public void OooOo0(int i, int i2, int i3, TextView textView, RecommandVideosEntity recommandVideosEntity) {
        OooOo00(this.OooOo.get(i3).getVod_token(), this.OooOo.get(i3).getCur_time(), i, i2, i3, textView, recommandVideosEntity);
    }

    public void OooOo00(String str, String str2, int i, int i2, int i3, TextView textView, RecommandVideosEntity recommandVideosEntity) {
        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("session_id", "");
        hashMap.put("sig", "");
        hashMap.put("nc_token", "");
        hashMap.put("phone", "");
        hashMap.put(PluginConstants.KEY_ERROR_CODE, "");
        com.ys.resemble.app.OooO0O0.OooO00o().getHomeVideoCollection(hashMap).compose(com.ys.resemble.widgets.dialog.OooO0O0.OooO00o).compose(com.ys.resemble.widgets.dialog.OooO00o.OooO00o).subscribe(new OooO00o(i3, textView, recommandVideosEntity));
    }

    public void OooOo0O(Context context, List<DownloadInfoEntry> list) {
        for (int i = 0; i < list.size(); i++) {
            if (this.OooOo0O.equals(list.get(i).getResource())) {
                this.OooOo0o = list.get(i).getDownload_percent() + "";
            }
        }
        if (this.OooOOO == null) {
            View inflate = LayoutInflater.from(context).inflate(R.layout.pop_layout_download_info_movies, (ViewGroup) null);
            this.OooOOOO = (TextView) inflate.findViewById(R.id.tv_message);
            this.OooOOOo = (TextView) inflate.findViewById(R.id.tv_cancel);
            this.OooOOo0 = (TextView) inflate.findViewById(R.id.tv_sure);
            Dialog OooO00o2 = SimpleDialog.OooO00o(context, inflate, true);
            this.OooOOO = OooO00o2;
            OooO00o2.setCanceledOnTouchOutside(false);
        }
        if (me.goldze.mvvmhabit.utils.Oooo000.OooO00o(this.OooOo0o)) {
            this.OooOOOO.setText("该视频已下载0%,是否取消下载?");
        } else {
            TextView textView = this.OooOOOO;
            textView.setText("该视频已下载" + this.OooOo0o + "%,是否取消下载?");
        }
        this.OooOOOo.setOnClickListener(new OooOOO0());
        this.OooOOo0.setOnClickListener(new OooOOO());
        this.OooOOO.show();
    }

    public void OooOo0o(Context context, Activity activity, AdInfoDetailEntry adInfoDetailEntry, int i, RecommandVideosEntity recommandVideosEntity, int i2, TextView textView, boolean z) {
        if ((z && adInfoDetailEntry.getNew_user_has_ad() == 0) || o0000.OooOoo0() != 1) {
            OooOOo(recommandVideosEntity.getId(), this.OooOo.get(i2).getCollection(), this.OooOo.get(i2).getId(), i2, textView, recommandVideosEntity);
            return;
        }
        dismiss();
        AdNumShowDao.getInstance().updateDownloadIndex(i);
        ADSetRewardCacheVideoAd aDSetRewardCacheVideoAd = new ADSetRewardCacheVideoAd(activity, adInfoDetailEntry.getSdk_ad_id());
        o0Oo0oo.OooO0Oo(aDSetRewardCacheVideoAd, this.OooO0o, adInfoDetailEntry, new ShowAdDownloadPop(context, null, null, null, aDSetRewardCacheVideoAd), activity, recommandVideosEntity.getId(), this.OooOo.get(i2).getCollection());
    }

    public void OooOoO(List<AdInfoDetailEntry> list, Context context, Activity activity, RecommandVideosEntity recommandVideosEntity, int i, TextView textView, int i2, boolean z) {
        AdInfoDetailEntry adInfoDetailEntry = list.get(i2);
        if (adInfoDetailEntry.getAd_source_id() == 1) {
            if (adInfoDetailEntry.getNum() > 0) {
                if (adInfoDetailEntry.getNum() > AdNumShowDao.getInstance().getNum(9)) {
                    OooOoOO(context, activity, adInfoDetailEntry, i2, recommandVideosEntity, i, textView, z);
                    return;
                }
                int i3 = i2 + 1;
                OooOoO(list, context, activity, recommandVideosEntity, i, textView, i3 == list.size() ? 0 : i3, z);
                return;
            }
            OooOoOO(context, activity, adInfoDetailEntry, i2, recommandVideosEntity, i, textView, z);
        } else if (adInfoDetailEntry.getAd_source_id() == 2) {
            if (adInfoDetailEntry.getNum() > 0) {
                if (adInfoDetailEntry.getNum() > AdNumShowDao.getInstance().getNum(10)) {
                    OooOo(context, activity, adInfoDetailEntry, i2, recommandVideosEntity, i, textView, z);
                    return;
                }
                int i4 = i2 + 1;
                OooOoO(list, context, activity, recommandVideosEntity, i, textView, i4 == list.size() ? 0 : i4, z);
                return;
            }
            OooOo(context, activity, adInfoDetailEntry, i2, recommandVideosEntity, i, textView, z);
        } else if (adInfoDetailEntry.getAd_source_id() == 4) {
            if (adInfoDetailEntry.getNum() > 0) {
                if (adInfoDetailEntry.getNum() > AdNumShowDao.getInstance().getNum(30)) {
                    OooOoO0(context, activity, adInfoDetailEntry, i2, recommandVideosEntity, i, textView, z);
                    return;
                }
                int i5 = i2 + 1;
                OooOoO(list, context, activity, recommandVideosEntity, i, textView, i5 == list.size() ? 0 : i5, z);
                return;
            }
            OooOoO0(context, activity, adInfoDetailEntry, i2, recommandVideosEntity, i, textView, z);
        } else if (adInfoDetailEntry.getAd_source_id() == 5) {
            if (adInfoDetailEntry.getNum() > 0) {
                if (adInfoDetailEntry.getNum() > AdNumShowDao.getInstance().getNum(103)) {
                    OooOo0o(context, activity, adInfoDetailEntry, i2, recommandVideosEntity, i, textView, z);
                    return;
                }
                int i6 = i2 + 1;
                OooOoO(list, context, activity, recommandVideosEntity, i, textView, i6 == list.size() ? 0 : i6, z);
                return;
            }
            OooOo0o(context, activity, adInfoDetailEntry, i2, recommandVideosEntity, i, textView, z);
        }
    }

    public void OooOoO0(Context context, Activity activity, AdInfoDetailEntry adInfoDetailEntry, int i, RecommandVideosEntity recommandVideosEntity, int i2, TextView textView, boolean z) {
        if (z && adInfoDetailEntry.getNew_user_has_ad() == 0) {
            OooOOo(recommandVideosEntity.getId(), this.OooOo.get(i2).getCollection(), this.OooOo.get(i2).getId(), i2, textView, recommandVideosEntity);
            return;
        }
        dismiss();
        AdNumShowDao.getInstance().updateDownloadIndex(i);
        MQRewardProperty mQRewardProperty = new MQRewardProperty();
        mQRewardProperty.setUserID(com.ys.resemble.util.OooOOO0.OooOO0o(BaseApplication.OooO00o()));
        MQRewardVideoLoader mQRewardVideoLoader = new MQRewardVideoLoader(activity, adInfoDetailEntry.getSdk_ad_id(), mQRewardProperty);
        o0Oo0oo.OooO0O0(activity, this.OooO0o, adInfoDetailEntry, new ShowAdDownloadPop(context, null, null, mQRewardVideoLoader, null), mQRewardVideoLoader, recommandVideosEntity.getId(), this.OooOo.get(i2).getCollection());
    }

    public void OooOoOO(Context context, Activity activity, AdInfoDetailEntry adInfoDetailEntry, int i, RecommandVideosEntity recommandVideosEntity, int i2, TextView textView, boolean z) {
        if (z && adInfoDetailEntry.getNew_user_has_ad() == 0) {
            OooOOo(recommandVideosEntity.getId(), this.OooOo.get(i2).getCollection(), this.OooOo.get(i2).getId(), i2, textView, recommandVideosEntity);
            return;
        }
        dismiss();
        AdNumShowDao.getInstance().updateDownloadIndex(i);
        com.ys.resemble.util.adcsj.OooO0O0 oooO0O0 = new com.ys.resemble.util.adcsj.OooO0O0(activity, adInfoDetailEntry.getSdk_ad_id());
        o0Oo0oo.OooO00o(oooO0O0, this.OooO0o, adInfoDetailEntry, new ShowAdDownloadPop(context, oooO0O0, null, null, null), activity, recommandVideosEntity.getId(), this.OooOo.get(i2).getCollection());
    }

    @Override
    public void showAsDropDown(View view) {
        if (Build.VERSION.SDK_INT >= 24) {
            Rect rect = new Rect();
            view.getGlobalVisibleRect(rect);
            setHeight((view.getResources().getDisplayMetrics().heightPixels - rect.bottom) + com.ys.resemble.util.OooOOO0.OooOOoo(this.OooO00o));
        }
        super.showAsDropDown(view);
    }
}