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

import android.text.TextUtils;
import org.json.JSONException;
import org.json.JSONObject;

/* JADX INFO: loaded from: classes2.dex */
public final class k71 implements m61 {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ int f13147a;

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

    public /* synthetic */ k71(String str, int i10) {
        this.f13147a = i10;
        this.f13148b = str;
    }

    @Override // com.google.android.gms.internal.ads.m61
    public final void zza(Object obj) {
        int i10 = this.f13147a;
        String str = this.f13148b;
        switch (i10) {
            case 0:
                try {
                    ((JSONObject) obj).put("ms", str);
                } catch (JSONException unused) {
                    p7.l0.h();
                    return;
                }
                break;
            default:
                JSONObject jSONObject = (JSONObject) obj;
                try {
                    if (!TextUtils.isEmpty(str)) {
                        p7.y.f("pii", jSONObject).put("adsid", str);
                    }
                } catch (JSONException unused2) {
                    return;
                }
                break;
        }
    }
}
