package a4; import android.util.Log; import com.google.android.gms.common.internal.Preconditions; import com.google.android.gms.internal.p002firebaseauthapi.zzaas; import com.google.android.gms.tasks.Continuation; import com.google.android.gms.tasks.Task; import com.google.android.recaptcha.RecaptchaAction; /* loaded from: classes2.dex */ final class y implements Continuation { /* renamed from: a, reason: collision with root package name */ final /* synthetic */ String f146a; /* renamed from: b, reason: collision with root package name */ final /* synthetic */ f0 f147b; /* renamed from: c, reason: collision with root package name */ final /* synthetic */ RecaptchaAction f148c; /* renamed from: d, reason: collision with root package name */ final /* synthetic */ Continuation f149d; y(String str, f0 f0Var, RecaptchaAction recaptchaAction, Continuation continuation) { this.f146a = str; this.f147b = f0Var; this.f148c = recaptchaAction; this.f149d = continuation; } @Override // com.google.android.gms.tasks.Continuation public final /* bridge */ /* synthetic */ Object then(Task task) { if (task.isSuccessful()) { return task; } Exception exc = (Exception) Preconditions.checkNotNull(task.getException()); int i10 = zzaas.zzb; if (!(exc instanceof com.google.firebase.auth.k) || !((com.google.firebase.auth.k) exc).a().endsWith("INVALID_RECAPTCHA_TOKEN")) { return task; } if (Log.isLoggable("RecaptchaCallWrapper", 4)) { Log.i("RecaptchaCallWrapper", "Invalid token - Refreshing Recaptcha Enterprise config and fetching new token for tenant ".concat(String.valueOf(this.f146a))); } return this.f147b.a(this.f146a, Boolean.TRUE, this.f148c).continueWithTask(this.f149d); } }