68 lines
2.3 KiB
Java
68 lines
2.3 KiB
Java
|
package com.google.firebase.auth;
|
||
|
|
||
|
import android.os.Parcel;
|
||
|
import android.os.Parcelable;
|
||
|
import com.google.android.gms.common.internal.Preconditions;
|
||
|
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
|
||
|
import com.google.android.gms.internal.p002firebaseauthapi.zzqx;
|
||
|
import com.huawei.hms.support.feature.result.CommonConstant;
|
||
|
import org.json.JSONException;
|
||
|
import org.json.JSONObject;
|
||
|
|
||
|
/* loaded from: classes2.dex */
|
||
|
public class PhoneMultiFactorInfo extends MultiFactorInfo {
|
||
|
public static final Parcelable.Creator<PhoneMultiFactorInfo> CREATOR = new zzai();
|
||
|
private final String zza;
|
||
|
private final String zzb;
|
||
|
private final long zzc;
|
||
|
private final String zzd;
|
||
|
|
||
|
public PhoneMultiFactorInfo(String str, String str2, long j, String str3) {
|
||
|
this.zza = Preconditions.checkNotEmpty(str);
|
||
|
this.zzb = str2;
|
||
|
this.zzc = j;
|
||
|
this.zzd = Preconditions.checkNotEmpty(str3);
|
||
|
}
|
||
|
|
||
|
@Override // com.google.firebase.auth.MultiFactorInfo
|
||
|
public JSONObject toJson() {
|
||
|
JSONObject jSONObject = new JSONObject();
|
||
|
try {
|
||
|
jSONObject.putOpt("factorIdKey", "phone");
|
||
|
jSONObject.putOpt(CommonConstant.KEY_UID, this.zza);
|
||
|
jSONObject.putOpt(CommonConstant.KEY_DISPLAY_NAME, this.zzb);
|
||
|
jSONObject.putOpt("enrollmentTimestamp", Long.valueOf(this.zzc));
|
||
|
jSONObject.putOpt("phoneNumber", this.zzd);
|
||
|
return jSONObject;
|
||
|
} catch (JSONException e) {
|
||
|
throw new zzqx(e);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // android.os.Parcelable
|
||
|
public void writeToParcel(Parcel parcel, int i) {
|
||
|
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
|
||
|
SafeParcelWriter.writeString(parcel, 1, getUid(), false);
|
||
|
SafeParcelWriter.writeString(parcel, 2, getDisplayName(), false);
|
||
|
SafeParcelWriter.writeLong(parcel, 3, getEnrollmentTimestamp());
|
||
|
SafeParcelWriter.writeString(parcel, 4, getPhoneNumber(), false);
|
||
|
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
|
||
|
}
|
||
|
|
||
|
public String getUid() {
|
||
|
return this.zza;
|
||
|
}
|
||
|
|
||
|
public String getPhoneNumber() {
|
||
|
return this.zzd;
|
||
|
}
|
||
|
|
||
|
public long getEnrollmentTimestamp() {
|
||
|
return this.zzc;
|
||
|
}
|
||
|
|
||
|
public String getDisplayName() {
|
||
|
return this.zzb;
|
||
|
}
|
||
|
}
|