package androidx.biometric;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.os.Handler;
import android.util.Log;
import android.widget.TextView;
import androidx.biometric.y;
import androidx.media3.exoplayer.ExoPlayer;
import com.strmr.ps.R;
import defpackage.sf1;
import defpackage.zs6;

/* JADX INFO: loaded from: classes.dex */
class aa implements zs6<Integer> {
    public final /* synthetic */ y a;

    public aa(y yVar) {
        this.a = yVar;
    }

    @Override // defpackage.zs6
    public final void a(Object obj) {
        Integer num = (Integer) obj;
        y yVar = this.a;
        Handler handler = yVar.a;
        Runnable runnable = yVar.b;
        handler.removeCallbacks(runnable);
        int iIntValue = num.intValue();
        if (yVar.f != null) {
            int i = yVar.c.n;
            Context context = yVar.getContext();
            Drawable drawable = null;
            if (context == null) {
                Log.w("FingerprintFragment", "Unable to get asset. Context is null.");
            } else {
                int i2 = R.drawable.fingerprint_dialog_fp_icon;
                if (i == 0 && iIntValue == 1) {
                    drawable = sf1.getDrawable(context, i2);
                } else {
                    if (i == 1 && iIntValue == 2) {
                        i2 = R.drawable.fingerprint_dialog_error;
                    } else if ((i == 2 && iIntValue == 1) || (i == 1 && iIntValue == 3)) {
                    }
                    drawable = sf1.getDrawable(context, i2);
                }
            }
            if (drawable != null) {
                yVar.f.setImageDrawable(drawable);
                if ((i != 0 || iIntValue != 1) && ((i == 1 && iIntValue == 2) || (i == 2 && iIntValue == 1))) {
                    y.b.a(drawable);
                }
                yVar.c.n = iIntValue;
            }
        }
        int iIntValue2 = num.intValue();
        TextView textView = yVar.i;
        if (textView != null) {
            textView.setTextColor(iIntValue2 == 2 ? yVar.d : yVar.e);
        }
        yVar.a.postDelayed(runnable, ExoPlayer.DEFAULT_DETACH_SURFACE_TIMEOUT_MS);
    }
}
