package com.google.android.gms.internal.p001authapiphone; import android.app.Activity; import android.content.Context; import com.google.android.gms.auth.api.phone.SmsCodeAutofillClient; import com.google.android.gms.common.api.Api; import com.google.android.gms.common.api.GoogleApi; import com.google.android.gms.common.api.internal.RemoteCall; import com.google.android.gms.common.api.internal.TaskApiCall; import com.google.android.gms.common.internal.Preconditions; import com.google.android.gms.tasks.Task; import com.google.android.gms.tasks.TaskCompletionSource; /* loaded from: classes2.dex */ public final class zzn extends GoogleApi implements SmsCodeAutofillClient { private static final Api.ClientKey zza; private static final Api.AbstractClientBuilder zzb; private static final Api zzc; public zzn(Context context) { super(context, zzc, (Api.ApiOptions) null, GoogleApi.Settings.DEFAULT_SETTINGS); } public zzn(Activity activity) { super(activity, (Api) zzc, (Api.ApiOptions) null, GoogleApi.Settings.DEFAULT_SETTINGS); } @Override // com.google.android.gms.auth.api.phone.SmsCodeAutofillClient public final Task startSmsCodeRetriever() { return doWrite(TaskApiCall.builder().setFeatures(zzaa.zza).run(new RemoteCall(this) { // from class: com.google.android.gms.internal.auth-api-phone.zzm private final zzn zza; @Override // com.google.android.gms.common.api.internal.RemoteCall public final void accept(Object obj, Object obj2) { ((zzj) ((zzv) obj).getService()).zza(new zzq(this.zza, (TaskCompletionSource) obj2)); } /* JADX INFO: Access modifiers changed from: package-private */ { this.zza = this; } }).build()); } @Override // com.google.android.gms.auth.api.phone.SmsCodeAutofillClient public final Task checkPermissionState() { return doRead(TaskApiCall.builder().setFeatures(zzaa.zza).run(new RemoteCall(this) { // from class: com.google.android.gms.internal.auth-api-phone.zzp private final zzn zza; @Override // com.google.android.gms.common.api.internal.RemoteCall public final void accept(Object obj, Object obj2) { ((zzj) ((zzv) obj).getService()).zza(new zzt(this.zza, (TaskCompletionSource) obj2)); } /* JADX INFO: Access modifiers changed from: package-private */ { this.zza = this; } }).build()); } @Override // com.google.android.gms.auth.api.phone.SmsCodeAutofillClient public final Task hasOngoingSmsRequest(final String str) { Preconditions.checkNotNull(str); Preconditions.checkArgument(!str.isEmpty(), "The package name cannot be empty."); return doRead(TaskApiCall.builder().setFeatures(zzaa.zza).run(new RemoteCall(this, str) { // from class: com.google.android.gms.internal.auth-api-phone.zzo private final zzn zza; private final String zzb; @Override // com.google.android.gms.common.api.internal.RemoteCall public final void accept(Object obj, Object obj2) { zzn zznVar = this.zza; ((zzj) ((zzv) obj).getService()).zza(this.zzb, new zzs(zznVar, (TaskCompletionSource) obj2)); } /* JADX INFO: Access modifiers changed from: package-private */ { this.zza = this; this.zzb = str; } }).build()); } static { Api.ClientKey clientKey = new Api.ClientKey<>(); zza = clientKey; zzr zzrVar = new zzr(); zzb = zzrVar; zzc = new Api<>("SmsCodeAutofill.API", zzrVar, clientKey); } }