what-the-bank/sources/o/fUC.java

95 lines
2.6 KiB
Java

package o;
import java.util.concurrent.atomic.AtomicLong;
/* loaded from: classes.dex */
public final class fUC<T> extends AbstractC13240fUs<T, T> implements fSQ<T> {
private fSQ<? super T> d;
@Override // o.fSQ
public final void c(T t) {
}
public fUC(AbstractC13155fSc<T> abstractC13155fSc) {
super(abstractC13155fSc);
this.d = this;
}
@Override // o.AbstractC13155fSc
public final void c(InterfaceC15338gnn<? super T> interfaceC15338gnn) {
this.e.a((InterfaceC13158fSf) new HBt(interfaceC15338gnn, this.d));
}
/* loaded from: classes6.dex */
static final class HBt<T> extends AtomicLong implements InterfaceC13158fSf<T>, InterfaceC15337gnm {
private fSQ<? super T> a;
private boolean c;
private InterfaceC15338gnn<? super T> d;
private InterfaceC15337gnm e;
HBt(InterfaceC15338gnn<? super T> interfaceC15338gnn, fSQ<? super T> fsq) {
this.d = interfaceC15338gnn;
this.a = fsq;
}
@Override // o.InterfaceC13158fSf, o.InterfaceC15338gnn
public final void c(InterfaceC15337gnm interfaceC15337gnm) {
if (fYC.e(this.e, interfaceC15337gnm)) {
this.e = interfaceC15337gnm;
this.d.c(this);
interfaceC15337gnm.c(Long.MAX_VALUE);
}
}
@Override // o.InterfaceC15338gnn
public final void onNext(T t) {
if (this.c) {
return;
}
if (get() != 0) {
this.d.onNext(t);
fYK.b(this, 1L);
return;
}
try {
this.a.c(t);
} catch (Throwable th) {
C13147fSI.c(th);
this.e.a();
onError(th);
}
}
@Override // o.InterfaceC15338gnn
public final void onError(Throwable th) {
if (this.c) {
C13418fZu.c(th);
} else {
this.c = true;
this.d.onError(th);
}
}
@Override // o.InterfaceC15338gnn
public final void onComplete() {
if (this.c) {
return;
}
this.c = true;
this.d.onComplete();
}
@Override // o.InterfaceC15337gnm
public final void c(long j) {
if (fYC.e(j)) {
fYK.c(this, j);
}
}
@Override // o.InterfaceC15337gnm
public final void a() {
this.e.a();
}
}
}