package com.bytedance.sdk.openadsdk.core.fhx.ro;

import android.annotation.SuppressLint;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.Rect;
import android.os.Message;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.util.TypedValue;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.SeekBar;
import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.media3.exoplayer.ExoPlayer;
import b6.f;
import com.bytedance.sdk.component.utils.maa;
import com.bytedance.sdk.component.utils.mq;
import com.bytedance.sdk.openadsdk.core.gof;
import com.bytedance.sdk.openadsdk.core.model.lse;
import com.bytedance.sdk.openadsdk.core.widget.gqi;
import com.bytedance.sdk.openadsdk.core.widget.wey;
import com.bytedance.sdk.openadsdk.utils.ku;
import com.bytedance.sdk.openadsdk.utils.qhl;
import com.bytedance.sdk.openadsdk.utils.zan;
import i6.a;
import java.lang.ref.WeakReference;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

/* JADX INFO: loaded from: classes2.dex */
public class yz extends jnr {
    private int ado;
    private float aws;
    private final mq bkb;
    private int bwv;
    private ImageView bx;
    private float cg;
    private final Rect cpu;
    private ColorStateList daz;

    /* JADX INFO: renamed from: gc, reason: collision with root package name */
    private TextView f7106gc;

    /* JADX INFO: renamed from: ha, reason: collision with root package name */
    private TextView f7107ha;
    private View hxv;

    /* JADX INFO: renamed from: ib, reason: collision with root package name */
    private TextView f7108ib;
    private final int jm;
    private final Rect jn;
    private ImageView kwx;
    private final gqi lcp;
    private boolean lmk;
    private TextView lz;
    private int mj;
    private TextView mon;
    private boolean mpp;

    /* JADX INFO: renamed from: ne, reason: collision with root package name */
    private TextView f7109ne;
    private final int no;
    private int pbk;
    private final Rect pcm;
    private ImageView pkk;

    /* JADX INFO: renamed from: qb, reason: collision with root package name */
    private float f7110qb;

    /* JADX INFO: renamed from: qf, reason: collision with root package name */
    private View f7111qf;
    private float qph;
    private final Rect rka;
    private SeekBar si;
    private ColorStateList so;

    /* JADX INFO: renamed from: te, reason: collision with root package name */
    private ColorStateList f7112te;
    private float ttj;
    private ImageView tzk;
    private int vvj;
    private final Rect xca;
    private TextView xgn;
    private int ywr;
    private View zan;
    private final View.OnTouchListener zow;

    public yz(Context context, ViewGroup viewGroup, boolean z10, int i10, lse lseVar, f fVar, boolean z11) {
        super(context, viewGroup, z10, i10, lseVar, fVar, z11);
        this.bkb = new mq(this);
        this.lmk = false;
        this.mpp = false;
        this.vvj = 0;
        this.mj = 0;
        this.ado = 0;
        this.bwv = 0;
        this.ywr = 0;
        this.pcm = new Rect();
        this.rka = new Rect();
        this.pbk = 0;
        this.zow = new View.OnTouchListener() { // from class: com.bytedance.sdk.openadsdk.core.fhx.ro.yz.7
            @Override // android.view.View.OnTouchListener
            @SuppressLint({"ClickableViewAccessibility"})
            public boolean onTouch(View view, MotionEvent motionEvent) {
                int actionMasked = motionEvent.getActionMasked();
                if (actionMasked == 2) {
                    view.getParent().requestDisallowInterceptTouchEvent(true);
                } else if (actionMasked == 3) {
                    view.getParent().requestDisallowInterceptTouchEvent(false);
                }
                return false;
            }
        };
        this.xca = new Rect();
        this.cpu = new Rect();
        this.jn = new Rect();
        this.lse = gof.fm().getApplicationContext();
        yz(z11);
        this.f7099lb = viewGroup;
        this.gof = z10;
        gqi gqiVar = new gqi(this);
        this.lcp = gqiVar;
        gqiVar.fm(this.gof);
        DisplayMetrics displayMetrics = this.lse.getResources().getDisplayMetrics();
        this.jm = displayMetrics.widthPixels;
        this.no = displayMetrics.heightPixels;
        this.sds = i10;
        this.gzf = fVar;
        this.maa = lseVar;
        yz(8);
        fm(context, this.f7099lb);
        yz();
        duv();
    }

