package defpackage;

import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Handler;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.SurfaceView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.media3.exoplayer.ExoPlaybackException;
import androidx.media3.ui.AspectRatioFrameLayout;
import androidx.media3.ui.SubtitleView;
import ar.tvplayer.tv.R;
import ar.tvplayer.tv.player.ui.CustomPlayerView;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;

/* renamed from: ᵱʢᵢ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public abstract class AbstractC4381 extends FrameLayout {

    /* renamed from: ˀˁᵨ, reason: contains not printable characters */
    public boolean f16376;

    /* renamed from: ˀᵗᵝᵭ, reason: contains not printable characters */
    public final ImageView f16377;

    /* renamed from: ˀᵗᵩ, reason: contains not printable characters */
    public int f16378;

    /* renamed from: ˁˑᵰ, reason: contains not printable characters */
    public final Class f16379;

    /* renamed from: ˆᵼᵷˊ, reason: contains not printable characters */
    public int f16380;

    /* renamed from: ˊʽˎ, reason: contains not printable characters */
    public int f16381;

    /* renamed from: ˊʾˊ, reason: contains not printable characters */
    public boolean f16382;

    /* renamed from: ˊᵸˊ, reason: contains not printable characters */
    public InterfaceC3027 f16383;

    /* renamed from: ˌᵪ, reason: contains not printable characters */
    public int f16384;

    /* renamed from: ˌᵹᵨˑ, reason: contains not printable characters */
    public boolean f16385;

    /* renamed from: ˎˑː, reason: contains not printable characters */
    public final View f16386;

    /* renamed from: ˎᵬˀ, reason: contains not printable characters */
    public boolean f16387;

    /* renamed from: ˑᵝﹳᵜ, reason: contains not printable characters */
    public boolean f16388;

    /* renamed from: ˑᵥˁ, reason: contains not printable characters */
    public final SubtitleView f16389;

    /* renamed from: ᐧﾞ, reason: contains not printable characters */
    public final FrameLayout f16390;

    /* renamed from: ᵙᵢᵨᵳ, reason: contains not printable characters */
    public final Object f16391;

    /* renamed from: ᵛˈᵤ, reason: contains not printable characters */
    public Drawable f16392;

    /* renamed from: ᵡˎ, reason: contains not printable characters */
    public final ImageView f16393;

    /* renamed from: ᵡᵘˎʽ, reason: contains not printable characters */
    public InterfaceC0304 f16394;

    /* renamed from: ᵡᵶᵡ, reason: contains not printable characters */
    public CharSequence f16395;

    /* renamed from: ᵡⁱᵥ, reason: contains not printable characters */
    public final C0789 f16396;

    /* renamed from: ᵢˇᵭ, reason: contains not printable characters */
    public final AspectRatioFrameLayout f16397;

    /* renamed from: ᵤᵙᵷ, reason: contains not printable characters */
    public final boolean f16398;

    /* renamed from: ᵧـˌᵎ, reason: contains not printable characters */
    public final C5225 f16399;

    /* renamed from: ᵧᵾˀˈ, reason: contains not printable characters */
    public final ViewOnClickListenerC4825 f16400;

    /* renamed from: ᵫᵮʾ, reason: contains not printable characters */
    public boolean f16401;

    /* renamed from: ᵮᵠـˌ, reason: contains not printable characters */
    public final TextView f16402;

    /* renamed from: ᵳᵹᵺˋ, reason: contains not printable characters */
    public boolean f16403;

    /* renamed from: ᵶʔᵢˊ, reason: contains not printable characters */
    public final Handler f16404;

    /* renamed from: ᵷᵱ, reason: contains not printable characters */
    public boolean f16405;

    /* renamed from: ᵺʙ, reason: contains not printable characters */
    public final FrameLayout f16406;

    /* renamed from: ᵽʛ, reason: contains not printable characters */
    public boolean f16407;

    /* renamed from: ᵾᵬ, reason: contains not printable characters */
    public final View f16408;

    /* renamed from: ᵿʗᵝʽ, reason: contains not printable characters */
    public final View f16409;

    /* renamed from: ﾞⁱ, reason: contains not printable characters */
    public final Method f16410;

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Removed duplicated region for block: B:105:0x0319  */
    /* JADX WARN: Removed duplicated region for block: B:67:0x0259  */
    /* JADX WARN: Removed duplicated region for block: B:70:0x025f  */
    /* JADX WARN: Removed duplicated region for block: B:73:0x0276  */
    /* JADX WARN: Removed duplicated region for block: B:76:0x0289  */
    /* JADX WARN: Removed duplicated region for block: B:79:0x029b  */
    /* JADX WARN: Removed duplicated region for block: B:82:0x02b0  */
    /* JADX WARN: Removed duplicated region for block: B:83:0x02b3  */
    /* JADX WARN: Removed duplicated region for block: B:88:0x02de  */
    /* JADX WARN: Removed duplicated region for block: B:89:0x02e1  */
    /* JADX WARN: Removed duplicated region for block: B:94:0x02f1  */
    /* JADX WARN: Removed duplicated region for block: B:97:0x02f7  */
    /* JADX WARN: Type inference failed for: r22v0, types: [android.view.View, android.view.ViewGroup, ᵱʢᵢ] */
    /* JADX WARN: Type inference failed for: r3v1, types: [android.view.View] */
    /* JADX WARN: Type inference failed for: r5v4 */
    /* JADX WARN: Type inference failed for: r5v5, types: [boolean] */
    /* JADX WARN: Type inference failed for: r5v6 */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public AbstractC4381(android.content.Context r23, android.util.AttributeSet r24, int r25) throws java.lang.Throwable {
        /*
            Method dump skipped, instructions count: 801
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: defpackage.AbstractC4381.<init>(android.content.Context, android.util.AttributeSet, int):void");
    }

    private void setImage(Drawable drawable) {
        ImageView imageView = this.f16377;
        if (imageView == null) {
            return;
        }
        imageView.setImageDrawable(drawable);
        m9376();
    }

    private void setImageOutput(InterfaceC0304 interfaceC0304) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException {
        Method method;
        Object obj;
        Class cls = this.f16379;
        if (cls == null || !cls.isAssignableFrom(interfaceC0304.getClass())) {
            return;
        }
        try {
            method = this.f16410;
            method.getClass();
            obj = this.f16391;
            obj.getClass();
        } catch (IllegalAccessException | InvocationTargetException e) {
            e = e;
        }
        try {
            method.invoke(interfaceC0304, obj);
        } catch (InvocationTargetException e2) {
            e = e2;
            C1260.m3814(e);
        }
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public static void m9365(CustomPlayerView customPlayerView, Bitmap bitmap) {
        customPlayerView.setImage(new BitmapDrawable(customPlayerView.getResources(), bitmap));
        InterfaceC0304 interfaceC0304 = customPlayerView.f16394;
        if (interfaceC0304 != null) {
            C3916 c3916 = (C3916) interfaceC0304;
            if (c3916.m8657(30) && c3916.m8614().m1885(2)) {
                return;
            }
        }
        ImageView imageView = customPlayerView.f16377;
        if (imageView != null) {
            imageView.setVisibility(0);
            customPlayerView.m9376();
        }
        customPlayerView.m9380();
    }

    @Override // android.view.ViewGroup, android.view.View
    public final void dispatchDraw(Canvas canvas) {
        C0789 c0789;
        super.dispatchDraw(canvas);
        if (Build.VERSION.SDK_INT == 34 && (c0789 = this.f16396) != null && this.f16376) {
            c0789.m2885();
        }
    }

    @Override // android.view.ViewGroup, android.view.View
    public final boolean dispatchKeyEvent(KeyEvent keyEvent) {
        InterfaceC0304 interfaceC0304 = this.f16394;
        if (interfaceC0304 != null && ((C3916) interfaceC0304).m8657(16) && ((C3916) this.f16394).m8632()) {
            return super.dispatchKeyEvent(keyEvent);
        }
        int keyCode = keyEvent.getKeyCode();
        boolean z = keyCode == 19 || keyCode == 270 || keyCode == 22 || keyCode == 271 || keyCode == 20 || keyCode == 269 || keyCode == 21 || keyCode == 268 || keyCode == 23;
        C5225 c5225 = this.f16399;
        if (z && m9372() && !c5225.m10857()) {
            m9369(true);
            return true;
        }
        if ((m9372() && c5225.m10861(keyEvent)) || super.dispatchKeyEvent(keyEvent)) {
            m9369(true);
            return true;
        }
        if (z && m9372()) {
            m9369(true);
        }
        return false;
    }

    public List<C3718> getAdOverlayInfos() {
        ArrayList arrayList = new ArrayList();
        FrameLayout frameLayout = this.f16390;
        if (frameLayout != null) {
            arrayList.add(new C3718(frameLayout));
        }
        C5225 c5225 = this.f16399;
        if (c5225 != null) {
            arrayList.add(new C3718(c5225));
        }
        return AbstractC2692.m6700(arrayList);
    }

    public ViewGroup getAdViewGroup() {
        FrameLayout frameLayout = this.f16406;
        ᵛᵾˏ.ᵨᵳʝ(frameLayout, "exo_ad_overlay must be present for ad playback");
        return frameLayout;
    }

    public int getArtworkDisplayMode() {
        return this.f16378;
    }

    public boolean getControllerAutoShow() {
        return this.f16387;
    }

    public boolean getControllerHideOnTouch() {
        return this.f16407;
    }

    public int getControllerShowTimeoutMs() {
        return this.f16381;
    }

    public Drawable getDefaultArtwork() {
        return this.f16392;
    }

    public int getImageDisplayMode() {
        return this.f16380;
    }

    public FrameLayout getOverlayFrameLayout() {
        return this.f16390;
    }

    public InterfaceC0304 getPlayer() {
        return this.f16394;
    }

    public int getResizeMode() {
        AspectRatioFrameLayout aspectRatioFrameLayout = this.f16397;
        aspectRatioFrameLayout.getClass();
        return aspectRatioFrameLayout.getResizeMode();
    }

    public SubtitleView getSubtitleView() {
        return this.f16389;
    }

    @Deprecated
    public boolean getUseArtwork() {
        return this.f16378 != 0;
    }

    public boolean getUseController() {
        return this.f16388;
    }

    public View getVideoSurfaceView() {
        return this.f16408;
    }

    @Override // android.view.View
    public final boolean onTrackballEvent(MotionEvent motionEvent) {
        if (!m9372() || this.f16394 == null) {
            return false;
        }
        m9369(true);
        return true;
    }

    @Override // android.view.View
    public final boolean performClick() {
        m9377();
        return super.performClick();
    }

    public void setArtworkDisplayMode(int i) {
        ᵛᵾˏ.ᵿʗᵝʽ(i == 0 || this.f16393 != null);
        if (this.f16378 != i) {
            this.f16378 = i;
            m9374(false);
        }
    }

    public void setAspectRatioListener(InterfaceC0266 interfaceC0266) {
        AspectRatioFrameLayout aspectRatioFrameLayout = this.f16397;
        aspectRatioFrameLayout.getClass();
        aspectRatioFrameLayout.setAspectRatioListener(interfaceC0266);
    }

    public void setControllerAnimationEnabled(boolean z) {
        C5225 c5225 = this.f16399;
        c5225.getClass();
        c5225.setAnimationEnabled(z);
    }

    public void setControllerAutoShow(boolean z) {
        this.f16387 = z;
    }

    public void setControllerHideDuringAds(boolean z) {
        this.f16401 = z;
    }

    public void setControllerHideOnTouch(boolean z) {
        this.f16399.getClass();
        this.f16407 = z;
        m9375();
    }

    @Deprecated
    public void setControllerOnFullScreenModeChangedListener(InterfaceC4668 interfaceC4668) {
        C5225 c5225 = this.f16399;
        c5225.getClass();
        c5225.setOnFullScreenModeChangedListener(interfaceC4668);
    }

    public void setControllerShowTimeoutMs(int i) {
        C5225 c5225 = this.f16399;
        c5225.getClass();
        this.f16381 = i;
        if (c5225.m10857()) {
            m9368(m9383());
        }
    }

    public void setControllerVisibilityListener(InterfaceC1765 interfaceC1765) {
        if (interfaceC1765 != null) {
            setControllerVisibilityListener((InterfaceC3027) null);
        }
    }

    @Deprecated
    public void setControllerVisibilityListener(InterfaceC3027 interfaceC3027) {
        C5225 c5225 = this.f16399;
        c5225.getClass();
        InterfaceC3027 interfaceC30272 = this.f16383;
        if (interfaceC30272 == interfaceC3027) {
            return;
        }
        if (interfaceC30272 != null) {
            c5225.f19565.remove(interfaceC30272);
        }
        this.f16383 = interfaceC3027;
        if (interfaceC3027 != null) {
            c5225.getClass();
            c5225.f19565.add(interfaceC3027);
            setControllerVisibilityListener((InterfaceC1765) null);
        }
    }

    public void setCustomErrorMessage(CharSequence charSequence) {
        ᵛᵾˏ.ᵿʗᵝʽ(this.f16402 != null);
        this.f16395 = charSequence;
        m9382();
    }

    public void setDefaultArtwork(Drawable drawable) {
        if (this.f16392 != drawable) {
            this.f16392 = drawable;
            m9374(false);
        }
    }

    public void setEnableComposeSurfaceSyncWorkaround(boolean z) {
        this.f16376 = z;
    }

    public void setErrorMessageProvider(InterfaceC2739 interfaceC2739) {
        if (interfaceC2739 != null) {
            m9382();
        }
    }

    public void setFullscreenButtonClickListener(InterfaceC4088 interfaceC4088) {
        C5225 c5225 = this.f16399;
        c5225.getClass();
        c5225.setOnFullScreenModeChangedListener(this.f16400);
    }

    public void setFullscreenButtonState(boolean z) {
        C5225 c5225 = this.f16399;
        c5225.getClass();
        c5225.m10856(z);
    }

    public void setImageDisplayMode(int i) {
        ᵛᵾˏ.ᵿʗᵝʽ(this.f16377 != null);
        if (this.f16380 != i) {
            this.f16380 = i;
            m9376();
        }
    }

    public void setKeepContentOnPlayerReset(boolean z) {
        if (this.f16403 != z) {
            this.f16403 = z;
            m9374(false);
        }
    }

    public void setMediaRouteButtonViewProvider(InterfaceC4214 interfaceC4214) {
        C5225 c5225 = this.f16399;
        c5225.getClass();
        c5225.setMediaRouteButtonViewProvider(interfaceC4214);
    }

    /* JADX WARN: Code restructure failed: missing block: B:117:0x01d1, code lost:
    
        continue;
     */
    /* JADX WARN: Removed duplicated region for block: B:100:0x01d7  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public void setPlayer(defpackage.InterfaceC0304 r12) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException {
        /*
            Method dump skipped, instructions count: 510
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: defpackage.AbstractC4381.setPlayer(ʾᵣᵱ):void");
    }

    public void setRepeatToggleModes(int i) {
        C5225 c5225 = this.f16399;
        c5225.getClass();
        c5225.setRepeatToggleModes(i);
    }

    public void setShowBuffering(int i) {
        if (this.f16384 != i) {
            this.f16384 = i;
            m9367();
        }
    }

    public void setShowFastForwardButton(boolean z) {
        C5225 c5225 = this.f16399;
        c5225.getClass();
        c5225.setShowFastForwardButton(z);
    }

    @Deprecated
    public void setShowMultiWindowTimeBar(boolean z) {
        C5225 c5225 = this.f16399;
        c5225.getClass();
        c5225.setShowMultiWindowTimeBar(z);
    }

    public void setShowNextButton(boolean z) {
        C5225 c5225 = this.f16399;
        c5225.getClass();
        c5225.setShowNextButton(z);
    }

    public void setShowPlayButtonIfPlaybackIsSuppressed(boolean z) {
        C5225 c5225 = this.f16399;
        c5225.getClass();
        c5225.setShowPlayButtonIfPlaybackIsSuppressed(z);
    }

    public void setShowPreviousButton(boolean z) {
        C5225 c5225 = this.f16399;
        c5225.getClass();
        c5225.setShowPreviousButton(z);
    }

    public void setShowRewindButton(boolean z) {
        C5225 c5225 = this.f16399;
        c5225.getClass();
        c5225.setShowRewindButton(z);
    }

    public void setShowShuffleButton(boolean z) {
        C5225 c5225 = this.f16399;
        c5225.getClass();
        c5225.setShowShuffleButton(z);
    }

    public void setShowSubtitleButton(boolean z) {
        C5225 c5225 = this.f16399;
        c5225.getClass();
        c5225.setShowSubtitleButton(z);
    }

    public void setShowVrButton(boolean z) {
        C5225 c5225 = this.f16399;
        c5225.getClass();
        c5225.setShowVrButton(z);
    }

    public void setShutterBackgroundColor(int i) {
        View view = this.f16409;
        if (view != null) {
            view.setBackgroundColor(i);
        }
    }

    public void setShutterEnabled(boolean z) {
        this.f16382 = z;
    }

    public void setTimeBarScrubbingEnabled(boolean z) {
        C5225 c5225 = this.f16399;
        c5225.getClass();
        c5225.setTimeBarScrubbingEnabled(z);
    }

    @Deprecated
    public void setUseArtwork(boolean z) {
        setArtworkDisplayMode(!z ? 1 : 0);
    }

    public void setUseController(boolean z) {
        boolean z2 = true;
        C5225 c5225 = this.f16399;
        ᵛᵾˏ.ᵿʗᵝʽ((z && c5225 == null) ? false : true);
        if (!z && !hasOnClickListeners()) {
            z2 = false;
        }
        setClickable(z2);
        if (this.f16388 == z) {
            return;
        }
        this.f16388 = z;
        if (m9372()) {
            c5225.setPlayer(this.f16394);
        } else if (c5225 != null) {
            c5225.m10845();
            c5225.setPlayer(null);
        }
        m9375();
    }

    @Override // android.view.View
    public void setVisibility(int i) {
        super.setVisibility(i);
        View view = this.f16408;
        if (view instanceof SurfaceView) {
            view.setVisibility(i);
        }
    }

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public final boolean m9366() {
        return this.f16385;
    }

    /* renamed from: ˌʾˀ, reason: contains not printable characters */
    public abstract void m9367();

    /* renamed from: ˌᵜᵹᵩ, reason: contains not printable characters */
    public final void m9368(boolean z) {
        if (m9372()) {
            int i = z ? 0 : this.f16381;
            C5225 c5225 = this.f16399;
            c5225.setShowTimeoutMs(i);
            C2473 c2473 = c5225.f19559;
            C5225 c52252 = c2473.f9662;
            if (!c52252.m10844()) {
                c52252.setVisibility(0);
                c52252.m10855();
                ImageView imageView = c52252.f19517;
                if (imageView != null) {
                    imageView.requestFocus();
                }
            }
            c2473.m6317();
        }
    }

    /* renamed from: ˎˏʜʾ, reason: contains not printable characters */
    public final void m9369(boolean z) {
        if (!(m9370() && this.f16401) && m9372()) {
            C5225 c5225 = this.f16399;
            boolean z2 = c5225.m10857() && c5225.getShowTimeoutMs() <= 0;
            boolean zM9383 = m9383();
            if (z || z2 || zM9383) {
                m9368(zM9383);
            }
        }
    }

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public final boolean m9370() {
        InterfaceC0304 interfaceC0304 = this.f16394;
        return interfaceC0304 != null && ((C3916) interfaceC0304).m8657(16) && ((C3916) this.f16394).m8632() && ((C3916) this.f16394).m8629();
    }

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public final boolean m9371() {
        InterfaceC0304 interfaceC0304 = this.f16394;
        if (interfaceC0304 == null || this.f16391 == null) {
            return false;
        }
        C3916 c3916 = (C3916) interfaceC0304;
        return c3916.m8657(30) && c3916.m8614().m1885(4);
    }

    /* renamed from: ˑᵱ, reason: contains not printable characters */
    public final boolean m9372() {
        if (!this.f16388) {
            return false;
        }
        this.f16399.getClass();
        return true;
    }

    /* renamed from: ᵝᵵᵺ, reason: contains not printable characters */
    public final void m9373() {
        this.f16405 = true;
    }

    /* JADX WARN: Removed duplicated region for block: B:26:0x0059  */
    /* JADX WARN: Removed duplicated region for block: B:9:0x001f  */
    /* renamed from: ᵞʡ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final void m9374(boolean r10) {
        /*
            Method dump skipped, instructions count: 233
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: defpackage.AbstractC4381.m9374(boolean):void");
    }

    /* renamed from: ᵡʠ, reason: contains not printable characters */
    public final void m9375() {
        C5225 c5225 = this.f16399;
        if (c5225 == null || !this.f16388) {
            setContentDescription(null);
        } else if (c5225.m10857()) {
            setContentDescription(this.f16407 ? getResources().getString(R.string._11_res_0x7f13009b) : null);
        } else {
            setContentDescription(getResources().getString(R.string._11_res_0x7f1300a9));
        }
    }

    /* renamed from: ᵨᵳʝ, reason: contains not printable characters */
    public final void m9376() {
        Drawable drawable;
        AspectRatioFrameLayout aspectRatioFrameLayout;
        ImageView imageView = this.f16377;
        if (imageView == null || (drawable = imageView.getDrawable()) == null) {
            return;
        }
        int intrinsicWidth = drawable.getIntrinsicWidth();
        int intrinsicHeight = drawable.getIntrinsicHeight();
        if (intrinsicWidth <= 0 || intrinsicHeight <= 0) {
            return;
        }
        float width = intrinsicWidth / intrinsicHeight;
        ImageView.ScaleType scaleType = ImageView.ScaleType.FIT_XY;
        if (this.f16380 == 1) {
            width = getWidth() / getHeight();
            scaleType = ImageView.ScaleType.CENTER_CROP;
        }
        if (imageView.getVisibility() == 0 && (aspectRatioFrameLayout = this.f16397) != null) {
            aspectRatioFrameLayout.setAspectRatio(width);
        }
        imageView.setScaleType(scaleType);
    }

    /* renamed from: ᵪʩ, reason: contains not printable characters */
    public final void m9377() {
        if (!m9372() || this.f16394 == null) {
            return;
        }
        C5225 c5225 = this.f16399;
        if (!c5225.m10857()) {
            m9369(true);
        } else if (this.f16407) {
            c5225.m10845();
        }
    }

    /* renamed from: ᵯٴᵦ, reason: contains not printable characters */
    public final void m9378(boolean z) {
        View view = this.f16409;
        if (view == null || view.getVisibility() == 0) {
            return;
        }
        view.setVisibility(0);
        if (!z) {
            view.setAlpha(1.0f);
        } else {
            view.setAlpha(0.0f);
            view.animate().alpha(1.0f).withLayer().setDuration(150L);
        }
    }

    /* renamed from: ᵳٴᵶ, reason: contains not printable characters */
    public final void m9379() {
        C3788 c3788;
        InterfaceC0304 interfaceC0304 = this.f16394;
        if (interfaceC0304 != null) {
            C3916 c3916 = (C3916) interfaceC0304;
            c3916.m8604();
            c3788 = c3916.f14770;
        } else {
            c3788 = C3788.f14146;
        }
        int i = c3788.f14148;
        int i2 = c3788.f14149;
        float f = this.f16398 ? 0.0f : (i2 == 0 || i == 0) ? 0.0f : (i * c3788.f14147) / i2;
        AspectRatioFrameLayout aspectRatioFrameLayout = this.f16397;
        if (aspectRatioFrameLayout != null) {
            aspectRatioFrameLayout.setAspectRatio(f);
        }
    }

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public final void m9380() {
        if (!this.f16382 || this.f16405) {
            return;
        }
        m9378(true);
    }

    /* renamed from: ᵶᵷᵕ, reason: contains not printable characters */
    public final boolean m9381(Drawable drawable) {
        ImageView imageView = this.f16393;
        if (imageView != null && drawable != null) {
            int intrinsicWidth = drawable.getIntrinsicWidth();
            int intrinsicHeight = drawable.getIntrinsicHeight();
            if (intrinsicWidth > 0 && intrinsicHeight > 0) {
                float width = intrinsicWidth / intrinsicHeight;
                ImageView.ScaleType scaleType = ImageView.ScaleType.FIT_XY;
                if (this.f16378 == 2) {
                    width = getWidth() / getHeight();
                    scaleType = ImageView.ScaleType.CENTER_CROP;
                }
                AspectRatioFrameLayout aspectRatioFrameLayout = this.f16397;
                if (aspectRatioFrameLayout != null) {
                    aspectRatioFrameLayout.setAspectRatio(width);
                }
                imageView.setScaleType(scaleType);
                imageView.setImageDrawable(drawable);
                imageView.setVisibility(0);
                return true;
            }
        }
        return false;
    }

    /* renamed from: ᵸʓᵠ, reason: contains not printable characters */
    public final void m9382() {
        TextView textView = this.f16402;
        if (textView != null) {
            CharSequence charSequence = this.f16395;
            if (charSequence != null) {
                textView.setText(charSequence);
                textView.setVisibility(0);
                return;
            }
            InterfaceC0304 interfaceC0304 = this.f16394;
            if (interfaceC0304 != null) {
                C3916 c3916 = (C3916) interfaceC0304;
                c3916.m8604();
                ExoPlaybackException exoPlaybackException = c3916.f14769.f17246;
            }
            textView.setVisibility(8);
        }
    }

    /* renamed from: ᵸˑ, reason: contains not printable characters */
    public final boolean m9383() {
        InterfaceC0304 interfaceC0304 = this.f16394;
        if (interfaceC0304 == null) {
            return true;
        }
        int iM8640 = ((C3916) interfaceC0304).m8640();
        if (!this.f16387) {
            return false;
        }
        if (((C3916) this.f16394).m8657(17) && ((C3916) this.f16394).m8641().m2115()) {
            return false;
        }
        if (iM8640 != 1 && iM8640 != 4) {
            InterfaceC0304 interfaceC03042 = this.f16394;
            interfaceC03042.getClass();
            if (((C3916) interfaceC03042).m8629()) {
                return false;
            }
        }
        return true;
    }

    /* renamed from: ᵹᵝᵶ, reason: contains not printable characters */
    public final void m9384() {
        this.f16385 = false;
    }

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public final void m9385() {
        ImageView imageView = this.f16377;
        if (imageView != null) {
            imageView.setVisibility(4);
        }
        if (imageView != null) {
            imageView.setImageResource(android.R.color.transparent);
        }
    }
}
