package defpackage;

import com.google.common.util.concurrent.ListenableFuture;
import java.util.concurrent.ExecutionException;

/* renamed from: ᵷᵱ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public abstract class AbstractRunnableC4922 extends AbstractC5116 implements Runnable {

    /* renamed from: ᵧـˌᵎ, reason: contains not printable characters */
    public static final /* synthetic */ int f18310 = 0;

    /* renamed from: ˎˑː, reason: contains not printable characters */
    public Class f18311;

    /* renamed from: ˑᵥˁ, reason: contains not printable characters */
    public ListenableFuture f18312;

    /* renamed from: ᵮᵠـˌ, reason: contains not printable characters */
    public Object f18313;

    public AbstractRunnableC4922(ListenableFuture listenableFuture, Class cls, Object obj) {
        this.f18312 = listenableFuture;
        this.f18311 = cls;
        this.f18313 = obj;
    }

    @Override // java.lang.Runnable
    public final void run() {
        ListenableFuture listenableFuture = this.f18312;
        Class cls = this.f18311;
        Object obj = this.f18313;
        if (((obj == null) || ((listenableFuture == null) | (cls == null))) || (this.f13450 instanceof C3361)) {
            return;
        }
        this.f18312 = null;
        try {
            th = listenableFuture instanceof AbstractC3606 ? ((AbstractC3606) listenableFuture).m8213() : null;
        } catch (ExecutionException e) {
            Throwable cause = e.getCause();
            if (cause == null) {
                cause = new NullPointerException("Future type " + listenableFuture.getClass() + " threw " + e.getClass() + " without a cause");
            }
            th = cause;
        } catch (Throwable th) {
            th = th;
        }
        Object objM6769 = th == null ? AbstractC2725.m6769(listenableFuture) : null;
        if (th == null) {
            m8218(objM6769);
            return;
        }
        if (!cls.isInstance(th)) {
            m8219(listenableFuture);
            return;
        }
        try {
            Object objMo2226 = mo2226(obj, th);
            this.f18311 = null;
            this.f18313 = null;
            mo2225(objMo2226);
        } catch (Throwable th2) {
            try {
                if (th2 instanceof InterruptedException) {
                    Thread.currentThread().interrupt();
                }
                m8217(th2);
            } finally {
                this.f18311 = null;
                this.f18313 = null;
            }
        }
    }

    /* renamed from: ᵞʡ */
    public abstract void mo2225(Object obj);

    /* renamed from: ᵸʓᵠ */
    public abstract Object mo2226(Object obj, Throwable th);

    @Override // defpackage.AbstractC3606
    /* renamed from: ᵸˑ */
    public final String mo1032() {
        String str;
        ListenableFuture listenableFuture = this.f18312;
        Class cls = this.f18311;
        Object obj = this.f18313;
        String strMo1032 = super.mo1032();
        if (listenableFuture != null) {
            str = "inputFuture=[" + listenableFuture + "], ";
        } else {
            str = "";
        }
        if (cls == null || obj == null) {
            if (strMo1032 != null) {
                return str.concat(strMo1032);
            }
            return null;
        }
        return str + "exceptionType=[" + cls + "], fallback=[" + obj + "]";
    }

    @Override // defpackage.AbstractC3606
    /* renamed from: ᵻᵢﹳᵰ */
    public final void mo1033() {
        ListenableFuture listenableFuture = this.f18312;
        if ((listenableFuture != null) & (this.f13450 instanceof C3361)) {
            listenableFuture.cancel(m8216());
        }
        this.f18312 = null;
        this.f18311 = null;
        this.f18313 = null;
    }
}