    private void hi() {
        DisplayMetrics displayMetrics = this.lse.getResources().getDisplayMetrics();
        TextView textView = this.f7109ne;
        if (textView != null) {
            this.f7110qb = textView.getTextSize();
            this.f7109ne.setTextSize(2, 14.0f);
            ColorStateList textColors = this.f7109ne.getTextColors();
            this.f7112te = textColors;
            if (textColors != null) {
                this.f7109ne.setTextColor(-1);
            }
            this.cg = this.f7109ne.getAlpha();
            this.f7109ne.setAlpha(0.85f);
            this.f7109ne.setShadowLayer(0.0f, zan.ro(this.lse, 0.5f), zan.ro(this.lse, 0.5f), maa.wsy(this.lse, "tt_b2000000"));
            ViewGroup.LayoutParams layoutParams = this.f7109ne.getLayoutParams();
            if (layoutParams instanceof ViewGroup.MarginLayoutParams) {
                ViewGroup.MarginLayoutParams marginLayoutParams = (ViewGroup.MarginLayoutParams) layoutParams;
                this.xca.set(marginLayoutParams.leftMargin, marginLayoutParams.topMargin, marginLayoutParams.rightMargin, marginLayoutParams.bottomMargin);
                zan.fm(this.f7109ne, (int) TypedValue.applyDimension(1, 16.0f, displayMetrics), this.xca.top, (int) TypedValue.applyDimension(1, 14.0f, displayMetrics), this.xca.bottom);
            }
        }
        TextView textView2 = this.f7108ib;
        if (textView2 != null) {
            this.ttj = textView2.getTextSize();
            this.f7108ib.setTextSize(2, 14.0f);
            ColorStateList textColors2 = this.f7108ib.getTextColors();
            this.daz = textColors2;
            if (textColors2 != null) {
                this.f7108ib.setTextColor(-1);
            }
            this.qph = this.f7108ib.getAlpha();
            this.f7108ib.setAlpha(0.85f);
            this.f7108ib.setShadowLayer(0.0f, zan.ro(this.lse, 0.5f), zan.ro(this.lse, 0.5f), maa.wsy(this.lse, "tt_b2000000"));
            ViewGroup.LayoutParams layoutParams2 = this.f7108ib.getLayoutParams();
            if (layoutParams2 instanceof ViewGroup.MarginLayoutParams) {
                ViewGroup.MarginLayoutParams marginLayoutParams2 = (ViewGroup.MarginLayoutParams) layoutParams2;
                this.cpu.set(marginLayoutParams2.leftMargin, marginLayoutParams2.topMargin, marginLayoutParams2.rightMargin, marginLayoutParams2.bottomMargin);
                TextView textView3 = this.f7108ib;
                int iApplyDimension = (int) TypedValue.applyDimension(1, 14.0f, displayMetrics);
                Rect rect = this.cpu;
                zan.fm(textView3, iApplyDimension, rect.top, rect.right, rect.bottom);
            }
        }
        ImageView imageView = this.kwx;
        if (imageView != null) {
            ViewGroup.LayoutParams layoutParams3 = imageView.getLayoutParams();
            if (layoutParams3 instanceof ViewGroup.MarginLayoutParams) {
                ViewGroup.MarginLayoutParams marginLayoutParams3 = (ViewGroup.MarginLayoutParams) layoutParams3;
                this.jn.set(marginLayoutParams3.leftMargin, marginLayoutParams3.topMargin, marginLayoutParams3.rightMargin, marginLayoutParams3.bottomMargin);
                ImageView imageView2 = this.kwx;
                Rect rect2 = this.jn;
                zan.fm(imageView2, rect2.left, rect2.top, (int) TypedValue.applyDimension(1, 16.0f, displayMetrics), this.jn.bottom);
            }
        }
        ImageView imageView3 = this.kwx;
        if (imageView3 != null) {
            imageView3.setImageDrawable(maa.lb(this.lse, "tt_shrink_fullscreen"));
        }
        TextView textView4 = this.xgn;
        if (textView4 != null) {
            ColorStateList textColors3 = textView4.getTextColors();
            this.so = textColors3;
            if (textColors3 != null) {
                this.xgn.setTextColor(-1);
            }
            this.aws = this.xgn.getAlpha();
            this.xgn.setAlpha(0.85f);
            ViewGroup.LayoutParams layoutParams4 = this.xgn.getLayoutParams();
            if (layoutParams4 instanceof ViewGroup.MarginLayoutParams) {
                ViewGroup.MarginLayoutParams marginLayoutParams4 = (ViewGroup.MarginLayoutParams) layoutParams4;
                this.rka.set(marginLayoutParams4.leftMargin, marginLayoutParams4.topMargin, marginLayoutParams4.rightMargin, marginLayoutParams4.bottomMargin);
                TextView textView5 = this.xgn;
                int iApplyDimension2 = (int) TypedValue.applyDimension(1, 1.0f, displayMetrics);
                Rect rect3 = this.cpu;
                zan.fm(textView5, iApplyDimension2, rect3.top, rect3.right, rect3.bottom);
            }
        }
        View view = this.hxv;
        if (view != null) {
            ViewGroup.LayoutParams layoutParams5 = view.getLayoutParams();
            this.pbk = layoutParams5.height;
            layoutParams5.height = (int) TypedValue.applyDimension(1, 49.0f, displayMetrics);
            this.hxv.setLayoutParams(layoutParams5);
            this.hxv.setBackgroundResource(maa.yz(this.lse, "tt_shadow_fullscreen_top"));
        }
        ro(false, true);
    }

