122 lines
4.2 KiB
Java
122 lines
4.2 KiB
Java
|
package com.google.firebase.auth.internal;
|
||
|
|
||
|
import android.net.Uri;
|
||
|
import android.os.Parcel;
|
||
|
import android.os.Parcelable;
|
||
|
import android.text.TextUtils;
|
||
|
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.zzaae;
|
||
|
import com.google.android.gms.internal.p002firebaseauthapi.zzqx;
|
||
|
import com.google.android.gms.internal.p002firebaseauthapi.zzzr;
|
||
|
import com.google.firebase.auth.UserInfo;
|
||
|
import com.huawei.hms.support.feature.result.CommonConstant;
|
||
|
import org.json.JSONException;
|
||
|
import org.json.JSONObject;
|
||
|
|
||
|
/* loaded from: classes2.dex */
|
||
|
public final class zzt extends AbstractSafeParcelable implements UserInfo {
|
||
|
public static final Parcelable.Creator<zzt> CREATOR = new zzu();
|
||
|
private final String zza;
|
||
|
private final String zzb;
|
||
|
private final String zzc;
|
||
|
private String zzd;
|
||
|
private Uri zze;
|
||
|
private final String zzf;
|
||
|
private final String zzg;
|
||
|
private final boolean zzh;
|
||
|
private final String zzi;
|
||
|
|
||
|
public zzt(zzzr zzzrVar, String str) {
|
||
|
Preconditions.checkNotNull(zzzrVar);
|
||
|
Preconditions.checkNotEmpty("firebase");
|
||
|
this.zza = Preconditions.checkNotEmpty(zzzrVar.zzo());
|
||
|
this.zzb = "firebase";
|
||
|
this.zzf = zzzrVar.zzn();
|
||
|
this.zzc = zzzrVar.zzm();
|
||
|
Uri zzc = zzzrVar.zzc();
|
||
|
if (zzc != null) {
|
||
|
this.zzd = zzc.toString();
|
||
|
this.zze = zzc;
|
||
|
}
|
||
|
this.zzh = zzzrVar.zzs();
|
||
|
this.zzi = null;
|
||
|
this.zzg = zzzrVar.zzp();
|
||
|
}
|
||
|
|
||
|
@Override // android.os.Parcelable
|
||
|
public final void writeToParcel(Parcel parcel, int i) {
|
||
|
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
|
||
|
SafeParcelWriter.writeString(parcel, 1, this.zza, false);
|
||
|
SafeParcelWriter.writeString(parcel, 2, this.zzb, false);
|
||
|
SafeParcelWriter.writeString(parcel, 3, this.zzc, false);
|
||
|
SafeParcelWriter.writeString(parcel, 4, this.zzd, false);
|
||
|
SafeParcelWriter.writeString(parcel, 5, this.zzf, false);
|
||
|
SafeParcelWriter.writeString(parcel, 6, this.zzg, false);
|
||
|
SafeParcelWriter.writeBoolean(parcel, 7, this.zzh);
|
||
|
SafeParcelWriter.writeString(parcel, 8, this.zzi, false);
|
||
|
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
|
||
|
}
|
||
|
|
||
|
public final String zzb() {
|
||
|
JSONObject jSONObject = new JSONObject();
|
||
|
try {
|
||
|
jSONObject.putOpt("userId", this.zza);
|
||
|
jSONObject.putOpt("providerId", this.zzb);
|
||
|
jSONObject.putOpt(CommonConstant.KEY_DISPLAY_NAME, this.zzc);
|
||
|
jSONObject.putOpt("photoUrl", this.zzd);
|
||
|
jSONObject.putOpt("email", this.zzf);
|
||
|
jSONObject.putOpt("phoneNumber", this.zzg);
|
||
|
jSONObject.putOpt("isEmailVerified", Boolean.valueOf(this.zzh));
|
||
|
jSONObject.putOpt("rawUserInfo", this.zzi);
|
||
|
return jSONObject.toString();
|
||
|
} catch (JSONException e) {
|
||
|
throw new zzqx(e);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public zzt(zzaae zzaaeVar) {
|
||
|
Preconditions.checkNotNull(zzaaeVar);
|
||
|
this.zza = zzaaeVar.zzd();
|
||
|
this.zzb = Preconditions.checkNotEmpty(zzaaeVar.zzf());
|
||
|
this.zzc = zzaaeVar.zzb();
|
||
|
Uri zza = zzaaeVar.zza();
|
||
|
if (zza != null) {
|
||
|
this.zzd = zza.toString();
|
||
|
this.zze = zza;
|
||
|
}
|
||
|
this.zzf = zzaaeVar.zzc();
|
||
|
this.zzg = zzaaeVar.zze();
|
||
|
this.zzh = false;
|
||
|
this.zzi = zzaaeVar.zzg();
|
||
|
}
|
||
|
|
||
|
public zzt(String str, String str2, String str3, String str4, String str5, String str6, boolean z, String str7) {
|
||
|
this.zza = str;
|
||
|
this.zzb = str2;
|
||
|
this.zzf = str3;
|
||
|
this.zzg = str4;
|
||
|
this.zzc = str5;
|
||
|
this.zzd = str6;
|
||
|
if (!TextUtils.isEmpty(str6)) {
|
||
|
this.zze = Uri.parse(this.zzd);
|
||
|
}
|
||
|
this.zzh = z;
|
||
|
this.zzi = str7;
|
||
|
}
|
||
|
|
||
|
public final String zza() {
|
||
|
return this.zzi;
|
||
|
}
|
||
|
|
||
|
public final String getUid() {
|
||
|
return this.zza;
|
||
|
}
|
||
|
|
||
|
@Override // com.google.firebase.auth.UserInfo
|
||
|
public final String getProviderId() {
|
||
|
return this.zzb;
|
||
|
}
|
||
|
}
|