Play House Simulation v3.0版本的 MD5 值为:4dbd745af43e6bcde3a0dca90b9e5934

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


package com.adfly.sdk.rewardedvideo;

import OooO0OO.OooO00o.OooO00o.o000000;
import OooO0OO.OooO00o.OooO00o.o00000O0.OooOO0O;
import OooO0OO.OooO00o.OooO00o.o00000O0.o00O0O;
import OooO0OO.OooO00o.OooO00o.o00000O0.o0Oo0oo;
import OooO0OO.OooO00o.OooO00o.o0000O;
import OooO0OO.OooO00o.OooO00o.o0000O0;
import OooO0OO.OooO00o.OooO00o.o0000O0O;
import OooO0OO.OooO00o.OooO00o.o000O;
import OooO0OO.OooO00o.OooO00o.o000O00O;
import OooO0OO.OooO00o.OooO00o.o000O0O0;
import OooO0OO.OooO00o.OooO00o.o000OO00;
import OooO0OO.OooO00o.OooO00o.o000OO0O;
import OooO0OO.OooO00o.OooO00o.o00O0000;
import OooO0OO.OooO00o.OooO00o.o00OO00O;
import OooO0OO.OooO00o.OooO00o.o00OOO0;
import OooO0OO.OooO00o.OooO00o.o0O0O0o0;
import OooO0OO.OooO00o.OooO00o.o0OOO0o;
import OooO0OO.OooO00o.OooO00o.o0o0Oo.o0000Ooo;
import OooO0OO.OooO00o.OooO00o.o0o0Oo.o000oOoO;
import OooO0OO.OooO00o.OooO00o.o0o0Oo.o00Oo0;
import OooO0OO.OooO00o.OooO00o.o0o0Oo.o00Ooo;
import OooO0OO.OooO00o.OooO00o.o0o0Oo.o0O0O00;
import OooO0OO.OooO00o.OooO00o.o0o0Oo.o0OO00O;
import OooO0OO.OooO00o.OooO00o.o0o0Oo.o0OoOo0;
import OooO0OO.OooO00o.OooO00o.oo0o0O0;
import android.animation.ObjectAnimator;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Application;
import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.SurfaceTexture;
import android.graphics.drawable.ColorDrawable;
import android.media.MediaPlayer;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.text.TextUtils;
import android.util.Log;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.Surface;
import android.view.TextureView;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.view.Window;
import android.view.WindowManager;
import android.view.animation.LinearInterpolator;
import android.webkit.URLUtil;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.PopupWindow;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.adfly.sdk.R$id;
import com.adfly.sdk.R$layout;
import com.adfly.sdk.R$mipmap;
import com.adfly.sdk.R$string;
import com.adfly.sdk.R$style;
import com.adfly.sdk.a;
import com.adfly.sdk.core.videoad.l;
import com.adfly.sdk.core.widget.RoundImageView;
import com.adfly.sdk.f;
import com.adfly.sdk.g;
import com.adfly.sdk.h;
import com.adfly.sdk.n;
import com.adfly.sdk.o;
import com.adfly.sdk.p;
import com.adfly.sdk.q;
import com.adfly.sdk.r;
import com.adfly.sdk.rewardedvideo.SspRewardVideoShowActivity;
import com.google.gson.JsonElement;
import com.huawei.agconnect.apms.collect.model.EventType;
import com.huawei.agconnect.apms.instrument.AppInstrumentation;
import com.huawei.agconnect.apms.instrument.Instrumented;
import com.huawei.agconnect.apms.instrument.TraceManager;
import com.huawei.hms.support.feature.result.CommonConstant;
import java.io.IOException;
import java.lang.ref.WeakReference;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;

@Instrumented
public class SspRewardVideoShowActivity extends Activity implements TextureView.SurfaceTextureListener, MediaPlayer.OnPreparedListener, View.OnClickListener {
    public static final String OoooOoO = SspRewardVideoShowActivity.class.getSimpleName();

    public ImageView f2530OooO;

    public View f2531OooO00o;

    public VideoTextureView f2532OooO0O0;

    public SurfaceTexture f2533OooO0OO;

    public Surface f2534OooO0Oo;

    public View f2535OooO0o;

    public MediaPlayer f2536OooO0o0;

    public TextView f2537OooO0oO;

    public ImageView f2538OooO0oo;

    public ImageView f2539OooOO0;
    public ImageView OooOO0O;
    public ImageView OooOO0o;
    public ProgressBar OooOOO;
    public ProgressBar OooOOO0;
    public OooOOO OooOOOO;
    public o0O0O00 OooOOOo;
    public int OooOOo;
    public o0000Ooo OooOOo0;
    public boolean OooOo;
    public boolean OooOo0;
    public boolean OooOo00;
    public boolean OooOo0O;
    public boolean OooOo0o;
    public String OooOoO;
    public String OooOoOO;
    public String OooOoo;
    public String OooOoo0;
    public int OooOooO;
    public f OooOooo;
    public ObjectAnimator Oooo;
    public boolean Oooo0;
    public h Oooo000;
    public boolean Oooo00o;
    public String Oooo0O0;
    public long Oooo0OO;
    public boolean Oooo0o;
    public PopupWindow Oooo0o0;
    public boolean Oooo0oO;
    public ObjectAnimator Oooo0oo;
    public long OoooO00;
    public List<String> OoooO0O;
    public o0OO00O[] OoooOOO;
    public int OooOOoo = 0;
    public boolean OooOoO0 = false;
    public boolean Oooo00O = false;
    public boolean OoooO0 = false;
    public long OoooO = -1;
    public boolean OoooOO0 = true;
    public String o000oOoO = null;
    public final o0000O0O<Bitmap> OoooOOo = new OooO00o();
    public View.OnTouchListener OoooOo0 = new OooOOO0();

    public class OooO implements MediaPlayer.OnVideoSizeChangedListener {
        public OooO() {
        }

        @Override
        public void onVideoSizeChanged(MediaPlayer mediaPlayer, int i, int i2) {
            VideoTextureView videoTextureView = SspRewardVideoShowActivity.this.f2532OooO0O0;
            int videoWidth = mediaPlayer.getVideoWidth();
            int videoHeight = mediaPlayer.getVideoHeight();
            videoTextureView.f2550OooO00o = videoWidth;
            videoTextureView.f2551OooO0O0 = videoHeight;
            if (videoWidth == 0 || videoHeight == 0) {
                return;
            }
            videoTextureView.requestLayout();
        }
    }

    public class OooO00o implements o0000O0O<Bitmap> {
        public OooO00o() {
        }

        @Override
        public void OooO00o(Bitmap bitmap) {
            SspRewardVideoShowActivity sspRewardVideoShowActivity;
            f fVar;
            Bitmap bitmap2 = bitmap;
            if (bitmap2 == null || (fVar = (sspRewardVideoShowActivity = SspRewardVideoShowActivity.this).OooOooo) == null || sspRewardVideoShowActivity.OooOo) {
                return;
            }
            a.c[] cVarArr = fVar.OooOO0o;
            if (cVarArr != null) {
                for (a.c cVar : cVarArr) {
                    String[] OooO0OO2 = cVar.OooO0OO();
                    if (OooO0OO2 != null) {
                        o00O0O.OooO0o().OooO0Oo(OooO0OO2);
                    }
                }
            }
            VideoTextureView videoTextureView = SspRewardVideoShowActivity.this.f2532OooO0O0;
            if (videoTextureView != null) {
                videoTextureView.setVisibility(8);
            }
            if (SspRewardVideoShowActivity.this.OooOO0o == null || bitmap2.getWidth() <= 0 || bitmap2.getHeight() <= 0) {
                return;
            }
            FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) SspRewardVideoShowActivity.this.OooOO0o.getLayoutParams();
            int i = SspRewardVideoShowActivity.this.getResources().getDisplayMetrics().widthPixels;
            layoutParams.width = i;
            int height = (int) ((bitmap2.getHeight() / bitmap2.getWidth()) * i);
            if (height > SspRewardVideoShowActivity.this.getResources().getDisplayMetrics().heightPixels) {
                height = SspRewardVideoShowActivity.this.getResources().getDisplayMetrics().heightPixels;
            }
            layoutParams.height = height;
            SspRewardVideoShowActivity.this.OooOO0o.setImageBitmap(bitmap2);
        }

