package com.google.android.gms.internal.measurement; import android.content.Context; import android.database.ContentObserver; import android.util.Log; import o.C17730zKa; /* JADX INFO: Access modifiers changed from: package-private */ /* loaded from: classes.dex */ public final class zzhh implements zzhe { private static zzhh zza; private final Context zzb; private final ContentObserver zzc; private zzhh(Context context) { this.zzb = context; zzhg zzhgVar = new zzhg(this, null); this.zzc = zzhgVar; context.getContentResolver().registerContentObserver(zzgv.zza, true, zzhgVar); } /* JADX INFO: Access modifiers changed from: package-private */ public static zzhh zza(Context context) { zzhh zzhhVar; synchronized (zzhh.class) { if (zza == null) { zza = C17730zKa.b(context, "com.google.android.providers.gsf.permission.READ_GSERVICES") == 0 ? new zzhh(context) : new zzhh(); } zzhhVar = zza; } return zzhhVar; } /* JADX INFO: Access modifiers changed from: package-private */ public static void zze() { Context context; synchronized (zzhh.class) { zzhh zzhhVar = zza; if (zzhhVar != null && (context = zzhhVar.zzb) != null && zzhhVar.zzc != null) { context.getContentResolver().unregisterContentObserver(zza.zzc); } zza = null; } } @Override // com.google.android.gms.internal.measurement.zzhe /* renamed from: zzc, reason: merged with bridge method [inline-methods] */ public final String zzb(final String str) { if (this.zzb == null) { return null; } try { return (String) zzhc.zza(new zzhd(this, str) { // from class: com.google.android.gms.internal.measurement.zzhf public final zzhh zza; public final String zzb; @Override // com.google.android.gms.internal.measurement.zzhd public final Object zza() { return this.zza.zzd(this.zzb); } { this.zza = this; this.zzb = str; } }); } catch (IllegalStateException | NullPointerException | SecurityException e) { String valueOf = String.valueOf(str); Log.e("GservicesLoader", valueOf.length() != 0 ? "Unable to read GServices for: ".concat(valueOf) : new String("Unable to read GServices for: "), e); return null; } } /* JADX INFO: Access modifiers changed from: package-private */ public final /* synthetic */ String zzd(String str) { return zzgv.zza(this.zzb.getContentResolver(), str, null); } private zzhh() { this.zzb = null; this.zzc = null; } }