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

import java.io.PrintStream;

/* loaded from: classes3.dex */
public final class zzq {
    private static final zzr zzdq;
    private static final int zzdr;

    /* loaded from: classes3.dex */
    static final class zzd extends zzr {
        zzd() {
        }

        @Override // com.google.android.gms.internal.gcm.zzr
        public final void zzd(Throwable th2, Throwable th3) {
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:11:0x0064  */
    static {
        Integer num;
        zzr zzdVar;
        try {
            num = zzac();
        } catch (Throwable th2) {
            th = th2;
            num = null;
        }
        if (num != null) {
            try {
            } catch (Throwable th3) {
                th = th3;
                PrintStream printStream = System.err;
                String name = zzd.class.getName();
                StringBuilder sb2 = new StringBuilder(name.length() + 133);
                sb2.append("An error has occurred when initializing the try-with-resources desuguring strategy. The default strategy ");
                sb2.append(name);
                sb2.append("will be used. The error is: ");
                printStream.println(sb2.toString());
                th.printStackTrace(System.err);
                zzdVar = new zzd();
                zzdq = zzdVar;
                zzdr = num != null ? num.intValue() : 1;
            }
            if (num.intValue() >= 19) {
                zzdVar = new zzv();
                zzdq = zzdVar;
                zzdr = num != null ? num.intValue() : 1;
            }
        }
        zzdVar = Boolean.getBoolean("com.google.devtools.build.android.desugar.runtime.twr_disable_mimic") ^ true ? new zzu() : new zzd();
        zzdq = zzdVar;
        zzdr = num != null ? num.intValue() : 1;
    }

    private static Integer zzac() {
        try {
            return (Integer) Class.forName("android.os.Build$VERSION").getField("SDK_INT").get(null);
        } catch (Exception e10) {
            System.err.println("Failed to retrieve value from android.os.Build$VERSION.SDK_INT due to the following exception.");
            e10.printStackTrace(System.err);
            return null;
        }
    }

    public static void zzd(Throwable th2, Throwable th3) {
        zzdq.zzd(th2, th3);
    }
}
