package androidx.appcompat.widget;

import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.ActionMode;
import android.view.MotionEvent;
import android.view.View;
import android.widget.FrameLayout;
import ar.tvplayer.tv.R;
import defpackage.AbstractC0430;
import defpackage.AbstractC4118;
import defpackage.C1592;

/* JADX INFO: loaded from: classes3.dex */
public class ActionBarContainer extends FrameLayout {

    /* JADX INFO: renamed from: ˈᵲᵢ, reason: contains not printable characters */
    public final boolean f70;

    /* JADX INFO: renamed from: ˌᴵ, reason: contains not printable characters */
    public boolean f71;

    /* JADX INFO: renamed from: ˌᵨʠᵫ, reason: contains not printable characters */
    public boolean f72;

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public View f73;

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public View f74;

    /* JADX INFO: renamed from: ᵨᵼⁱ, reason: contains not printable characters */
    public Drawable f75;

    /* JADX INFO: renamed from: ᵯᵷʽ, reason: contains not printable characters */
    public Drawable f76;

    /* JADX INFO: renamed from: ᵶˇᵱ, reason: contains not printable characters */
    public Drawable f77;

    /* JADX INFO: renamed from: ᵸˆˁ, reason: contains not printable characters */
    public final int f78;

    public ActionBarContainer(Context context) {
        this(context, null);
    }

    public ActionBarContainer(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
        setBackground(new C1592(this));
        TypedArray typedArrayObtainStyledAttributes = context.obtainStyledAttributes(attributeSet, AbstractC0430.f2397);
        boolean z = false;
        this.f75 = typedArrayObtainStyledAttributes.getDrawable(0);
        this.f76 = typedArrayObtainStyledAttributes.getDrawable(2);
        this.f78 = typedArrayObtainStyledAttributes.getDimensionPixelSize(13, -1);
        if (getId() == R.id._2ge_res_0x7f0b0379) {
            this.f70 = true;
            this.f77 = typedArrayObtainStyledAttributes.getDrawable(1);
        }
        typedArrayObtainStyledAttributes.recycle();
        if (!this.f70 ? !(this.f75 != null || this.f76 != null) : this.f77 == null) {
            z = true;
        }
        setWillNotDraw(z);
    }

    @Override // android.view.ViewGroup, android.view.View
    public final void drawableStateChanged() {
        super.drawableStateChanged();
        Drawable drawable = this.f75;
        if (drawable != null && drawable.isStateful()) {
            this.f75.setState(getDrawableState());
        }
        Drawable drawable2 = this.f76;
        if (drawable2 != null && drawable2.isStateful()) {
            this.f76.setState(getDrawableState());
        }
        Drawable drawable3 = this.f77;
        if (drawable3 == null || !drawable3.isStateful()) {
            return;
        }
        this.f77.setState(getDrawableState());
    }

    public View getTabContainer() {
        return null;
    }

    @Override // android.view.ViewGroup, android.view.View
    public final void jumpDrawablesToCurrentState() {
        super.jumpDrawablesToCurrentState();
        Drawable drawable = this.f75;
        if (drawable != null) {
            drawable.jumpToCurrentState();
        }
        Drawable drawable2 = this.f76;
        if (drawable2 != null) {
            drawable2.jumpToCurrentState();
        }
        Drawable drawable3 = this.f77;
        if (drawable3 != null) {
            drawable3.jumpToCurrentState();
        }
    }

    @Override // android.view.View
    public final void onFinishInflate() {
        super.onFinishInflate();
        this.f74 = findViewById(R.id.t4);
        this.f73 = findViewById(R.id._131_res_0x7f0b0043);
    }

    @Override // android.view.View
    public final boolean onHoverEvent(MotionEvent motionEvent) {
        super.onHoverEvent(motionEvent);
        return true;
    }

    @Override // android.view.ViewGroup
    public final boolean onInterceptTouchEvent(MotionEvent motionEvent) {
        return this.f71 || super.onInterceptTouchEvent(motionEvent);
    }

    @Override // android.widget.FrameLayout, android.view.ViewGroup, android.view.View
    public final void onLayout(boolean z, int i, int i2, int i3, int i4) {
        View view;
        super.onLayout(z, i, i2, i3, i4);
        boolean z2 = true;
        if (this.f70) {
            Drawable drawable = this.f77;
            if (drawable != null) {
                drawable.setBounds(0, 0, getMeasuredWidth(), getMeasuredHeight());
            } else {
                z2 = false;
            }
        } else {
            if (this.f75 == null) {
                z2 = false;
            } else if (this.f74.getVisibility() == 0 || ((view = this.f73) != null && view.getVisibility() == 0)) {
                this.f75.setBounds(0, 0, getMeasuredWidth(), getMeasuredHeight());
            } else {
                this.f75.setBounds(0, 0, 0, 0);
            }
            this.f72 = false;
        }
        if (z2) {
            invalidate();
        }
    }

