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

import android.os.RemoteException;

/* JADX INFO: loaded from: classes2.dex */
public final /* synthetic */ class z2 implements Runnable {

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ a3 f22083b;

    public /* synthetic */ z2(a3 a3Var, int i10) {
        this.f22082a = i10;
        this.f22083b = a3Var;
    }

    @Override // java.lang.Runnable
    public final void run() {
        a3 a3Var = this.f22083b;
        switch (this.f22082a) {
            case 0:
                h0 h0Var = a3Var.f21472d;
                if (h0Var == null) {
                    a3Var.zzj().f21834f.c("Failed to send storage consent settings to service");
                } else {
                    try {
                        d4 d4VarS = a3Var.S(false);
                        com.google.android.gms.common.internal.w.checkNotNull(d4VarS);
                        h0Var.F1(d4VarS);
                        a3Var.R();
                    } catch (RemoteException e10) {
                        a3Var.zzj().f21834f.b(e10, "Failed to send storage consent settings to the service");
                        return;
                    }
                }
                break;
            default:
                h0 h0Var2 = a3Var.f21472d;
                if (h0Var2 == null) {
                    a3Var.zzj().f21834f.c("Failed to send Dma consent settings to service");
                } else {
                    try {
                        d4 d4VarS2 = a3Var.S(false);
                        com.google.android.gms.common.internal.w.checkNotNull(d4VarS2);
                        h0Var2.m2(d4VarS2);
                        a3Var.R();
                    } catch (RemoteException e11) {
                        a3Var.zzj().f21834f.b(e11, "Failed to send Dma consent settings to the service");
                    }
                }
                break;
        }
    }
}
