package com.google.android.gms.flags.impl; import android.content.Context; import android.content.SharedPreferences; import android.content.pm.PackageManager; import com.google.android.gms.dynamic.IObjectWrapper; import com.google.android.gms.dynamic.ObjectWrapper; /* loaded from: classes2.dex */ public class FlagProviderImpl extends com.google.android.gms.flags.zzd { private boolean zzu = false; private SharedPreferences zzv; @Override // com.google.android.gms.flags.zzc public void init(IObjectWrapper iObjectWrapper) { Context context = (Context) ObjectWrapper.unwrap(iObjectWrapper); if (this.zzu) { return; } try { this.zzv = zzj.zza(context.createPackageContext("com.google.android.gms", 0)); this.zzu = true; } catch (PackageManager.NameNotFoundException unused) { } catch (Exception e) { e.getMessage(); } } @Override // com.google.android.gms.flags.zzc public boolean getBooleanFlagValue(String str, boolean z, int i) { return !this.zzu ? z : zzb.zza(this.zzv, str, Boolean.valueOf(z)).booleanValue(); } @Override // com.google.android.gms.flags.zzc public int getIntFlagValue(String str, int i, int i2) { return !this.zzu ? i : zzd.zza(this.zzv, str, Integer.valueOf(i)).intValue(); } @Override // com.google.android.gms.flags.zzc public long getLongFlagValue(String str, long j, int i) { return !this.zzu ? j : zzf.zza(this.zzv, str, Long.valueOf(j)).longValue(); } @Override // com.google.android.gms.flags.zzc public String getStringFlagValue(String str, String str2, int i) { return !this.zzu ? str2 : zzh.zza(this.zzv, str, str2); } }