package com.pgl.ssdk;

import android.os.HandlerThread;
import com.pgl.ssdk.a3;

/* JADX INFO: loaded from: classes.dex */
public class az {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    private final a2<a0> f24724a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    private a3 f24725b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    private a3 f24726c;

    public static class b {

        /* JADX INFO: renamed from: a, reason: collision with root package name */
        private static final az f24727a = new az();
    }

    private az() {
        this.f24724a = a2.a(2);
    }

    private a0 a(a3.a aVar, String str) {
        try {
            HandlerThread handlerThread = new HandlerThread(str);
            handlerThread.start();
            return new a0(handlerThread, aVar);
        } catch (Throwable unused) {
            return null;
        }
    }

    public a3 b() {
        if (this.f24726c == null) {
            synchronized (az.class) {
                try {
                    if (this.f24726c == null) {
                        this.f24726c = a("pags_net_handler");
                    }
                } catch (Throwable th) {
                    throw th;
                }
            }
        }
        return this.f24726c;
    }

    public a3 c() {
        if (this.f24725b == null) {
            synchronized (az.class) {
                try {
                    if (this.f24725b == null) {
                        this.f24725b = a("pags_ssdk_handler");
                    }
                } catch (Throwable th) {
                    throw th;
                }
            }
        }
        return this.f24725b;
    }

    public a3 a(String str) {
        return b(null, str);
    }

    public a3 b(a3.a aVar, String str) {
        a0 a0Var = (a0) this.f24724a.a();
        if (a0Var == null) {
            return a(aVar, str);
        }
        a0Var.a(aVar);
        a0Var.a(str);
        return a0Var;
    }

    public static az a() {
        return b.f24727a;
    }
}
