package defpackage;

import com.google.android.gms.tasks.RuntimeExecutionException;
import java.util.concurrent.CancellationException;
import java.util.concurrent.Executor;

/* JADX INFO: renamed from: ˊʨ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C1300 {

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public boolean f5420;

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public Object f5421;

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public volatile boolean f5423;

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public Exception f5424;

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final Object f5422 = new Object();

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final C5172 f5419 = new C5172(10);

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final void m3815(Executor executor, InterfaceC1936 interfaceC1936) {
        this.f5419.m10701(new C4805(executor, interfaceC1936));
        m3820();
    }

    /* JADX INFO: renamed from: ˊᵫᵗ, reason: contains not printable characters */
    public final boolean m3816() {
        boolean z;
        synchronized (this.f5422) {
            z = this.f5420;
        }
        return z;
    }

    /* JADX INFO: renamed from: ˋˈ, reason: contains not printable characters */
    public final void m3817() {
        synchronized (this.f5422) {
            try {
                if (this.f5420) {
                    return;
                }
                this.f5420 = true;
                this.f5423 = true;
                this.f5419.m10699(this);
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public final void m3818(Executor executor, InterfaceC3151 interfaceC3151) {
        this.f5419.m10701(new C4805(executor, interfaceC3151));
        m3820();
    }

    /* JADX INFO: renamed from: ᵝᵶ, reason: contains not printable characters */
    public final void m3819(Exception exc) {
        ᵘᵞʿⁱ.ᵮᵣᵗˈ(exc, "Exception must not be null");
        synchronized (this.f5422) {
            m3822();
            this.f5420 = true;
            this.f5424 = exc;
        }
        this.f5419.m10699(this);
    }

    /* JADX INFO: renamed from: ᵟᵹᵙ, reason: contains not printable characters */
    public final void m3820() {
        synchronized (this.f5422) {
            try {
                if (this.f5420) {
                    this.f5419.m10699(this);
                }
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public final C1300 m3821(Executor executor, InterfaceC5156 interfaceC5156) {
        C1300 c1300 = new C1300();
        this.f5419.m10701(new C0387(executor, interfaceC5156, c1300, 1));
        m3820();
        return c1300;
    }

    /* JADX INFO: renamed from: ᵪᵹᵥᵻ, reason: contains not printable characters */
    public final void m3822() {
        if (this.f5420) {
            if (!m3816()) {
                throw new IllegalStateException("DuplicateTaskCompletionException can only be created from completed Task.");
            }
            Exception excM3830 = m3830();
        }
    }

    /* JADX INFO: renamed from: ᵮᵣᵗˈ, reason: contains not printable characters */
    public final boolean m3823(Object obj) {
        synchronized (this.f5422) {
            try {
                if (this.f5420) {
                    return false;
                }
                this.f5420 = true;
                this.f5421 = obj;
                this.f5419.m10699(this);
                return true;
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    /* JADX INFO: renamed from: ᵱᵽʡᵚ, reason: contains not printable characters */
    public final C1300 m3824(Executor executor, InterfaceC5533 interfaceC5533) {
        C1300 c1300 = new C1300();
        this.f5419.m10701(new C4805(executor, interfaceC5533, c1300));
        m3820();
        return c1300;
    }

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final void m3825(Executor executor, InterfaceC2854 interfaceC2854) {
        this.f5419.m10701(new C4805(executor, interfaceC2854));
        m3820();
    }

    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    public final Object m3826() {
        Object obj;
        synchronized (this.f5422) {
            try {
                ᵘᵞʿⁱ.ᵝᵶ("Task is not yet complete", this.f5420);
                if (this.f5423) {
                    throw new CancellationException("Task is already canceled.");
                }
                Exception exc = this.f5424;
                if (exc != null) {
                    throw new RuntimeExecutionException(exc);
                }
                obj = this.f5421;
            } catch (Throwable th) {
                throw th;
            }
        }
        return obj;
    }

    /* JADX INFO: renamed from: ᵶᵥᵝ, reason: contains not printable characters */
    public final void m3827(Object obj) {
        synchronized (this.f5422) {
            m3822();
            this.f5420 = true;
            this.f5421 = obj;
        }
        this.f5419.m10699(this);
    }

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public final C1300 m3828(Executor executor, InterfaceC5156 interfaceC5156) {
        C1300 c1300 = new C1300();
        this.f5419.m10701(new C0387(executor, interfaceC5156, c1300, 0));
        m3820();
        return c1300;
    }

    /* JADX INFO: renamed from: ᵻʽᵯ, reason: contains not printable characters */
    public final boolean m3829() {
        boolean z;
        synchronized (this.f5422) {
            try {
                z = false;
                if (this.f5420 && !this.f5423 && this.f5424 == null) {
                    z = true;
                }
            } finally {
            }
        }
        return z;
    }

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public final Exception m3830() {
        Exception exc;
        synchronized (this.f5422) {
            exc = this.f5424;
        }
        return exc;
    }
}