    private void nt() {
        TextView textView = this.f7109ne;
        if (textView != null) {
            textView.setTextSize(0, this.f7110qb);
            ColorStateList colorStateList = this.f7112te;
            if (colorStateList != null) {
                this.f7109ne.setTextColor(colorStateList);
            }
            this.f7109ne.setAlpha(this.cg);
            this.f7109ne.setShadowLayer(zan.ro(this.lse, 1.0f), 0.0f, 0.0f, maa.wsy(this.lse, "tt_72000000"));
            TextView textView2 = this.f7109ne;
            Rect rect = this.xca;
            zan.fm(textView2, rect.left, rect.top, rect.right, rect.bottom);
        }
        TextView textView3 = this.f7108ib;
        if (textView3 != null) {
            textView3.setTextSize(0, this.ttj);
            ColorStateList colorStateList2 = this.daz;
            if (colorStateList2 != null) {
                this.f7108ib.setTextColor(colorStateList2);
            }
            this.f7108ib.setAlpha(this.qph);
            this.f7108ib.setShadowLayer(zan.ro(this.lse, 1.0f), 0.0f, 0.0f, maa.wsy(this.lse, "tt_72000000"));
            TextView textView4 = this.f7108ib;
            Rect rect2 = this.cpu;
            zan.fm(textView4, rect2.left, rect2.top, rect2.right, rect2.bottom);
        }
        ImageView imageView = this.kwx;
        if (imageView != null) {
            Rect rect3 = this.jn;
            zan.fm(imageView, rect3.left, rect3.top, rect3.right, rect3.bottom);
        }
        ImageView imageView2 = this.kwx;
        if (imageView2 != null) {
            imageView2.setImageDrawable(maa.lb(this.lse, "tt_enlarge_video"));
        }
        TextView textView5 = this.xgn;
        if (textView5 != null) {
            ColorStateList colorStateList3 = this.so;
            if (colorStateList3 != null) {
                textView5.setTextColor(colorStateList3);
            }
            this.xgn.setAlpha(this.aws);
            TextView textView6 = this.xgn;
            Rect rect4 = this.cpu;
            zan.fm(textView6, rect4.left, rect4.top, rect4.right, rect4.bottom);
        }
        View view = this.hxv;
        if (view != null) {
            ViewGroup.LayoutParams layoutParams = view.getLayoutParams();
            layoutParams.height = this.pbk;
            this.hxv.setLayoutParams(layoutParams);
            this.hxv.setBackground(ku.fm(this.lse, "tt_video_black_desc_gradient"));
        }
        ro(false, true);
    }

