package com.google.android.gms.internal.ads; import androidx.annotation.Nullable; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; /* loaded from: classes3.dex */ public final class zzboz { @Nullable public static final List zza(JSONObject jSONObject, String str) throws JSONException { JSONArray optJSONArray = jSONObject.optJSONArray(str); if (optJSONArray == null) { return null; } ArrayList arrayList = new ArrayList(optJSONArray.length()); for (int i = 0; i < optJSONArray.length(); i++) { arrayList.add(optJSONArray.getString(i)); } return Collections.unmodifiableList(arrayList); } }