package j;

import j.g;
import java.util.concurrent.CompletableFuture;

/* JADX INFO: Add missing generic type declarations: [R] */
/* JADX INFO: loaded from: classes.dex */
public class f<R> implements d<R> {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ CompletableFuture f6907a;

    public f(g.a aVar, CompletableFuture completableFuture) {
        this.f6907a = completableFuture;
    }

    @Override // j.d
    public void a(b<R> bVar, b0<R> b0Var) {
        if (b0Var.a()) {
            this.f6907a.complete(b0Var.f6890b);
        } else {
            this.f6907a.completeExceptionally(new l(b0Var));
        }
    }

    @Override // j.d
    public void b(b<R> bVar, Throwable th) {
        this.f6907a.completeExceptionally(th);
    }
}
