package a4; import android.net.Uri; import android.os.Parcel; import android.os.Parcelable; import android.text.TextUtils; import android.util.Log; import com.google.android.gms.common.Scopes; import com.google.android.gms.common.internal.Preconditions; import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter; import com.google.android.gms.internal.p002firebaseauthapi.zzadl; import com.google.android.gms.internal.p002firebaseauthapi.zzadz; import com.google.android.gms.internal.p002firebaseauthapi.zzwk; import org.json.JSONException; import org.json.JSONObject; /* loaded from: classes2.dex */ public final class a1 extends AbstractSafeParcelable implements com.google.firebase.auth.o0 { public static final Parcelable.Creator CREATOR = new b1(); /* renamed from: a, reason: collision with root package name */ private final String f40a; /* renamed from: b, reason: collision with root package name */ private final String f41b; /* renamed from: c, reason: collision with root package name */ private final String f42c; /* renamed from: d, reason: collision with root package name */ private String f43d; /* renamed from: e, reason: collision with root package name */ private Uri f44e; /* renamed from: f, reason: collision with root package name */ private final String f45f; /* renamed from: g, reason: collision with root package name */ private final String f46g; /* renamed from: h, reason: collision with root package name */ private final boolean f47h; /* renamed from: i, reason: collision with root package name */ private final String f48i; public a1(zzadl zzadlVar, String str) { Preconditions.checkNotNull(zzadlVar); Preconditions.checkNotEmpty("firebase"); this.f40a = Preconditions.checkNotEmpty(zzadlVar.zzo()); this.f41b = "firebase"; this.f45f = zzadlVar.zzn(); this.f42c = zzadlVar.zzm(); Uri zzc = zzadlVar.zzc(); if (zzc != null) { this.f43d = zzc.toString(); this.f44e = zzc; } this.f47h = zzadlVar.zzs(); this.f48i = null; this.f46g = zzadlVar.zzp(); } @Override // com.google.firebase.auth.o0 public final String I() { return this.f41b; } public final String P() { return this.f40a; } public final String getEmail() { return this.f45f; } @Override // android.os.Parcelable public final void writeToParcel(Parcel parcel, int i10) { int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel); SafeParcelWriter.writeString(parcel, 1, this.f40a, false); SafeParcelWriter.writeString(parcel, 2, this.f41b, false); SafeParcelWriter.writeString(parcel, 3, this.f42c, false); SafeParcelWriter.writeString(parcel, 4, this.f43d, false); SafeParcelWriter.writeString(parcel, 5, this.f45f, false); SafeParcelWriter.writeString(parcel, 6, this.f46g, false); SafeParcelWriter.writeBoolean(parcel, 7, this.f47h); SafeParcelWriter.writeString(parcel, 8, this.f48i, false); SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader); } public final String zza() { return this.f48i; } public final String zzb() { JSONObject jSONObject = new JSONObject(); try { jSONObject.putOpt("userId", this.f40a); jSONObject.putOpt("providerId", this.f41b); jSONObject.putOpt("displayName", this.f42c); jSONObject.putOpt("photoUrl", this.f43d); jSONObject.putOpt(Scopes.EMAIL, this.f45f); jSONObject.putOpt("phoneNumber", this.f46g); jSONObject.putOpt("isEmailVerified", Boolean.valueOf(this.f47h)); jSONObject.putOpt("rawUserInfo", this.f48i); return jSONObject.toString(); } catch (JSONException e10) { Log.d("DefaultAuthUserInfo", "Failed to jsonify this object"); throw new zzwk(e10); } } public a1(zzadz zzadzVar) { Preconditions.checkNotNull(zzadzVar); this.f40a = zzadzVar.zzd(); this.f41b = Preconditions.checkNotEmpty(zzadzVar.zzf()); this.f42c = zzadzVar.zzb(); Uri zza = zzadzVar.zza(); if (zza != null) { this.f43d = zza.toString(); this.f44e = zza; } this.f45f = zzadzVar.zzc(); this.f46g = zzadzVar.zze(); this.f47h = false; this.f48i = zzadzVar.zzg(); } public a1(String str, String str2, String str3, String str4, String str5, String str6, boolean z10, String str7) { this.f40a = str; this.f41b = str2; this.f45f = str3; this.f46g = str4; this.f42c = str5; this.f43d = str6; if (!TextUtils.isEmpty(str6)) { this.f44e = Uri.parse(this.f43d); } this.f47h = z10; this.f48i = str7; } }