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

93 lines
3.0 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import io.reactivex.rxjava3.exceptions.CompositeException;
import java.util.concurrent.atomic.AtomicInteger;
/* renamed from: o.fXa, reason: case insensitive filesystem */
/* loaded from: classes6.dex */
public final class C13327fXa<T> extends fUX<T, T> {
private long a;
private InterfaceC13193fTg<? super Throwable> d;
public C13327fXa(AbstractC13163fSk<T> abstractC13163fSk, long j, InterfaceC13193fTg<? super Throwable> interfaceC13193fTg) {
super(abstractC13163fSk);
this.d = interfaceC13193fTg;
this.a = j;
}
@Override // o.AbstractC13163fSk
public final void subscribeActual(InterfaceC13174fSv<? super T> interfaceC13174fSv) {
C13197fTk c13197fTk = new C13197fTk();
interfaceC13174fSv.onSubscribe(c13197fTk);
new LWm(interfaceC13174fSv, this.a, this.d, c13197fTk, this.c).b();
}
/* renamed from: o.fXa$LWm */
/* loaded from: classes6.dex */
static final class LWm<T> extends AtomicInteger implements InterfaceC13174fSv<T> {
private InterfaceC13193fTg<? super Throwable> a;
private C13197fTk b;
private InterfaceC13174fSv<? super T> c;
private long d;
private InterfaceC13169fSq<? extends T> e;
LWm(InterfaceC13174fSv<? super T> interfaceC13174fSv, long j, InterfaceC13193fTg<? super Throwable> interfaceC13193fTg, C13197fTk c13197fTk, InterfaceC13169fSq<? extends T> interfaceC13169fSq) {
this.c = interfaceC13174fSv;
this.b = c13197fTk;
this.e = interfaceC13169fSq;
this.a = interfaceC13193fTg;
this.d = j;
}
@Override // o.InterfaceC13174fSv
public final void onNext(T t) {
this.c.onNext(t);
}
@Override // o.InterfaceC13174fSv
public final void onError(Throwable th) {
long j = this.d;
if (j != Long.MAX_VALUE) {
this.d = j - 1;
}
if (j == 0) {
this.c.onError(th);
return;
}
try {
if (!this.a.a(th)) {
this.c.onError(th);
} else {
b();
}
} catch (Throwable th2) {
C13147fSI.c(th2);
this.c.onError(new CompositeException(th, th2));
}
}
@Override // o.InterfaceC13174fSv
public final void onComplete() {
this.c.onComplete();
}
final void b() {
if (getAndIncrement() == 0) {
int i = 1;
while (!this.b.isDisposed()) {
this.e.subscribe(this);
i = addAndGet(-i);
if (i == 0) {
return;
}
}
}
}
@Override // o.InterfaceC13174fSv
public final void onSubscribe(fSJ fsj) {
EnumC13192fTf.c(this.b, fsj);
}
}
}