- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
46 lines
1.3 KiB
Java
46 lines
1.3 KiB
Java
package com.google.android.gms.measurement.internal;
|
|
|
|
import android.content.Context;
|
|
import android.content.res.Resources;
|
|
import android.text.TextUtils;
|
|
import androidx.annotation.Nullable;
|
|
import com.google.android.gms.common.R;
|
|
import com.google.android.gms.common.internal.Preconditions;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public final class zzhd {
|
|
private final Resources zza;
|
|
private final String zzb;
|
|
|
|
@Nullable
|
|
public final String zza(String str) {
|
|
int identifier = this.zza.getIdentifier(str, "string", this.zzb);
|
|
if (identifier == 0) {
|
|
return null;
|
|
}
|
|
try {
|
|
return this.zza.getString(identifier);
|
|
} catch (Resources.NotFoundException unused) {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public static String zza(Context context) {
|
|
try {
|
|
return context.getResources().getResourcePackageName(R.string.common_google_play_services_unknown_issue);
|
|
} catch (Resources.NotFoundException unused) {
|
|
return context.getPackageName();
|
|
}
|
|
}
|
|
|
|
public zzhd(Context context, @Nullable String str) {
|
|
Preconditions.checkNotNull(context);
|
|
this.zza = context.getResources();
|
|
if (TextUtils.isEmpty(str)) {
|
|
this.zzb = zza(context);
|
|
} else {
|
|
this.zzb = str;
|
|
}
|
|
}
|
|
}
|