package com.google.android.gms.internal.p002firebaseauthapi; import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager; import java.io.IOException; @Deprecated /* loaded from: classes.dex */ final class zzjw implements zzcb { private final SharedPreferences.Editor zza; private final String zzb; public zzjw(Context context, String str, String str2) { if (str == null) { throw new IllegalArgumentException("keysetName cannot be null"); } this.zzb = str; Context applicationContext = context.getApplicationContext(); if (str2 == null) { this.zza = PreferenceManager.getDefaultSharedPreferences(applicationContext).edit(); } else { this.zza = applicationContext.getSharedPreferences(str2, 0).edit(); } } @Override // com.google.android.gms.internal.p002firebaseauthapi.zzcb public final void zzb(zzry zzryVar) { if (!this.zza.putString(this.zzb, zzvy.zza(zzryVar.zzq())).commit()) { throw new IOException("Failed to write to SharedPreferences"); } } @Override // com.google.android.gms.internal.p002firebaseauthapi.zzcb public final void zzc(zztp zztpVar) { if (!this.zza.putString(this.zzb, zzvy.zza(zztpVar.zzq())).commit()) { throw new IOException("Failed to write to SharedPreferences"); } } }