package androidx.leanback.widget;

import android.content.Context;
import android.content.res.Resources;
import android.util.AttributeSet;
import android.view.View;
import ar.tvplayer.tv.R;
import defpackage.C3685;

/* loaded from: classes3.dex */
public class SpeechOrbView extends SearchOrbView {

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

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

    /* renamed from: ˊᵸˊ, reason: contains not printable characters */
    public C3685 f493;

    /* renamed from: ˑᵝﹳᵜ, reason: contains not printable characters */
    public final float f494;

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

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

    public SpeechOrbView(Context context, AttributeSet attributeSet) {
        this(context, attributeSet, 0);
    }

    public SpeechOrbView(Context context, AttributeSet attributeSet, int i) {
        super(context, attributeSet, i);
        this.f492 = 0;
        this.f495 = false;
        Resources resources = context.getResources();
        this.f494 = resources.getFraction(R.fraction._11_res_0x7f0a0006, 1, 1);
        this.f491 = new C3685(resources.getColor(R.color._11_res_0x7f0600f8), resources.getColor(R.color._11_res_0x7f0600fa), resources.getColor(R.color._11_res_0x7f0600f9));
        this.f493 = new C3685(resources.getColor(R.color._11_res_0x7f0600fb), resources.getColor(R.color._11_res_0x7f0600fb), 0);
        m341();
    }

    @Override // androidx.leanback.widget.SearchOrbView
    public int getLayoutResourceId() {
        return R.layout.lb_speech_orb;
    }

    public void setListeningOrbColors(C3685 c3685) {
        this.f493 = c3685;
    }

    public void setNotListeningOrbColors(C3685 c3685) {
        this.f491 = c3685;
    }

    public void setSoundLevel(int i) {
        if (this.f495) {
            int i2 = this.f492;
            if (i > i2) {
                this.f492 = ((i - i2) / 2) + i2;
            } else {
                this.f492 = (int) (i2 * 0.7f);
            }
            float focusedZoom = (((this.f494 - getFocusedZoom()) * this.f492) / 100.0f) + 1.0f;
            View view = this.f489;
            view.setScaleX(focusedZoom);
            view.setScaleY(focusedZoom);
        }
    }

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public final void m341() {
        setOrbColors(this.f491);
        setOrbIcon(getResources().getDrawable(R.drawable._11_res_0x7f080195));
        m339(hasFocus());
        View view = this.f489;
        view.setScaleX(1.0f);
        view.setScaleY(1.0f);
        this.f495 = false;
    }
}
