package com.google.android.gms.common.internal;

import android.content.Context;
import android.content.res.Resources;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.google.android.gms.common.annotation.KeepForSdk;

/* JADX INFO: loaded from: classes2.dex */
public final class z {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final Resources f8422a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final String f8423b;

    public z(Context context) {
        w.checkNotNull(context);
        Resources resources = context.getResources();
        this.f8422a = resources;
        this.f8423b = resources.getResourcePackageName(e8.i.common_google_play_services_unknown_issue);
    }

    @Nullable
    @KeepForSdk
    public String getString(@NonNull String str) {
        Resources resources = this.f8422a;
        int identifier = resources.getIdentifier(str, "string", this.f8423b);
        if (identifier == 0) {
            return null;
        }
        return resources.getString(identifier);
    }
}