    @Override // android.widget.FrameLayout, android.view.View
    public final void onMeasure(int i, int i2) {
        int i3;
        if (this.f74 == null && View.MeasureSpec.getMode(i2) == Integer.MIN_VALUE && (i3 = this.f78) >= 0) {
            i2 = View.MeasureSpec.makeMeasureSpec(Math.min(i3, View.MeasureSpec.getSize(i2)), Integer.MIN_VALUE);
        }
        super.onMeasure(i, i2);
        if (this.f74 == null) {
            return;
        }
        View.MeasureSpec.getMode(i2);
    }

    @Override // android.view.View
    public final boolean onTouchEvent(MotionEvent motionEvent) {
        super.onTouchEvent(motionEvent);
        return true;
    }

    public void setPrimaryBackground(Drawable drawable) {
        Drawable drawable2 = this.f75;
        if (drawable2 != null) {
            drawable2.setCallback(null);
            unscheduleDrawable(this.f75);
        }
        this.f75 = drawable;
        boolean z = false;
        if (drawable != null) {
            drawable.setCallback(this);
            if (this.f74 != null) {
                drawable.setBounds(0, 0, getMeasuredWidth(), getMeasuredHeight());
            }
        }
        if (!this.f70 ? !(this.f75 != null || this.f76 != null) : this.f77 == null) {
            z = true;
        }
        setWillNotDraw(z);
        invalidate();
        invalidateOutline();
    }

    public void setSplitBackground(Drawable drawable) {
        Drawable drawable2;
        Drawable drawable3 = this.f77;
        if (drawable3 != null) {
            drawable3.setCallback(null);
            unscheduleDrawable(this.f77);
        }
        this.f77 = drawable;
        boolean z = this.f70;
        boolean z2 = false;
        if (drawable != null) {
            drawable.setCallback(this);
            if (z && (drawable2 = this.f77) != null) {
                drawable2.setBounds(0, 0, getMeasuredWidth(), getMeasuredHeight());
            }
        }
        if (!z ? !(this.f75 != null || this.f76 != null) : this.f77 == null) {
            z2 = true;
        }
        setWillNotDraw(z2);
        invalidate();
        invalidateOutline();
    }

    public void setStackedBackground(Drawable drawable) {
        Drawable drawable2 = this.f76;
        if (drawable2 != null) {
            drawable2.setCallback(null);
            unscheduleDrawable(this.f76);
        }
        this.f76 = drawable;
        if (drawable != null) {
            drawable.setCallback(this);
            if (this.f72 && this.f76 != null) {
                throw null;
            }
        }
        boolean z = false;
        if (!this.f70 ? !(this.f75 != null || this.f76 != null) : this.f77 == null) {
            z = true;
        }
        setWillNotDraw(z);
        invalidate();
        invalidateOutline();
    }

    public void setTabContainer(AbstractC4118 abstractC4118) {
    }

    public void setTransitioning(boolean z) {
        this.f71 = z;
        setDescendantFocusability(z ? 393216 : 262144);
    }

    @Override // android.view.View
    public void setVisibility(int i) {
        super.setVisibility(i);
        boolean z = i == 0;
        Drawable drawable = this.f75;
        if (drawable != null) {
            drawable.setVisible(z, false);
        }
        Drawable drawable2 = this.f76;
        if (drawable2 != null) {
            drawable2.setVisible(z, false);
        }
        Drawable drawable3 = this.f77;
        if (drawable3 != null) {
            drawable3.setVisible(z, false);
        }
    }

    @Override // android.view.ViewGroup, android.view.ViewParent
    public final ActionMode startActionModeForChild(View view, ActionMode.Callback callback) {
        return null;
    }

    @Override // android.view.ViewGroup, android.view.ViewParent
    public final ActionMode startActionModeForChild(View view, ActionMode.Callback callback, int i) {
        if (i != 0) {
            return super.startActionModeForChild(view, callback, i);
        }
        return null;
    }

    @Override // android.view.View
    public final boolean verifyDrawable(Drawable drawable) {
        Drawable drawable2 = this.f75;
        boolean z = this.f70;
        if (drawable == drawable2 && !z) {
            return true;
        }
        if (drawable == this.f76 && this.f72) {
            return true;
        }
        return (drawable == this.f77 && z) || super.verifyDrawable(drawable);
    }
}
