package androidx.recyclerview.widget;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.widget.EditText;
import com.google.android.material.search.SearchBar;

/* JADX INFO: loaded from: classes.dex */
public final class u extends AnimatorListenerAdapter {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ int f3906a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public boolean f3907b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final /* synthetic */ Object f3908c;

    public u(com.google.android.material.search.e eVar, boolean z10) {
        this.f3906a = 1;
        this.f3908c = eVar;
        this.f3907b = z10;
    }

    @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
    public final void onAnimationCancel(Animator animator) {
        switch (this.f3906a) {
            case 0:
                this.f3907b = true;
                break;
            default:
                super.onAnimationCancel(animator);
                break;
        }
    }

    @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
    public final void onAnimationEnd(Animator animator) {
        int i10 = this.f3906a;
        Object obj = this.f3908c;
        switch (i10) {
            case 0:
                if (!this.f3907b) {
                    w wVar = (w) obj;
                    if (((Float) wVar.f3941z.getAnimatedValue()).floatValue() != 0.0f) {
                        wVar.A = 2;
                        wVar.f3934s.invalidate();
                    } else {
                        wVar.A = 0;
                        wVar.i(0);
                    }
                } else {
                    this.f3907b = false;
                }
                break;
            default:
                com.google.android.material.search.e eVar = (com.google.android.material.search.e) obj;
                com.google.android.material.search.e.a(eVar, this.f3907b ? 1.0f : 0.0f);
                EditText editText = eVar.f23033j;
                editText.setAlpha(1.0f);
                SearchBar searchBar = eVar.f23038o;
                if (searchBar != null) {
                    searchBar.getTextView().setAlpha(1.0f);
                }
                editText.setClipBounds(null);
                eVar.f23026c.a();
                if (!this.f3907b) {
                    eVar.f23037n.b();
                }
                break;
        }
    }

    @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
    public final void onAnimationStart(Animator animator) {
        switch (this.f3906a) {
            case 1:
                com.google.android.material.search.e.a((com.google.android.material.search.e) this.f3908c, this.f3907b ? 0.0f : 1.0f);
                break;
            default:
                super.onAnimationStart(animator);
                break;
        }
    }

    public u(w wVar) {
        this.f3906a = 0;
        this.f3908c = wVar;
        this.f3907b = false;
    }
}
