package defpackage;

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

/* renamed from: ˀʾʽʤ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public abstract class AbstractRunnableC0508 extends AbstractC5116 implements Runnable {

    /* renamed from: ᵮᵠـˌ, reason: contains not printable characters */
    public static final /* synthetic */ int f2650 = 0;

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

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

    public AbstractRunnableC0508(ListenableFuture listenableFuture, Object obj) {
        listenableFuture.getClass();
        this.f2652 = listenableFuture;
        obj.getClass();
        this.f2651 = obj;
    }

    @Override // java.lang.Runnable
    public final void run() {
        ListenableFuture listenableFuture = this.f2652;
        Object obj = this.f2651;
        if (((this.f13450 instanceof C3361) | (listenableFuture == null)) || (obj == null)) {
            return;
        }
        this.f2652 = null;
        if (listenableFuture.isCancelled()) {
            m8219(listenableFuture);
            return;
        }
        try {
            try {
                Object objMo2220 = mo2220(obj, AbstractC2725.m6769(listenableFuture));
                this.f2651 = null;
                mo2219(objMo2220);
            } catch (Throwable th) {
                try {
                    if (th instanceof InterruptedException) {
                        Thread.currentThread().interrupt();
                    }
                    m8217(th);
                } finally {
                    this.f2651 = null;
                }
            }
        } catch (Error e) {
            m8217(e);
        } catch (CancellationException unused) {
            cancel(false);
        } catch (ExecutionException e2) {
            m8217(e2.getCause());
        } catch (Exception e3) {
            m8217(e3);
        }
    }

    /* renamed from: ᵞʡ, reason: contains not printable characters */
    public abstract void mo2219(Object obj);

    /* renamed from: ᵸʓᵠ, reason: contains not printable characters */
    public abstract Object mo2220(Object obj, Object obj2);

    @Override // defpackage.AbstractC3606
    /* renamed from: ᵸˑ */
    public final String mo1032() {
        String str;
        ListenableFuture listenableFuture = this.f2652;
        Object obj = this.f2651;
        String strMo1032 = super.mo1032();
        if (listenableFuture != null) {
            str = "inputFuture=[" + listenableFuture + "], ";
        } else {
            str = "";
        }
        if (obj == null) {
            if (strMo1032 != null) {
                return str.concat(strMo1032);
            }
            return null;
        }
        return str + "function=[" + obj + "]";
    }

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