    @Override // com.bytedance.sdk.openadsdk.core.fhx.ro.jnr
    public void ajl() {
        this.bkb.removeMessages(1);
    }

    @Override // com.bytedance.sdk.openadsdk.core.fhx.ro.jnr
    public void ef() {
        this.si.setProgress(0);
        this.si.setSecondaryProgress(0);
        this.f7108ib.setText(maa.fm(this.lse, "tt_00_00"));
        this.f7109ne.setText(maa.fm(this.lse, "tt_00_00"));
        yz(8);
        if (hlt()) {
            this.yz.setVisibility(8);
        }
        ImageView imageView = this.wu;
        if (imageView != null) {
            imageView.setImageDrawable(null);
        }
        yz(8);
        zan.fm(this.f7111qf, 8);
        zan.fm(this.vt, 8);
        zan.fm((View) this.ku, 8);
        zan.fm(this.duv, 8);
        wey weyVar = this.hlt;
        if (weyVar != null) {
            weyVar.fm(true);
        }
    }

    @Override // com.bytedance.sdk.openadsdk.core.fhx.ro.jnr, b6.g
    @SuppressLint({"ClickableViewAccessibility"})
    public /* bridge */ /* synthetic */ void fm(Object obj, WeakReference weakReference, boolean z10) {
        fm((lse) obj, (WeakReference<Context>) weakReference, z10);
    }

    @Override // com.bytedance.sdk.openadsdk.core.fhx.ro.jnr
    public void jnr() {
        this.bkb.removeMessages(1);
        this.bkb.sendMessageDelayed(this.bkb.obtainMessage(1), ExoPlayer.DEFAULT_DETACH_SURFACE_TIMEOUT_MS);
    }

    @Override // com.bytedance.sdk.openadsdk.core.fhx.ro.jnr, com.bytedance.sdk.openadsdk.core.widget.wey.ro
    public void ku() {
        fm(true, false);
    }

    @Override // com.bytedance.sdk.openadsdk.core.fhx.ro.jnr
    public void lb(boolean z10) {
        TextView textView = this.f7106gc;
        if (textView != null) {
            zan.fm((View) textView, (!this.gof && z10) ? 0 : 8);
        }
    }

    @Override // com.bytedance.sdk.openadsdk.core.fhx.ro.jnr
    public void ro(boolean z10) {
        int i10 = vt() ? this.no : this.onz;
        int iRo = vt() ? this.jm : this.fhx;
        if (this.qhl <= 0 || this.irt <= 0 || i10 <= 0) {
            return;
        }
        if (!sds() && !vt() && (this.sds & 8) != 8) {
            iRo = zan.ro(this.lse, 228.0f);
        }
        int i11 = this.irt;
        int i12 = this.qhl;
        int i13 = (int) (i12 * ((i10 * 1.0f) / i11));
        if (i13 > iRo) {
            i10 = (int) (i11 * ((iRo * 1.0f) / i12));
        } else {
            iRo = i13;
        }
        if (!z10 && !vt()) {
            i10 = this.onz;
            iRo = this.fhx;
        }
        this.yz.fm(i10, iRo);
    }

    @Override // com.bytedance.sdk.openadsdk.core.fhx.ro.jnr, com.bytedance.sdk.openadsdk.core.widget.wey.ro
    public boolean vt() {
        return this.lmk;
    }