        @Override
        public void a() {
        }
    }

    public class OooO0O0 implements Runnable {
        public OooO0O0() {
        }

        @Override
        public void run() {
            SspRewardVideoShowActivity sspRewardVideoShowActivity = SspRewardVideoShowActivity.this;
            if (sspRewardVideoShowActivity.OooOo) {
                return;
            }
            MediaPlayer mediaPlayer = sspRewardVideoShowActivity.f2536OooO0o0;
            if (mediaPlayer == null || (mediaPlayer.getCurrentPosition() < 1 && !SspRewardVideoShowActivity.this.OooOo00)) {
                String str = SspRewardVideoShowActivity.OoooOoO;
                SspRewardVideoShowActivity.this.OooO0oo();
            }
        }
    }

    public class OooO0OO implements MediaPlayer.OnInfoListener {

        public class OooO00o implements o0000Ooo.OooO00o {
            public OooO00o() {
            }

            @Override
            public void OooO00o(int i) {
                TextView textView;
                String string;
                SspRewardVideoShowActivity sspRewardVideoShowActivity = SspRewardVideoShowActivity.this;
                MediaPlayer mediaPlayer = sspRewardVideoShowActivity.f2536OooO0o0;
                if (mediaPlayer == null) {
                    return;
                }
                if (sspRewardVideoShowActivity.OooOOoo == mediaPlayer.getCurrentPosition()) {
                    SspRewardVideoShowActivity.this.OooOOO.setVisibility(0);
                } else {
                    SspRewardVideoShowActivity.this.OooOOO.setVisibility(8);
                }
                SspRewardVideoShowActivity sspRewardVideoShowActivity2 = SspRewardVideoShowActivity.this;
                sspRewardVideoShowActivity2.OooOOoo = sspRewardVideoShowActivity2.f2536OooO0o0.getCurrentPosition();
                SspRewardVideoShowActivity.this.f2530OooO.setVisibility(8);
                SspRewardVideoShowActivity.this.f2539OooOO0.setVisibility(8);
                SspRewardVideoShowActivity.this.f2537OooO0oO.setVisibility(0);
                SspRewardVideoShowActivity sspRewardVideoShowActivity3 = SspRewardVideoShowActivity.this;
                if (sspRewardVideoShowActivity3.OooOoO0) {
                    textView = sspRewardVideoShowActivity3.f2537OooO0oO;
                    string = sspRewardVideoShowActivity3.getResources().getString(R$string.adfly_interstitial_time_tips, Integer.valueOf(SspRewardVideoShowActivity.this.OooOOo0.f739OooO0O0 - i));
                } else {
                    textView = sspRewardVideoShowActivity3.f2537OooO0oO;
                    string = sspRewardVideoShowActivity3.getResources().getString(R$string.adfly_rewardedvideo_time_tips, Integer.valueOf(SspRewardVideoShowActivity.this.OooOOo0.f739OooO0O0 - i));
                }
                textView.setText(string);
            }

            @Override
            public void a() {
                SspRewardVideoShowActivity sspRewardVideoShowActivity = SspRewardVideoShowActivity.this;
                sspRewardVideoShowActivity.OooOo0 = true;
                sspRewardVideoShowActivity.f2535OooO0o.setVisibility(8);
                SspRewardVideoShowActivity.this.f2537OooO0oO.setVisibility(8);
                SspRewardVideoShowActivity.this.f2538OooO0oo.setVisibility(8);
                SspRewardVideoShowActivity.this.f2539OooOO0.setVisibility(0);
                SspRewardVideoShowActivity sspRewardVideoShowActivity2 = SspRewardVideoShowActivity.this;
                sspRewardVideoShowActivity2.f2539OooOO0.setOnClickListener(sspRewardVideoShowActivity2);
            }
        }

        public OooO0OO() {
        }

        @Override
        public boolean onInfo(MediaPlayer mediaPlayer, int i, int i2) {
            String str = SspRewardVideoShowActivity.OoooOoO;
            if (i == 3) {
                SspRewardVideoShowActivity.this.OooOOO.setVisibility(8);
                SspRewardVideoShowActivity.this.OooOO0O.setVisibility(0);
                SspRewardVideoShowActivity.this.OooOO0o.setVisibility(8);
                SspRewardVideoShowActivity sspRewardVideoShowActivity = SspRewardVideoShowActivity.this;
                if (sspRewardVideoShowActivity.Oooo0OO < 1) {
                    sspRewardVideoShowActivity.Oooo0OO = System.currentTimeMillis();
                }
                SspRewardVideoShowActivity sspRewardVideoShowActivity2 = SspRewardVideoShowActivity.this;
                sspRewardVideoShowActivity2.OooOo0O = true;
                Context applicationContext = sspRewardVideoShowActivity2.getApplicationContext();
                SspRewardVideoShowActivity sspRewardVideoShowActivity3 = SspRewardVideoShowActivity.this;
                f fVar = sspRewardVideoShowActivity3.OooOooo;
                String str2 = sspRewardVideoShowActivity3.OooOoOO;
                boolean z = l.f2323OooO0o0;
                Intent intent = new Intent("com.adfly.sdk.core.action_videoad_showed");
                intent.putExtra("com.adfly.sdk.core.extra_sid", fVar.f2289OooO0o0);
                intent.putExtra("com.adfly.sdk.core.extra_url", str2);
                applicationContext.sendBroadcast(intent);
                SspRewardVideoShowActivity.this.OooO0Oo("video_play_begin");
                SspRewardVideoShowActivity sspRewardVideoShowActivity4 = SspRewardVideoShowActivity.this;
                if (sspRewardVideoShowActivity4.OooOOo0 == null) {
                    sspRewardVideoShowActivity4.OooOOo0 = new o0000Ooo(sspRewardVideoShowActivity4.OooOooO, new OooO00o());
                }
                if (sspRewardVideoShowActivity4.OooOo0o) {
                    sspRewardVideoShowActivity4.OooOOo = sspRewardVideoShowActivity4.f2536OooO0o0.getCurrentPosition();
                    SspRewardVideoShowActivity.this.f2536OooO0o0.pause();
                } else {
                    sspRewardVideoShowActivity4.OooOOo0.OooO0O0();
                }
                a.c[] cVarArr = SspRewardVideoShowActivity.this.OooOooo.OooOO0o;
                if (cVarArr != null) {
                    for (a.c cVar : cVarArr) {
                        String[] OooO0OO2 = cVar.OooO0OO();
                        if (OooO0OO2 != null) {
                            o00O0O.OooO0o().OooO0Oo(OooO0OO2);
                        }
                    }
                }
                SspRewardVideoShowActivity sspRewardVideoShowActivity5 = SspRewardVideoShowActivity.this;
                h hVar = sspRewardVideoShowActivity5.Oooo000;
                if ((hVar instanceof n) && !sspRewardVideoShowActivity5.Oooo0o) {
                    n nVar = (n) hVar;
                    PopupWindow popupWindow = sspRewardVideoShowActivity5.Oooo0o0;
                    if (popupWindow != null) {
                        popupWindow.dismiss();
                        sspRewardVideoShowActivity5.Oooo0o0 = null;
                    }
                    View inflate = LayoutInflater.from(sspRewardVideoShowActivity5).inflate(R$layout.adfly_rewardvideo_start_pop1, (ViewGroup) null);
                    inflate.setTag(o000O00O.OooO00o.BBANNER);
                    inflate.setOnClickListener(sspRewardVideoShowActivity5);
                    LinearLayout linearLayout = (LinearLayout) inflate.findViewById(R$id.down_btn_lin_start);
                    o000O00O.OooO00o oooO00o = o000O00O.OooO00o.BBANNERBUTTON;
                    linearLayout.setTag(oooO00o);
                    linearLayout.setOnClickListener(sspRewardVideoShowActivity5);
                    RoundImageView roundImageView = (RoundImageView) inflate.findViewById(R$id.app_icon);
                    TextView textView = (TextView) inflate.findViewById(R$id.title_tv);
                    TextView textView2 = (TextView) inflate.findViewById(R$id.desc_tv);
                    TextView textView3 = (TextView) inflate.findViewById(R$id.down_btn);
                    textView3.setTag(oooO00o);
                    textView3.setOnClickListener(sspRewardVideoShowActivity5);
                    roundImageView.setRadius((int) TypedValue.applyDimension(1, 8.0f, sspRewardVideoShowActivity5.getResources().getDisplayMetrics()));
                    if (nVar.OooO0o() != null) {
                        o0000O o0000o = new o0000O(sspRewardVideoShowActivity5.getApplicationContext(), nVar.OooO0o().OooO00o(), 0, 0, new o000OO00(null));
                        o0000o.f283OooO0o = new WeakReference<>(roundImageView);
                        o0000o.f285OooO0oO = new WeakReference<>(null);
                        o0000o.OooO00o();
                    }
                    if (nVar.OooOO0() != null) {
                        textView.setText(nVar.OooOO0().OooO00o());
                    } else {
                        textView.setVisibility(8);
                    }
                    if (nVar.OooO0oo() != null) {
                        textView2.setText(nVar.OooO0oo().OooO00o());
                    }
                    if (nVar.OooO0oO() != null) {
                        textView3.setText(nVar.OooO0oO().OooO00o());
                    }
                    sspRewardVideoShowActivity5.OooO00o(inflate, 32, -2);
                    sspRewardVideoShowActivity5.Oooo0o0.showAtLocation(sspRewardVideoShowActivity5.f2531OooO00o, 80, 0, 0);
                    sspRewardVideoShowActivity5.Oooo0o = true;
                }
                SspRewardVideoShowActivity sspRewardVideoShowActivity6 = SspRewardVideoShowActivity.this;
                h hVar2 = sspRewardVideoShowActivity6.Oooo000;
                if ((hVar2 instanceof p) && !sspRewardVideoShowActivity6.Oooo0o) {
                    p pVar = (p) hVar2;
                    PopupWindow popupWindow2 = sspRewardVideoShowActivity6.Oooo0o0;
                    if (popupWindow2 != null) {
                        popupWindow2.dismiss();
                        sspRewardVideoShowActivity6.Oooo0o0 = null;
                    }
                    View inflate2 = LayoutInflater.from(sspRewardVideoShowActivity6).inflate(R$layout.adfly_rewardvideo_start_pop2, (ViewGroup) null);
                    inflate2.setTag(o000O00O.OooO00o.FBBANNER);
                    inflate2.setOnClickListener(sspRewardVideoShowActivity6);
                    RoundImageView roundImageView2 = (RoundImageView) inflate2.findViewById(R$id.app_icon);
                    TextView textView4 = (TextView) inflate2.findViewById(R$id.title_tv);
                    TextView textView5 = (TextView) inflate2.findViewById(R$id.desc_tv);
                    TextView textView6 = (TextView) inflate2.findViewById(R$id.down_btn);
                    textView6.setTag(o000O00O.OooO00o.FBBANNERBUTTON);
                    textView6.setOnClickListener(sspRewardVideoShowActivity6);
                    roundImageView2.setRadius((int) TypedValue.applyDimension(1, 8.0f, sspRewardVideoShowActivity6.getResources().getDisplayMetrics()));
                    if (pVar.OooO0o() != null) {
                        o0000O o0000o2 = new o0000O(sspRewardVideoShowActivity6.getApplicationContext(), pVar.OooO0o().OooO00o(), 0, 0, new o000OO00(null));
                        o0000o2.f283OooO0o = new WeakReference<>(roundImageView2);
                        o0000o2.f285OooO0oO = new WeakReference<>(null);
                        o0000o2.OooO00o();
                    }
                    if (pVar.OooOO0() != null) {
                        textView4.setText(pVar.OooOO0().OooO00o());
                    } else {
                        textView4.setVisibility(8);
                    }
                    if (pVar.OooO0oo() != null) {
                        textView5.setText(pVar.OooO0oo().OooO00o());
                    }
                    if (pVar.OooO0oO() != null) {
                        textView6.setText(pVar.OooO0oO().OooO00o());
                    }
                    sspRewardVideoShowActivity6.OooO00o(inflate2, 32, -2);
                    sspRewardVideoShowActivity6.Oooo0o0.showAtLocation(sspRewardVideoShowActivity6.f2531OooO00o, 80, 0, 0);
                    sspRewardVideoShowActivity6.Oooo0o = true;
                }
                SspRewardVideoShowActivity sspRewardVideoShowActivity7 = SspRewardVideoShowActivity.this;
                h hVar3 = sspRewardVideoShowActivity7.Oooo000;
                if ((hVar3 instanceof q) && !sspRewardVideoShowActivity7.Oooo0o) {
                    q qVar = (q) hVar3;
                    SspRewardVideoShowActivity.OooO0OO(SspRewardVideoShowActivity.this, qVar.OooOO0() != null ? qVar.OooOO0().OooO00o() : "", qVar.OooO0oO() != null ? qVar.OooO0oO().OooO00o() : "");
                }
                SspRewardVideoShowActivity sspRewardVideoShowActivity8 = SspRewardVideoShowActivity.this;
                h hVar4 = sspRewardVideoShowActivity8.Oooo000;
                if ((hVar4 instanceof r) && !sspRewardVideoShowActivity8.Oooo0o) {
                    r rVar = (r) hVar4;
                    SspRewardVideoShowActivity.OooO0OO(SspRewardVideoShowActivity.this, rVar.OooOO0() != null ? rVar.OooOO0().OooO00o() : "", rVar.OooO0oO() != null ? rVar.OooO0oO().OooO00o() : "");
                }
                SspRewardVideoShowActivity sspRewardVideoShowActivity9 = SspRewardVideoShowActivity.this;
                h hVar5 = sspRewardVideoShowActivity9.Oooo000;
                if (hVar5 instanceof o) {
                    g.OooO0o OooO0o2 = ((o) hVar5).OooO0o();
                    FrameLayout frameLayout = (FrameLayout) sspRewardVideoShowActivity9.findViewById(R$id.webview_container);
                    frameLayout.setVisibility(0);
                    if (sspRewardVideoShowActivity9.OooOOOo == null) {
                        o0O0O00 o0o0o00 = new o0O0O00(sspRewardVideoShowActivity9);
                        sspRewardVideoShowActivity9.OooOOOo = o0o0o00;
                        frameLayout.addView(o0o0o00);
                        sspRewardVideoShowActivity9.OooOOOo.OooO0o(new OooO0OO.OooO00o.OooO00o.o0o0Oo.o00O0O(sspRewardVideoShowActivity9));
                        sspRewardVideoShowActivity9.OooOOOo.setVisibility(0);
                        o0O0O00 o0o0o002 = sspRewardVideoShowActivity9.OooOOOo;
                        o0o0o002.OooOOO = true;
                        o0o0o002.setBackgroundColor(0);
                        sspRewardVideoShowActivity9.OooOOOo.getSettings().setCacheMode(-1);
                        sspRewardVideoShowActivity9.OooOOOo.OooO0O0(sspRewardVideoShowActivity9, null, null);
                        sspRewardVideoShowActivity9.OooOOOo.OooO0OO(OooO0o2.OooO00o());
                    }
                }
                SspRewardVideoShowActivity sspRewardVideoShowActivity10 = SspRewardVideoShowActivity.this;
                if (!sspRewardVideoShowActivity10.Oooo00o) {
                    sspRewardVideoShowActivity10.Oooo00o = true;
                    if (!sspRewardVideoShowActivity10.OooOoO0) {
                        SspRewardVideoShowActivity sspRewardVideoShowActivity11 = SspRewardVideoShowActivity.this;
                        f fVar2 = sspRewardVideoShowActivity11.OooOooo;
                        o00OOO0.OooO0Oo(new o00OO00O[]{new oo0o0O0("ssp", fVar2.f2288OooO0o, sspRewardVideoShowActivity11.Oooo0O0, fVar2.f2289OooO0o0)});
                    }
                }
            } else if (i == 200) {
                SspRewardVideoShowActivity.this.OooOOO.setVisibility(8);
                SspRewardVideoShowActivity.this.OooO0oo();
            } else if (i == 701) {
                SspRewardVideoShowActivity.this.OooOOO.setVisibility(0);
            } else if (i == 702) {
                SspRewardVideoShowActivity.this.OooOO0o.setVisibility(8);
                SspRewardVideoShowActivity.this.OooOOO.setVisibility(8);
            }
            return true;
        }
    }

    public class OooO0o implements MediaPlayer.OnErrorListener {
        public OooO0o() {
        }

        @Override
        public boolean onError(MediaPlayer mediaPlayer, int i, int i2) {
            Log.e(SspRewardVideoShowActivity.OoooOoO, "onError what = " + i);
            OooOOO oooOOO = SspRewardVideoShowActivity.this.OooOOOO;
            if (oooOOO != null) {
                oooOOO.f2548OooO00o = null;
                oooOOO.OooO00o();
            }
            Context applicationContext = SspRewardVideoShowActivity.this.getApplicationContext();
            SspRewardVideoShowActivity sspRewardVideoShowActivity = SspRewardVideoShowActivity.this;
            l.OooO00o(applicationContext, sspRewardVideoShowActivity.OooOooo, sspRewardVideoShowActivity.OooOoOO, 5004, OooO0OO.OooO0O0.OooO00o.OooO00o.OooO00o.OooO0O0("show error: ", i));
            return false;
        }
    }

    public class OooOO0 implements MediaPlayer.OnSeekCompleteListener {
        public OooOO0() {
        }

        @Override
        public void onSeekComplete(MediaPlayer mediaPlayer) {
            String str = SspRewardVideoShowActivity.OoooOoO;
            SspRewardVideoShowActivity.this.f2536OooO0o0.start();
        }
    }

    public class OooOO0O implements MediaPlayer.OnCompletionListener {
        public OooOO0O() {
        }

        @Override
        public void onCompletion(MediaPlayer mediaPlayer) {
            String str = SspRewardVideoShowActivity.OoooOoO;
            SspRewardVideoShowActivity sspRewardVideoShowActivity = SspRewardVideoShowActivity.this;
            sspRewardVideoShowActivity.OooOo00 = true;
            o0000Ooo o0000ooo = sspRewardVideoShowActivity.OooOOo0;
            if (o0000ooo != null) {
                o0000ooo.OooO00o();
            }
            Context applicationContext = SspRewardVideoShowActivity.this.getApplicationContext();
            SspRewardVideoShowActivity sspRewardVideoShowActivity2 = SspRewardVideoShowActivity.this;
            f fVar = sspRewardVideoShowActivity2.OooOooo;
            String str2 = sspRewardVideoShowActivity2.OooOoOO;
            boolean z = l.f2323OooO0o0;
            Intent intent = new Intent("com.adfly.sdk.core.action_videoad_show_completed");
            intent.putExtra("com.adfly.sdk.core.extra_sid", fVar.f2289OooO0o0);
            intent.putExtra("com.adfly.sdk.core.extra_url", str2);
            applicationContext.sendBroadcast(intent);
            SspRewardVideoShowActivity.this.OooO0Oo("video_play_finish");
            SspRewardVideoShowActivity sspRewardVideoShowActivity3 = SspRewardVideoShowActivity.this;
            sspRewardVideoShowActivity3.OooOOo0 = null;
            sspRewardVideoShowActivity3.OooO0oo();
        }
    }

    public static class OooOOO {

        public OooO00o f2548OooO00o;

        public OooO0Oo.OooO00o.OooOoO.OooO0O0 f2549OooO0O0;

        public interface OooO00o {
        }

        public void OooO00o() {
            OooO0Oo.OooO00o.OooOoO.OooO0O0 oooO0O0 = this.f2549OooO0O0;
            if (oooO0O0 == null || oooO0O0.OooO0o0()) {
                return;
            }
            this.f2549OooO0O0.OooO0Oo();
            this.f2549OooO0O0 = null;
        }
    }

    public class OooOOO0 implements View.OnTouchListener {
        @Override
        public boolean onTouch(View view, MotionEvent motionEvent) {
            return motionEvent.getAction() == 4;
        }
    }

    public static void OooO0OO(SspRewardVideoShowActivity sspRewardVideoShowActivity, String str, String str2) {
        PopupWindow popupWindow = sspRewardVideoShowActivity.Oooo0o0;
        if (popupWindow != null) {
            popupWindow.dismiss();
            sspRewardVideoShowActivity.Oooo0o0 = null;
        }
        View inflate = LayoutInflater.from(sspRewardVideoShowActivity).inflate(R$layout.adfly_rewardvideo_start_pop3, (ViewGroup) null);
        inflate.setOnClickListener(sspRewardVideoShowActivity);
        TextView textView = (TextView) inflate.findViewById(R$id.title_tv);
        TextView textView2 = (TextView) inflate.findViewById(R$id.down_btn);
        textView2.setTag(o000O00O.OooO00o.FBBANNERBUTTON);
        textView2.setOnClickListener(sspRewardVideoShowActivity);
        if (!TextUtils.isEmpty(str)) {
            textView.setText(str);
        }
        if (!TextUtils.isEmpty(str2)) {
            textView2.setText(str2);
        }
        sspRewardVideoShowActivity.OooO00o(inflate, 0, -2);
        sspRewardVideoShowActivity.Oooo0o0.showAtLocation(sspRewardVideoShowActivity.f2531OooO00o, 80, 0, 0);
        sspRewardVideoShowActivity.Oooo0o = true;
    }

    public final void OooO() {
        f fVar = this.OooOooo;
        if (fVar != null) {
            this.OoooO0 = true;
            o0OOO0o.OooOOOO(this, fVar);
            String[] strArr = this.OooOooo.OooOOO0;
            if (strArr != null) {
                o00O0O.OooO0o().OooO0Oo(strArr);
            }
            Context applicationContext = getApplicationContext();
            f fVar2 = this.OooOooo;
            String str = this.OooOoOO;
            boolean z = l.f2323OooO0o0;
            Intent intent = new Intent("com.adfly.sdk.core.action_videoad_click");
            intent.putExtra("com.adfly.sdk.core.extra_sid", fVar2.f2289OooO0o0);
            intent.putExtra("com.adfly.sdk.core.extra_url", str);
            applicationContext.sendBroadcast(intent);
        }
    }

    public final void OooO00o(View view, int i, int i2) {
        int i3 = getResources().getDisplayMetrics().widthPixels;
        if (i > 0) {
            i3 = getResources().getDisplayMetrics().widthPixels - ((int) TypedValue.applyDimension(1, i, getResources().getDisplayMetrics()));
        }
        PopupWindow popupWindow = new PopupWindow(view, i3, i2);
        this.Oooo0o0 = popupWindow;
        popupWindow.setAnimationStyle(R$style.adfly_pop_form_bottom_animation);
        this.Oooo0o0.setBackgroundDrawable(new ColorDrawable());
        this.Oooo0o0.setTouchable(true);
        this.Oooo0o0.setOutsideTouchable(false);
        this.Oooo0o0.setFocusable(false);
        this.Oooo0o0.setTouchInterceptor(this.OoooOo0);
    }

    public final void OooO0O0(g.OooO0OO oooO0OO, g.OooOO0O oooOO0O, g.OooOO0O oooOO0O2, g.OooO0O0 oooO0O0, boolean z) {
        PopupWindow popupWindow = this.Oooo0o0;
        if (popupWindow != null) {
            popupWindow.dismiss();
            this.Oooo0o0 = null;
        }
        View inflate = LayoutInflater.from(this).inflate(R$layout.adfly_rewardvideo_end_pop, (ViewGroup) null);
        inflate.setTag(o000O00O.OooO00o.FINISHBANNER);
        inflate.setOnClickListener(this);
        LinearLayout linearLayout = (LinearLayout) inflate.findViewById(R$id.down_btn_lin_start);
        linearLayout.setTag(o000O00O.OooO00o.BBANNERBUTTON);
        linearLayout.setOnClickListener(this);
        RoundImageView roundImageView = (RoundImageView) inflate.findViewById(R$id.app_icon);
        TextView textView = (TextView) inflate.findViewById(R$id.title_tv);
        TextView textView2 = (TextView) inflate.findViewById(R$id.desc_tv);
        TextView textView3 = (TextView) inflate.findViewById(R$id.down_btn);
        textView3.setTag(o000O00O.OooO00o.FINISHBANNERBUTTON);
        textView3.setOnClickListener(this);
        roundImageView.setRadius((int) TypedValue.applyDimension(1, 8.0f, getResources().getDisplayMetrics()));
        if (oooO0OO != null) {
            Context applicationContext = getApplicationContext();
            String OooO00o2 = oooO0OO.OooO00o();
            o000OO0O o000oo0o = new o000OO0O(applicationContext, new o000OO00(null));
            o000oo0o.f406OooO0Oo = 0;
            o000oo0o.f408OooO0o0 = 0;
            o000oo0o.f405OooO0OO = OooO00o2;
            o000oo0o.OooO00o(roundImageView);
        }
        if (oooOO0O != null) {
            textView.setText(oooOO0O.OooO00o());
        } else {
            textView.setVisibility(8);
        }
        if (oooOO0O2 != null) {
            textView2.setText(oooOO0O2.OooO00o());
        }
        if (oooO0O0 != null) {
            textView3.setText(oooO0O0.OooO00o());
        }
        if (z) {
            textView3.setCompoundDrawablesWithIntrinsicBounds(R$mipmap.adfly_down_icon, 0, 0, 0);
        } else {
            textView3.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
        }
        this.Oooo0oo = ObjectAnimator.ofFloat(linearLayout, "scaleX", 1.0f, 0.7f, 1.0f);
        this.Oooo = ObjectAnimator.ofFloat(linearLayout, "scaleY", 1.0f, 0.7f, 1.0f);
        this.Oooo0oo.setInterpolator(new LinearInterpolator());
        this.Oooo0oo.setRepeatCount(-1);
        this.Oooo0oo.setDuration(1000L);
        this.Oooo.setRepeatCount(-1);
        this.Oooo.setDuration(1000L);
        this.Oooo.setInterpolator(new LinearInterpolator());
        this.Oooo0oo.start();
        this.Oooo.start();
        OooO00o(inflate, 32, -2);
        this.Oooo0o0.showAtLocation(this.f2531OooO00o, 80, 0, 0);
    }

    public final void OooO0Oo(String str) {
        o00O0O.OooO0o().OooO0Oo(new String[]{String.format("https://%s/advert/report?click_id=%s&event=%s", "apia.adfly.global", this.OooOooo.f2290OooO0oO, str)});
    }

    public final void OooO0o() {
        if (this.f2536OooO0o0 != null) {
            return;
        }
        MediaPlayer mediaPlayer = new MediaPlayer();
        this.f2536OooO0o0 = mediaPlayer;
        mediaPlayer.setOnPreparedListener(this);
        this.f2536OooO0o0.setOnInfoListener(new OooO0OO());
        this.f2536OooO0o0.setOnErrorListener(new OooO0o());
        this.f2536OooO0o0.setOnVideoSizeChangedListener(new OooO());
        this.f2536OooO0o0.setOnSeekCompleteListener(new OooOO0());
        this.f2536OooO0o0.setOnCompletionListener(new OooOO0O());
        try {
            if (this.f2534OooO0Oo == null) {
                this.f2534OooO0Oo = new Surface(this.f2533OooO0OO);
            }
            this.f2536OooO0o0.setSurface(this.f2534OooO0Oo);
            this.f2536OooO0o0.setAudioStreamType(3);
            this.f2536OooO0o0.setDataSource(this.OooOoo0);
            this.f2536OooO0o0.prepareAsync();
        } catch (IOException | IllegalStateException e) {
            OooOOO oooOOO = this.OooOOOO;
            if (oooOOO != null) {
                oooOOO.f2548OooO00o = null;
                oooOOO.OooO00o();
            }
            e.printStackTrace();
            OooO0oo();
        }
    }

    public final int OooO0o0() {
        return getSharedPreferences("com.adfly.sdk_preferences", 0).getInt("rewards_close_playing_count", 0);
    }

    public void OooO0oO() {
        MediaPlayer mediaPlayer = this.f2536OooO0o0;
        if (mediaPlayer != null) {
            try {
                mediaPlayer.stop();
                this.f2536OooO0o0.release();
                this.f2536OooO0o0 = null;
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        Surface surface = this.f2534OooO0Oo;
        if (surface != null) {
            surface.release();
            this.f2534OooO0Oo = null;
        }
        OooOOO oooOOO = this.OooOOOO;
        if (oooOOO != null) {
            oooOOO.OooO00o();
            this.OooOOOO = null;
        }
    }

    public final void OooO0oo() {
        g.OooO0OO OooO0o2;
        g.OooOO0O OooOO02;
        g.OooO0O0 OooO0oO2;
        g.OooOO0O oooOO0O;
        boolean z;
        SspRewardVideoShowActivity sspRewardVideoShowActivity;
        o000O00O.OooO00o oooO00o = o000O00O.OooO00o.FBBANNERBUTTON;
        OooO0oO();
        o0000Ooo o0000ooo = this.OooOOo0;
        if (o0000ooo != null) {
            o0000ooo.OooO00o();
        }
        this.OooOOo0 = null;
        this.f2530OooO.setVisibility(0);
        this.f2535OooO0o.setVisibility(8);
        this.f2537OooO0oO.setVisibility(8);
        this.f2538OooO0oo.setVisibility(8);
        this.f2539OooOO0.setVisibility(8);
        this.OooOO0O.setVisibility(8);
        this.f2530OooO.setOnClickListener(this);
        OooO0oO();
        this.OooOO0o.setVisibility(0);
        Context applicationContext = getApplicationContext();
        o000O o000o = new o000O(null);
        String str = this.OooOoo;
        o0000O0O<Bitmap> o0000o0o = this.OoooOOo;
        o0000O o0000o = new o0000O(applicationContext, str, 0, 0, o000o);
        o0000o.f285OooO0oO = new WeakReference<>(o0000o0o);
        o0000o.OooO00o();
        h hVar = this.Oooo000;
        if (hVar instanceof n) {
            n nVar = (n) hVar;
            OooO0o2 = nVar.OooO0o();
            g.OooOO0O OooOO03 = nVar.OooOO0();
            g.OooOO0O OooO0oo2 = nVar.OooO0oo();
            g.OooO0O0 OooO0oO3 = nVar.OooO0oO();
            sspRewardVideoShowActivity = this;
            oooOO0O = OooOO03;
            OooOO02 = OooO0oo2;
            OooO0oO2 = OooO0oO3;
            z = true;
        } else {
            if (!(hVar instanceof p)) {
                if (hVar instanceof q) {
                    q qVar = (q) hVar;
                    PopupWindow popupWindow = this.Oooo0o0;
                    if (popupWindow != null) {
                        popupWindow.dismiss();
                        this.Oooo0o0 = null;
                    }
                    this.f2530OooO.setVisibility(8);
                    View inflate = LayoutInflater.from(this).inflate(R$layout.adfly_rewardvideo_end_pop2, (ViewGroup) null);
                    int i = R$id.type11or12_pop_c;
                    View findViewById = inflate.findViewById(i);
                    inflate.findViewById(R$id.type11or12_pop_bg).setOnClickListener(this);
                    inflate.findViewById(i).setOnClickListener(this);
                    RoundImageView roundImageView = (RoundImageView) inflate.findViewById(R$id.app_icon);
                    TextView textView = (TextView) inflate.findViewById(R$id.title_tv);
                    TextView textView2 = (TextView) inflate.findViewById(R$id.desc_tv);
                    TextView textView3 = (TextView) inflate.findViewById(R$id.down_btn);
                    textView3.setTag(oooO00o);
                    textView3.setOnClickListener(this);
                    if ("bottom".equals(this.o000oOoO)) {
                        ((FrameLayout.LayoutParams) findViewById.getLayoutParams()).gravity = 81;
                        ((FrameLayout.LayoutParams) findViewById.getLayoutParams()).bottomMargin = (int) TypedValue.applyDimension(1, 32.0f, getResources().getDisplayMetrics());
                    }
                    inflate.findViewById(R$id.type12_mid_close_icon).setOnClickListener(new o000oOoO(this));
                    roundImageView.setRadius((int) TypedValue.applyDimension(1, 8.0f, getResources().getDisplayMetrics()));
                    if (qVar.OooO0o() != null) {
                        o0000O o0000o2 = new o0000O(getApplicationContext(), qVar.OooO0o().OooO00o(), 0, 0, new o000OO00(null));
                        o0000o2.f283OooO0o = new WeakReference<>(roundImageView);
                        o0000o2.f285OooO0oO = new WeakReference<>(null);
                        o0000o2.OooO00o();
                    }
                    if (qVar.OooOO0() != null) {
                        textView.setText(qVar.OooOO0().OooO00o());
                    } else {
                        textView.setVisibility(8);
                    }
                    if (qVar.OooO0oo() != null) {
                        textView2.setText(qVar.OooO0oo().OooO00o());
                    }
                    if (qVar.OooO0oO() != null) {
                        textView3.setText(qVar.OooO0oO().OooO00o());
                    }
                    this.Oooo0oo = ObjectAnimator.ofFloat(textView3, "scaleX", 1.0f, 0.7f, 1.0f);
                    this.Oooo = ObjectAnimator.ofFloat(textView3, "scaleY", 1.0f, 0.7f, 1.0f);
                    this.Oooo0oo.setInterpolator(new LinearInterpolator());
                    this.Oooo0oo.setRepeatCount(-1);
                    this.Oooo0oo.setDuration(1000L);
                    this.Oooo.setRepeatCount(-1);
                    this.Oooo.setDuration(1000L);
                    this.Oooo.setInterpolator(new LinearInterpolator());
                    this.Oooo0oo.start();
                    this.Oooo.start();
                    OooO00o(inflate, 0, -1);
                    this.Oooo0o0.showAtLocation(this.f2531OooO00o, 80, 0, 0);
                } else if (hVar instanceof r) {
                    r rVar = (r) hVar;
                    PopupWindow popupWindow2 = this.Oooo0o0;
                    if (popupWindow2 != null) {
                        popupWindow2.dismiss();
                        this.Oooo0o0 = null;
                    }
                    this.f2530OooO.setVisibility(8);
                    View inflate2 = LayoutInflater.from(this).inflate(R$layout.adfly_rewardvideo_end_pop3, (ViewGroup) null);
                    int i2 = R$id.type11or12_pop_c;
                    View findViewById2 = inflate2.findViewById(i2);
                    inflate2.findViewById(R$id.type11or12_pop_bg).setOnClickListener(this);
                    inflate2.findViewById(i2).setOnClickListener(this);
                    RoundImageView roundImageView2 = (RoundImageView) inflate2.findViewById(R$id.app_icon);
                    TextView textView4 = (TextView) inflate2.findViewById(R$id.title_tv);
                    TextView textView5 = (TextView) inflate2.findViewById(R$id.desc_tv);
                    TextView textView6 = (TextView) inflate2.findViewById(R$id.down_btn);
                    textView6.setTag(oooO00o);
                    textView6.setOnClickListener(this);
                    if ("bottom".equals(this.o000oOoO)) {
                        ((FrameLayout.LayoutParams) findViewById2.getLayoutParams()).gravity = 81;
                        ((FrameLayout.LayoutParams) findViewById2.getLayoutParams()).bottomMargin = (int) TypedValue.applyDimension(1, 32.0f, getResources().getDisplayMetrics());
                    }
                    inflate2.findViewById(R$id.type12_mid_close_icon).setOnClickListener(new o0OoOo0(this));
                    roundImageView2.setRadius((int) TypedValue.applyDimension(1, 8.0f, getResources().getDisplayMetrics()));
                    if (rVar.OooO0o() != null) {
                        o0000O o0000o3 = new o0000O(getApplicationContext(), rVar.OooO0o().OooO00o(), 0, 0, new o000OO00(null));
                        o0000o3.f283OooO0o = new WeakReference<>(roundImageView2);
                        o0000o3.f285OooO0oO = new WeakReference<>(null);
                        o0000o3.OooO00o();
                    }
                    if (rVar.OooOO0() != null) {
                        textView4.setText(rVar.OooOO0().OooO00o());
                    } else {
                        textView4.setVisibility(8);
                    }
                    if (rVar.OooO0oo() != null) {
                        textView5.setText(rVar.OooO0oo().OooO00o());
                    }
                    if (rVar.OooO0oO() != null) {
                        textView6.setText(rVar.OooO0oO().OooO00o());
                    }
                    this.Oooo0oo = ObjectAnimator.ofFloat(textView6, "scaleX", 1.0f, 0.7f, 1.0f);
                    this.Oooo = ObjectAnimator.ofFloat(textView6, "scaleY", 1.0f, 0.7f, 1.0f);
                    this.Oooo0oo.setInterpolator(new LinearInterpolator());
                    this.Oooo0oo.setRepeatCount(-1);
                    this.Oooo0oo.setDuration(1000L);
                    this.Oooo.setRepeatCount(-1);
                    this.Oooo.setDuration(1000L);
                    this.Oooo.setInterpolator(new LinearInterpolator());
                    this.Oooo0oo.start();
                    this.Oooo.start();
                    OooO00o(inflate2, 0, -1);
                    this.Oooo0o0.showAtLocation(this.f2531OooO00o, 17, 0, 0);
                }
                if (this.Oooo0) {
                    this.Oooo0 = true;
                    if (this.OooOoO0) {
                        return;
                    }
                    long currentTimeMillis = this.Oooo0OO > 0 ? (System.currentTimeMillis() - this.Oooo0OO) / 1000 : 0L;
                    f fVar = this.OooOooo;
                    o00OOO0.OooO0Oo(new o00OO00O[]{new o00O0000("ssp", fVar.f2288OooO0o, currentTimeMillis, this.Oooo0O0, fVar.f2289OooO0o0)});
                    return;
                }
                return;
            }
            p pVar = (p) hVar;
            OooO0o2 = pVar.OooO0o();
            OooOO02 = pVar.OooOO0();
            OooO0oO2 = pVar.OooO0oO();
            oooOO0O = null;
            z = false;
            sspRewardVideoShowActivity = this;
        }
        sspRewardVideoShowActivity.OooO0O0(OooO0o2, oooOO0O, OooOO02, OooO0oO2, z);
        if (this.Oooo0) {
        }
    }

    @Override
    public void finish() {
        String str;
        Intent intent = new Intent();
        intent.putExtra("extra.iscompleted", this.OooOo00);
        intent.putExtra("extra.isshow", this.OooOo0O);
        setResult(-1, intent);
        if (this.OooOooo != null) {
            l.OooO0O0(getApplicationContext(), this.OooOooo, this.OooOoOO);
        }
        if (!this.OooOo00) {
            long j = this.OoooO00;
            if (j >= 15000) {
                str = "video_play_15s";
            } else if (j >= 10000) {
                str = "video_play_10s";
            } else if (j >= 5000) {
                str = "video_play_5s";
            }
            OooO0Oo(str);
        }
        if (!this.OoooO0) {
            OooO0Oo("no_click_exit");
        }
        super.finish();
    }

    @Override
    public void onBackPressed() {
        if (this.OooOo00 || this.OooOo0) {
            finish();
        }
    }

    @Override
    public void onClick(View view) {
        long currentTimeMillis;
        o0OO00O[] o0oo00oArr;
        o000O0O0.OooO00o oooO00o = o000O0O0.OooO00o.EXPECTED;
        o000O0O0.OooO00o oooO00o2 = o000O0O0.OooO00o.NON_EXPECTED;
        int id = view.getId();
        if (id == R$id.close_icon) {
            finish();
            return;
        }
        if (id == R$id.cover_img) {
            OooO();
            h hVar = this.Oooo000;
            if (((hVar instanceof q) || (hVar instanceof r)) && !this.OooOoO0) {
                long currentTimeMillis2 = this.Oooo0OO > 0 ? (System.currentTimeMillis() - this.Oooo0OO) / 1000 : 0L;
                f fVar = this.OooOooo;
                o00OOO0.OooO0Oo(new o00OO00O[]{new o000O0O0(oooO00o2, "ssp", currentTimeMillis2, fVar.f2288OooO0o, fVar.f2289OooO0o0)});
                return;
            }
            return;
        }
        if (id == R$id.texture_view) {
            MediaPlayer mediaPlayer = this.f2536OooO0o0;
            if (mediaPlayer == null || mediaPlayer.getCurrentPosition() <= 1) {
                return;
            }
            List<String> list = this.OoooO0O;
            if (list == null || list.contains("v2_non_ad_area")) {
                OooO();
            }
            h hVar2 = this.Oooo000;
            if (((hVar2 instanceof q) || (hVar2 instanceof r)) && !this.OooOoO0) {
                long currentTimeMillis3 = this.Oooo0OO > 0 ? (System.currentTimeMillis() - this.Oooo0OO) / 1000 : 0L;
                f fVar2 = this.OooOooo;
                o00OOO0.OooO0Oo(new o00OO00O[]{new o000O0O0(oooO00o2, "ssp", currentTimeMillis3, fVar2.f2288OooO0o, fVar2.f2289OooO0o0)});
                return;
            }
            return;
        }
        if (id == R$id.jump_icon) {
            if (this.OooOo0) {
                OooO0oo();
                return;
            }
            return;
        }
        if (id == R$id.mute_icon) {
            if (this.Oooo00O) {
                MediaPlayer mediaPlayer2 = this.f2536OooO0o0;
                if (mediaPlayer2 != null) {
                    mediaPlayer2.setVolume(1.0f, 1.0f);
                }
                this.OooOO0O.setImageResource(R$mipmap.adfly_ic_mute_on);
                this.Oooo00O = false;
                return;
            }
            MediaPlayer mediaPlayer3 = this.f2536OooO0o0;
            if (mediaPlayer3 != null) {
                mediaPlayer3.setVolume(0.0f, 0.0f);
            }
            this.OooOO0O.setImageResource(R$mipmap.adfly_ic_mute_off);
            this.Oooo00O = true;
            return;
        }
        if (id == R$id.down_btn || id == R$id.down_btn_lin_start) {
            OooO();
            if (this.OooOoO0) {
                return;
            }
            currentTimeMillis = this.Oooo0OO > 0 ? (System.currentTimeMillis() - this.Oooo0OO) / 1000 : 0L;
            o000O00O.OooO00o oooO00o3 = (o000O00O.OooO00o) view.getTag();
            f fVar3 = this.OooOooo;
            o00OOO0.OooO0Oo(new o00OO00O[]{new o000O00O(oooO00o3, "ssp", currentTimeMillis, fVar3.f2288OooO0o, this.Oooo0O0, fVar3.f2289OooO0o0)});
            return;
        }
        if (id == R$id.container || id == R$id.pop_c) {
            if (this.OooOoO0) {
                return;
            }
            currentTimeMillis = this.Oooo0OO > 0 ? (System.currentTimeMillis() - this.Oooo0OO) / 1000 : 0L;
            o000O00O.OooO00o oooO00o4 = (o000O00O.OooO00o) view.getTag();
            f fVar4 = this.OooOooo;
            o00OOO0.OooO0Oo(new o00OO00O[]{new o000O00O(oooO00o4, "ssp", currentTimeMillis, fVar4.f2288OooO0o, this.Oooo0O0, fVar4.f2289OooO0o0)});
            return;
        }
        if (id == R$id.type11or12_pop_bg) {
            if (!this.OooOoO0) {
                long currentTimeMillis4 = this.Oooo0OO > 0 ? (System.currentTimeMillis() - this.Oooo0OO) / 1000 : 0L;
                f fVar5 = this.OooOooo;
                o00OOO0.OooO0Oo(new o00OO00O[]{new o000O0O0(oooO00o, "ssp", currentTimeMillis4, fVar5.f2288OooO0o, fVar5.f2289OooO0o0)});
            }
            if (!this.OoooOO0) {
                return;
            }
        } else {
            if (id != R$id.type11or12_pop_c) {
                if (view == this.f2538OooO0oo) {
                    View inflate = ((LayoutInflater) getSystemService("layout_inflater")).inflate(R$layout.adfly_dialog_close_rewards, (ViewGroup) null);
                    final Dialog dialog = new Dialog(this);
                    dialog.setContentView(inflate);
                    Window window = dialog.getWindow();
                    window.setBackgroundDrawable(new ColorDrawable(0));
                    dialog.show();
                    WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams();
                    layoutParams.copyFrom(window.getAttributes());
                    layoutParams.width = Math.min(dialog.getContext().getResources().getDisplayMetrics().widthPixels - (((int) TypedValue.applyDimension(1, 45.0f, getResources().getDisplayMetrics())) * 2), (int) TypedValue.applyDimension(1, 320.0f, getResources().getDisplayMetrics()));
                    layoutParams.height = -2;
                    window.setAttributes(layoutParams);
                    inflate.findViewById(R$id.close).setOnClickListener(new View.OnClickListener() {
                        @Override
                        public final void onClick(View view2) {
                            SspRewardVideoShowActivity sspRewardVideoShowActivity = SspRewardVideoShowActivity.this;
                            Dialog dialog2 = dialog;
                            String str = SspRewardVideoShowActivity.OoooOoO;
                            sspRewardVideoShowActivity.getSharedPreferences("com.adfly.sdk_preferences", 0).edit().putInt("rewards_close_playing_count", sspRewardVideoShowActivity.OooO0o0() + 1).apply();
                            dialog2.cancel();
                            sspRewardVideoShowActivity.finish();
                        }
                    });
                    inflate.findViewById(R$id.btn_continue).setOnClickListener(new View.OnClickListener() {
                        @Override
                        public final void onClick(View view2) {
                            Dialog dialog2 = dialog;
                            String str = SspRewardVideoShowActivity.OoooOoO;
                            dialog2.dismiss();
                        }
                    });
                    return;
                }
                if (view != this.f2535OooO0o || (o0oo00oArr = this.OoooOOO) == null || o0oo00oArr.length == 0) {
                    return;
                }
                int length = o0oo00oArr.length;
                String[] strArr = new String[length];
                for (int i = 0; i < length; i++) {
                    strArr[i] = this.OoooOOO[i].OooO0O0();
                }
                new AlertDialog.Builder(this).setItems(strArr, new o00Oo0(this, strArr)).show();
                return;
            }
            if (!this.OooOoO0) {
                long currentTimeMillis5 = this.Oooo0OO > 0 ? (System.currentTimeMillis() - this.Oooo0OO) / 1000 : 0L;
                f fVar6 = this.OooOooo;
                o00OOO0.OooO0Oo(new o00OO00O[]{new o000O0O0(oooO00o, "ssp", currentTimeMillis5, fVar6.f2288OooO0o, fVar6.f2289OooO0o0)});
            }
            List<String> list2 = this.OoooO0O;
            if (list2 != null && !list2.contains("v2_ad_area")) {
                return;
            }
        }
        OooO();
    }

    @Override
    public void onCreate(Bundle bundle) {
        o0000O0.OooO0O0.OooO00o OooO0O02;
        ConnectivityManager connectivityManager;
        NetworkInfo activeNetworkInfo;
        TraceManager.startActivityTrace(getClass().getName());
        super.onCreate(bundle);
        setContentView(R$layout.adfly_layout_ssprewardvideo);
        this.OooOoO = getIntent().getStringExtra("extra.unitid");
        this.OooOoOO = getIntent().getStringExtra("extra.video.url");
        this.OooOoo0 = getIntent().getStringExtra("extra.video.path");
        this.OooOoo = getIntent().getStringExtra("extra.coverimg.url");
        this.OooOooO = getIntent().getIntExtra("extra.timecount", 0);
        this.OooOooo = (f) getIntent().getParcelableExtra("extra.ad.data");
        this.Oooo0O0 = getIntent().getStringExtra("extra.from");
        this.OooOoO0 = getIntent().getBooleanExtra("extra.interstitial", false);
        if (TextUtils.isEmpty(this.OooOoo0)) {
            finish();
        }
        View findViewById = findViewById(R$id.container);
        this.f2531OooO00o = findViewById;
        findViewById.setTag(o000O00O.OooO00o.ALL);
        this.f2531OooO00o.setOnClickListener(this);
        VideoTextureView videoTextureView = (VideoTextureView) findViewById(R$id.texture_view);
        this.f2532OooO0O0 = videoTextureView;
        videoTextureView.setOnClickListener(this);
        this.OooOOO0 = (ProgressBar) findViewById(R$id.play_progress);
        this.OooOOO = (ProgressBar) findViewById(R$id.load_progress);
        this.f2532OooO0O0.setSurfaceTextureListener(this);
        ImageView imageView = (ImageView) findViewById(R$id.cover_img);
        this.OooOO0o = imageView;
        imageView.setOnClickListener(this);
        View findViewById2 = findViewById(R$id.feedback);
        this.f2535OooO0o = findViewById2;
        findViewById2.setOnClickListener(this);
        this.f2537OooO0oO = (TextView) findViewById(R$id.timer_tv);
        ImageView imageView2 = (ImageView) findViewById(R$id.close);
        this.f2538OooO0oo = imageView2;
        imageView2.setOnClickListener(this);
        ImageView imageView3 = (ImageView) findViewById(R$id.close_icon);
        this.f2530OooO = imageView3;
        imageView3.setOnClickListener(this);
        this.f2539OooOO0 = (ImageView) findViewById(R$id.jump_icon);
        ImageView imageView4 = (ImageView) findViewById(R$id.mute_icon);
        this.OooOO0O = imageView4;
        imageView4.setOnClickListener(this);
        new Handler().postDelayed(new OooO0O0(), 20000L);
        f fVar = this.OooOooo;
        h hVar = fVar.OooOOo0;
        this.Oooo000 = hVar;
        if (fVar != null && hVar != null && hVar.OooO0Oo() != null) {
            String OooO0OO2 = this.OooOooo.OooOOo0.OooO0Oo().OooO0OO();
            int OooO0O03 = this.OooOooo.OooOOo0.OooO0Oo().OooO0O0();
            if (!TextUtils.isEmpty(OooO0OO2) && OooO0O03 == 0 && (URLUtil.isHttpUrl(OooO0OO2) || URLUtil.isHttpsUrl(OooO0OO2))) {
                o0O0O0o0.OooO0OO(this).OooO0Oo(this, this.OooOooo.OooOOo0.OooO0Oo().OooO0OO());
            }
        }
        String str = null;
        if (this.OooOoO0) {
            o0000O0.OooO0O0 oooO0O0 = o0Oo0oo.OooO00o.f263OooO00o.f261OooO0oO;
            if (oooO0O0 != null) {
                OooO0O02 = oooO0O0.OooO00o();
            }
            OooO0O02 = null;
        } else {
            o0000O0.OooO0O0 oooO0O02 = o0Oo0oo.OooO00o.f263OooO00o.f261OooO0oO;
            if (oooO0O02 != null) {
                OooO0O02 = oooO0O02.OooO0O0();
            }
            OooO0O02 = null;
        }
        if (OooO0O02 != null && OooO0O02.OooO0Oo() != null) {
            String str2 = this.OooOooo.f2285OooO0O0;
            String[] OooO0O04 = OooO0O02.OooO0O0(str2);
            if (OooO0O04 != null) {
                this.OoooO0O = Arrays.asList(OooO0O04);
            }
            this.OoooO = OooO0O02.OooO0OO(str2) * 1000;
            this.OoooOO0 = OooO0O02.OooO0o(str2);
            this.o000oOoO = OooO0O02.OooO0o0(str2);
        }
        if (OooO0O02 != null && OooO0O02.OooO00o() != null) {
            o0000O0.OooO0O0.OooO00o.C0011OooO00o.C0012OooO00o OooO00o2 = OooO0O02.OooO00o().OooO00o();
            int OooO0o02 = OooO0o0();
            int i = getSharedPreferences("com.adfly.sdk_preferences", 0).getInt("rewards_feedback_show_count", 0);
            int OooO00o3 = OooO00o2 != null ? OooO00o2.OooO00o() : 0;
            int OooO0O05 = OooO00o2 != null ? OooO00o2.OooO0O0() : 0;
            if (OooO0o02 >= OooO00o3 && i < OooO0O05) {
                this.f2535OooO0o.setVisibility(0);
                getSharedPreferences("com.adfly.sdk_preferences", 0).edit().putInt("rewards_feedback_show_count", OooO0o0() + 1).apply();
                o00Ooo o00ooo = new o00Ooo(this);
                o0Oo0oo o0oo0oo = o0Oo0oo.OooO00o.f263OooO00o;
                String str3 = o0oo0oo.f262OooO0oo;
                if (!TextUtils.isEmpty(str3)) {
                    String OooOOO2 = OooO0OO.OooO0O0.OooO00o.OooO00o.OooO00o.OooOOO("https://", str3, "/api/feedback/content/list");
                    HashMap hashMap = new HashMap();
                    if (OooOOO2 == null) {
                        OooOOO2 = null;
                    }
                    OooO0OO.OooO00o.OooO00o.o00000O0.OooOO0O oooOO0O = OooOO0O.OooO0OO.f143OooO00o;
                    Application application = oooOO0O.f132OooO00o;
                    int i2 = -1;
                    if (application != null && (connectivityManager = (ConnectivityManager) application.getSystemService("connectivity")) != null && (activeNetworkInfo = connectivityManager.getActiveNetworkInfo()) != null) {
                        i2 = activeNetworkInfo.getType();
                    }
                    hashMap.put("network", Integer.valueOf(i2));
                    hashMap.put("manufacturer", Build.MANUFACTURER);
                    hashMap.put("device_model", Build.MODEL);
                    hashMap.put("utc", Long.valueOf(System.currentTimeMillis()));
                    hashMap.put("version", o0oo0oo.f257OooO0OO);
                    hashMap.put("app_ver", o0oo0oo.f257OooO0OO);
                    hashMap.put("client", o0oo0oo.f255OooO00o);
                    hashMap.put("os_ver", o0oo0oo.f255OooO00o);
                    hashMap.put("flavor", "adflysdk");
                    hashMap.put("product", "adflysdk");
                    hashMap.put("advertiser_id", o0oo0oo.f256OooO0O0);
                    hashMap.put(EventType.PLATFORM, "android");
                    Application application2 = oooOO0O.f132OooO00o;
                    if (application2 != null) {
                        hashMap.put(CommonConstant.KEY_UID, OooO0OO.OooO00o.OooO00o.o00000O0.o0OO00O.OooO00o(application2));
                        try {
                            str = application2.getPackageManager().getPackageInfo(application2.getPackageName(), 0).versionName;
                        } catch (Exception unused) {
                        }
                        if (str != null) {
                            hashMap.put("appversion", str);
                        }
                    }
                    JsonElement jsonElement = o0Oo0oo.OooO00o.f263OooO00o.f258OooO0Oo;
                    if (jsonElement != null) {
                        hashMap.put("publisher_flag", jsonElement);
                    }
                    HashMap hashMap2 = new HashMap();
                    for (Map.Entry entry : hashMap.entrySet()) {
                        if (entry.getValue() != null) {
                            hashMap2.put(entry.getKey(), entry.getValue().toString());
                        }
                    }
                    o0OOO0o.OooO0o(OooOOO2, hashMap2, new o000000(o0OO00O[].class, "data"), o00ooo);
                }
            }
        }
        AppInstrumentation.onActivityCreateEnd();
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        this.OooOo = true;
        OooO0oO();
        ObjectAnimator objectAnimator = this.Oooo0oo;
        if (objectAnimator != null) {
            objectAnimator.cancel();
            this.Oooo0oo = null;
        }
        ObjectAnimator objectAnimator2 = this.Oooo;
        if (objectAnimator2 != null) {
            objectAnimator2.cancel();
            this.Oooo = null;
        }
        PopupWindow popupWindow = this.Oooo0o0;
        if (popupWindow != null) {
            popupWindow.dismiss();
            this.Oooo0o0 = null;
        }
        o0O0O00 o0o0o00 = this.OooOOOo;
        if (o0o0o00 != null) {
            ViewParent parent = o0o0o00.getParent();
            if (parent instanceof ViewGroup) {
                ((ViewGroup) parent).removeView(this.OooOOOo);
            }
            this.OooOOOo.getSettings().setJavaScriptEnabled(false);
            this.OooOOOo.removeAllViews();
            this.OooOOOo.destroy();
            this.OooOOOo = null;
        }
    }

    @Override
    public void onPause() {
        super.onPause();
        this.OooOo0o = true;
        MediaPlayer mediaPlayer = this.f2536OooO0o0;
        if (mediaPlayer != null && mediaPlayer.isPlaying()) {
            this.OooOOo = this.f2536OooO0o0.getCurrentPosition();
            this.f2536OooO0o0.pause();
        }
        o0000Ooo o0000ooo = this.OooOOo0;
        if (o0000ooo != null) {
            o0000ooo.OooO00o();
            o0000ooo.f738OooO00o = null;
        }
    }

    @Override
    public void onPrepared(MediaPlayer mediaPlayer) {
        if (this.OooOOOO == null) {
            this.OooOOOO = new OooOOO();
        }
        mediaPlayer.start();
        ProgressBar progressBar = this.OooOOO0;
        if (progressBar != null) {
            progressBar.setVisibility(0);
            this.OooOOO0.setMax(10000);
        }
        OooOOO oooOOO = this.OooOOOO;
        if (oooOOO != null) {
            oooOOO.f2548OooO00o = new OooO0OO.OooO00o.OooO00o.o0o0Oo.o0OOO0o(this);
            oooOOO.OooO00o();
            oooOOO.f2549OooO0O0 = OooO0Oo.OooO00o.OooO0O0.OooO0o0(90L, 90L, TimeUnit.MILLISECONDS).OooO(new OooO0OO.OooO00o.OooO00o.o0o0Oo.o0Oo0oo(oooOOO), OooO0Oo.OooO00o.OooOoo.OooO0O0.OooO00o.f1432OooO0o0, OooO0Oo.OooO00o.OooOoo.OooO0O0.OooO00o.f1430OooO0OO, OooO0Oo.OooO00o.OooOoo.OooO0O0.OooO00o.f1431OooO0Oo);
        }
    }

    @Override
    public void onRestart() {
        AppInstrumentation.onActivityRestartBegin(getClass().getName());
        super.onRestart();
        AppInstrumentation.onActivityRestartEnd();
    }

    @Override
    public void onResume() {
        int i;
        AppInstrumentation.onActivityResumeBegin(getClass().getName());
        super.onResume();
        this.OooOo0o = false;
        MediaPlayer mediaPlayer = this.f2536OooO0o0;
        if (mediaPlayer != null && (i = this.OooOOo) > 1 && !this.OooOo00) {
            if (Build.VERSION.SDK_INT >= 26) {
                mediaPlayer.seekTo(i, 3);
            } else {
                mediaPlayer.seekTo(i);
            }
            this.f2536OooO0o0.start();
        }
        o0000Ooo o0000ooo = this.OooOOo0;
        if (o0000ooo != null) {
            o0000ooo.OooO0O0();
        }
        AppInstrumentation.onActivityResumeEnd();
    }

    @Override
    public void onStart() {
        AppInstrumentation.onActivityStartBegin(getClass().getName());
        super.onStart();
        if ((this.Oooo000 instanceof o) && this.OoooO0) {
            finish();
        }
        AppInstrumentation.onActivityStartEnd();
    }

    @Override
    public void onSurfaceTextureAvailable(SurfaceTexture surfaceTexture, int i, int i2) {
        SurfaceTexture surfaceTexture2 = this.f2533OooO0OO;
        if (surfaceTexture2 != null) {
            this.f2532OooO0O0.setSurfaceTexture(surfaceTexture2);
        } else {
            this.f2533OooO0OO = surfaceTexture;
            OooO0o();
        }
    }

    @Override
    public boolean onSurfaceTextureDestroyed(SurfaceTexture surfaceTexture) {
        return false;
    }

    @Override
    public void onSurfaceTextureSizeChanged(SurfaceTexture surfaceTexture, int i, int i2) {
    }

    @Override
    public void onSurfaceTextureUpdated(SurfaceTexture surfaceTexture) {
    }
}