    @Override // com.bytedance.sdk.openadsdk.core.fhx.ro.jnr
    public void wsy() {
        lse lseVar;
        zan.ajl(this.ajl);
        zan.ajl(this.wsy);
        zan.jnr(this.zan);
        if (this.wu != null && (lseVar = this.maa) != null && lseVar.ex() != null && this.maa.ex().f5926f != null) {
            zan.ajl(this.wu);
            com.bytedance.sdk.openadsdk.wey.ro.ro().fm(this.maa.ex().f5926f, this.maa.ex().f5922b, this.maa.ex().f5921a, this.wu, this.maa);
        }
        if (this.jnr.getVisibility() == 0) {
            zan.fm((View) this.jnr, 8);
        }
    }

    @Override // com.bytedance.sdk.openadsdk.core.fhx.ro.jnr
    public void wu() {
        zan.jnr(this.ajl);
        zan.jnr(this.zan);
    }

    @Override // com.bytedance.sdk.openadsdk.core.fhx.ro.jnr
    @SuppressLint({"ClickableViewAccessibility"})
    public void yz() {
        super.yz();
        this.lcp.fm(this.f7099lb);
        zan.fm((View) this.pkk, (this.gof || (this.sds & 1) == 1) ? 8 : 0);
        this.pkk.setOnClickListener(new View.OnClickListener() { // from class: com.bytedance.sdk.openadsdk.core.fhx.ro.yz.1
            @Override // android.view.View.OnClickListener
            public void onClick(View view) {
                if (yz.this.irt()) {
                    yz yzVar = yz.this;
                    yzVar.hi.lb(yzVar, view);
                }
            }
        });
        zan.fm((View) this.f7107ha, (!this.gof || (this.sds & 2) == 2) ? 0 : 8);
        this.f7107ha.setOnClickListener(new View.OnClickListener() { // from class: com.bytedance.sdk.openadsdk.core.fhx.ro.yz.2
            @Override // android.view.View.OnClickListener
            public void onClick(View view) {
                if (yz.this.irt()) {
                    yz yzVar = yz.this;
                    yzVar.hi.yz(yzVar, view);
                }
            }
        });
        this.bx.setOnClickListener(new View.OnClickListener() { // from class: com.bytedance.sdk.openadsdk.core.fhx.ro.yz.3
            @Override // android.view.View.OnClickListener
            public void onClick(View view) {
                if (yz.this.irt()) {
                    yz yzVar = yz.this;
                    yzVar.hi.jnr(yzVar, view);
                }
            }
        });
        this.tzk.setOnClickListener(new View.OnClickListener() { // from class: com.bytedance.sdk.openadsdk.core.fhx.ro.yz.4
            @Override // android.view.View.OnClickListener
            public void onClick(View view) {
                yz.this.ro(false, true);
                yz.this.wu();
                yz.this.wsy();
                yz.this.irt();
            }
        });
        this.kwx.setOnClickListener(new View.OnClickListener() { // from class: com.bytedance.sdk.openadsdk.core.fhx.ro.yz.5
            @Override // android.view.View.OnClickListener
            public void onClick(View view) {
                if (yz.this.irt()) {
                    yz yzVar = yz.this;
                    yzVar.hi.ro(yzVar, view);
                }
            }
        });
        this.si.setThumbOffset(0);
        this.si.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() { // from class: com.bytedance.sdk.openadsdk.core.fhx.ro.yz.6
            @Override // android.widget.SeekBar.OnSeekBarChangeListener
            public void onProgressChanged(SeekBar seekBar, int i10, boolean z10) {
                if (yz.this.irt()) {
                    yz yzVar = yz.this;
                    yzVar.hi.fm(yzVar, i10, z10);
                }
            }

            @Override // android.widget.SeekBar.OnSeekBarChangeListener
            public void onStartTrackingTouch(SeekBar seekBar) {
                if (!yz.this.lmk && yz.this.lse != null) {
                    seekBar.setThumb(ku.fm(gof.fm(), "tt_seek_thumb_press"));
                }
                if (yz.this.irt()) {
                    seekBar.setThumbOffset(0);
                    yz yzVar = yz.this;
                    yzVar.hi.ro(yzVar, seekBar.getProgress());
                }
            }

            @Override // android.widget.SeekBar.OnSeekBarChangeListener
            public void onStopTrackingTouch(SeekBar seekBar) {
                if (!yz.this.lmk && yz.this.lse != null) {
                    seekBar.setThumb(ku.fm(gof.fm(), "tt_seek_thumb_normal"));
                }
                if (yz.this.irt()) {
                    seekBar.setThumbOffset(0);
                    yz yzVar = yz.this;
                    yzVar.hi.fm(yzVar, seekBar.getProgress());
                }
            }
        });
        this.si.setOnTouchListener(this.zow);
    }

    @Override // com.bytedance.sdk.openadsdk.core.fhx.ro.jnr
    public void fm(Context context, View view) {
        super.fm(context, view);
        this.f7107ha = (TextView) view.findViewById(qhl.nnq);
        this.pkk = (ImageView) view.findViewById(qhl.anz);
        this.hxv = view.findViewById(qhl.f7566ya);
        this.bx = (ImageView) view.findViewById(qhl.gt);
        this.f7106gc = (TextView) view.findViewById(qhl.iat);
        this.xgn = (TextView) view.findViewById(qhl.siu);
        this.mon = (TextView) view.findViewById(qhl.kec);
        this.zan = view.findViewById(qhl.xw);
        this.tzk = (ImageView) view.findViewById(qhl.eo);
        TextView textView = (TextView) view.findViewById(qhl.zes);
        this.lz = textView;
        textView.setText(maa.fm(context, "tt_video_retry_des_txt"));
        this.si = (SeekBar) view.findViewById(qhl.kh);
        this.f7108ib = (TextView) view.findViewById(qhl.nk);
        this.f7109ne = (TextView) view.findViewById(qhl.mu);
        this.f7111qf = view.findViewById(qhl.f7550cc);
        this.kwx = (ImageView) view.findViewById(qhl.ybi);
        this.f7097ef = view.findViewById(qhl.xp);
    }

    private void jnr(boolean z10) {
        if (z10) {
            hi();
        } else {
            nt();
        }
    }

    @Override // com.bytedance.sdk.openadsdk.core.fhx.ro.jnr
    public void ro(@Nullable ViewGroup viewGroup) {
        ViewGroup viewGroup2;
        if (viewGroup == null || (viewGroup2 = this.f7099lb) == null || !(viewGroup2.getLayoutParams() instanceof ViewGroup.MarginLayoutParams)) {
            return;
        }
        this.lmk = false;
        ViewGroup.MarginLayoutParams marginLayoutParams = (ViewGroup.MarginLayoutParams) this.f7099lb.getLayoutParams();
        marginLayoutParams.width = this.ado;
        marginLayoutParams.height = this.bwv;
        marginLayoutParams.leftMargin = this.mj;
        marginLayoutParams.topMargin = this.vvj;
        this.f7099lb.setLayoutParams(marginLayoutParams);
        ViewGroup.LayoutParams layoutParams = viewGroup.getLayoutParams();
        if (layoutParams instanceof RelativeLayout.LayoutParams) {
            RelativeLayout.LayoutParams layoutParams2 = (RelativeLayout.LayoutParams) layoutParams;
            layoutParams2.addRule(3, this.ywr);
            viewGroup.setLayoutParams(layoutParams2);
        }
        if (layoutParams instanceof ViewGroup.MarginLayoutParams) {
            Rect rect = this.pcm;
            zan.fm(viewGroup, rect.left, rect.top, rect.right, rect.bottom);
        }
        ro(true);
        this.kwx.setImageDrawable(maa.lb(this.lse, "tt_enlarge_video"));
        this.si.setThumb(ku.fm(this.lse, "tt_seek_thumb_normal"));
        this.si.setThumbOffset(0);
        a.c(this.f7099lb, true);
        jnr(this.lmk);
        zan.fm(this.hxv, 8);
        if ((this.sds & 2) == 2) {
            zan.fm((View) this.f7107ha, 0);
        }
    }

    @Override // com.bytedance.sdk.openadsdk.core.fhx.ro.jnr
    public void fm(String str) {
        TextView textView = this.f7106gc;
        if (textView != null) {
            textView.setText(str);
        }
        TextView textView2 = this.xgn;
        if (textView2 != null) {
            textView2.setText(str);
        }
    }

    @Override // com.bytedance.sdk.openadsdk.core.fhx.ro.jnr
    public void fm(int i10) {
        View view = this.f7111qf;
        if (view == null || view.getVisibility() != 0) {
            this.si.setProgress(i10);
        }
    }

    @Override // com.bytedance.sdk.openadsdk.core.fhx.ro.jnr
    public void fm(long j10, long j11) {
        this.f7108ib.setText(a.b(j11));
        this.f7109ne.setText(a.b(j10));
        this.si.setProgress(a.a(j10, j11));
    }

    @Override // com.bytedance.sdk.openadsdk.core.fhx.ro.jnr, b6.g
    public void fm() {
        fm(false, this.gof);
        gqi();
    }

    @Override // com.bytedance.sdk.openadsdk.core.fhx.ro.jnr
    public boolean ro(int i10) {
        SeekBar seekBar = this.si;
        return seekBar != null && i10 > seekBar.getSecondaryProgress();
    }

    @Override // com.bytedance.sdk.openadsdk.core.fhx.ro.jnr
    public void fm(long j10) {
        this.f7109ne.setText(a.b(j10));
    }

    @Override // com.bytedance.sdk.openadsdk.core.fhx.ro.jnr
    @SuppressLint({"ClickableViewAccessibility"})
    public void fm(lse lseVar, WeakReference<Context> weakReference, boolean z10) {
        String strFm;
        lse lseVar2;
        if (lseVar == null) {
            return;
        }
        fm(this.f7099lb, gof.fm());
        fm(false, this.gof);
        zan.fm(this.vt, 0);
        zan.fm((View) this.ku, 0);
        zan.fm(this.duv, 0);
        if (this.ku != null && (lseVar2 = this.maa) != null && lseVar2.ex() != null && this.maa.ex().f5926f != null) {
            com.bytedance.sdk.openadsdk.wey.ro.ro().fm(this.maa.ex().f5926f, this.maa.ex().f5922b, this.maa.ex().f5921a, this.ku, this.maa);
        }
        zan.fm((View) this.dsz, 0);
        int iOy = lseVar.oy();
        if (iOy == 4) {
            strFm = maa.fm(this.lse, "tt_video_download_apk");
        } else if (iOy != 5) {
            strFm = maa.fm(this.lse, "tt_video_mobile_go_detail");
        } else {
            strFm = maa.fm(this.lse, "tt_video_dial_phone");
        }
        TextView textView = this.dsz;
        if (textView != null) {
            textView.setText(strFm);
            this.dsz.setOnClickListener(this.ai);
            this.dsz.setOnTouchListener(this.ai);
        }
    }

    @Override // com.bytedance.sdk.openadsdk.core.fhx.ro.jnr
    public void fm(@Nullable ViewGroup viewGroup) {
        if (viewGroup != null && (this.f7099lb.getLayoutParams() instanceof ViewGroup.MarginLayoutParams)) {
            this.lmk = true;
            ViewGroup.MarginLayoutParams marginLayoutParams = (ViewGroup.MarginLayoutParams) this.f7099lb.getLayoutParams();
            this.mj = marginLayoutParams.leftMargin;
            this.vvj = marginLayoutParams.topMargin;
            this.ado = marginLayoutParams.width;
            this.bwv = marginLayoutParams.height;
            marginLayoutParams.width = -1;
            marginLayoutParams.height = -1;
            marginLayoutParams.topMargin = 0;
            marginLayoutParams.leftMargin = 0;
            this.f7099lb.setLayoutParams(marginLayoutParams);
            ViewGroup.LayoutParams layoutParams = viewGroup.getLayoutParams();
            if (layoutParams instanceof RelativeLayout.LayoutParams) {
                RelativeLayout.LayoutParams layoutParams2 = (RelativeLayout.LayoutParams) layoutParams;
                int[] rules = layoutParams2.getRules();
                this.ywr = rules.length > 0 ? rules[3] : 0;
                layoutParams2.addRule(3, 0);
                viewGroup.setLayoutParams(layoutParams2);
            }
            if (layoutParams instanceof ViewGroup.MarginLayoutParams) {
                ViewGroup.MarginLayoutParams marginLayoutParams2 = (ViewGroup.MarginLayoutParams) layoutParams;
                this.pcm.set(marginLayoutParams2.leftMargin, marginLayoutParams2.topMargin, marginLayoutParams2.rightMargin, marginLayoutParams2.bottomMargin);
                zan.fm(viewGroup, 0, 0, 0, 0);
            }
            ro(true);
            this.kwx.setImageDrawable(maa.lb(this.lse, "tt_shrink_video"));
            this.si.setThumb(ku.fm(this.lse, "tt_seek_thumb_fullscreen_selector"));
            this.si.setThumbOffset(0);
            a.c(this.f7099lb, false);
            jnr(this.lmk);
            zan.fm(this.hxv, 8);
            if (!this.gof) {
                zan.fm((View) this.pkk, 8);
                zan.fm((View) this.f7107ha, 8);
            } else if ((this.sds & 1) == 1) {
                zan.fm((View) this.pkk, 8);
            }
        }
    }

    @Override // com.bytedance.sdk.openadsdk.core.fhx.ro.jnr, com.bytedance.sdk.component.utils.mq.fm
    public void fm(Message message) {
        if (message.what != 1) {
            return;
        }
        ku();
    }

    @Override // com.bytedance.sdk.openadsdk.core.fhx.ro.jnr
    public void fm(boolean z10, boolean z11, boolean z12) {
        zan.fm(this.f7111qf, 0);
        if (this.lmk) {
            zan.fm(this.hxv, 0);
            zan.fm((View) this.xgn, 0);
        } else if (z12) {
            zan.fm(this.hxv, 8);
        }
        zan.fm((View) this.jnr, (!z10 || this.ajl.getVisibility() == 0) ? 8 : 0);
        if (!this.gof && !this.lmk) {
            if ((this.sds & 1) != 1 && !z12) {
                zan.fm((View) this.pkk, 0);
            }
            zan.fm((View) this.f7107ha, z12 ? 8 : 0);
        }
        zan.fm((View) this.f7108ib, 0);
        zan.fm((View) this.f7109ne, 0);
        zan.fm((View) this.si, 0);
    }

    @Override // com.bytedance.sdk.openadsdk.core.fhx.ro.jnr
    public void fm(boolean z10, boolean z11) {
        zan.fm(this.f7111qf, 8);
        zan.fm(this.hxv, 8);
        zan.fm((View) this.jnr, 8);
        if (!this.gof && !this.lmk) {
            zan.fm((View) this.pkk, 8);
            if ((this.sds & 2) != 2) {
                zan.fm((View) this.f7107ha, 8);
            }
        } else if ((this.sds & 1) == 1) {
            zan.fm((View) this.pkk, 8);
        }
        if (z11) {
            zan.fm((View) this.pkk, 8);
            zan.fm((View) this.f7107ha, 8);
        }
        lb(false);
    }

    @Override // com.bytedance.sdk.openadsdk.core.fhx.ro.jnr, com.bytedance.sdk.openadsdk.core.widget.gqi.fm
    public void fm(View view, boolean z10) {
        if (vt()) {
            String str = new SimpleDateFormat("HH:mm", Locale.getDefault()).format(new Date());
            lse lseVar = this.maa;
            if (lseVar != null && !TextUtils.isEmpty(lseVar.qlg())) {
                fm(this.maa.qlg());
            }
            this.mon.setText(str);
        } else {
            fm("");
            this.mon.setText("");
        }
        if (this.nt) {
            return;
        }
        lb(this.gof && !this.lmk);
        if (irt()) {
            this.hi.fm(this, view, true, this.ajl.getVisibility() != 0);
        }
    }
}
