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

106 lines
3.1 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicReference;
/* loaded from: classes6.dex */
public final class fWL<T, R> extends fUX<T, R> {
private fSS<? super AbstractC13163fSk<T>, ? extends InterfaceC13169fSq<R>> a;
public fWL(InterfaceC13169fSq<T> interfaceC13169fSq, fSS<? super AbstractC13163fSk<T>, ? extends InterfaceC13169fSq<R>> fss) {
super(interfaceC13169fSq);
this.a = fss;
}
@Override // o.AbstractC13163fSk
public final void subscribeActual(InterfaceC13174fSv<? super R> interfaceC13174fSv) {
C13389fZA d = C13389fZA.d();
try {
InterfaceC13169fSq interfaceC13169fSq = (InterfaceC13169fSq) Objects.requireNonNull(this.a.a(d), "The selector returned a null ObservableSource");
Sts sts = new Sts(interfaceC13174fSv);
interfaceC13169fSq.subscribe(sts);
this.c.subscribe(new RVV(d, sts));
} catch (Throwable th) {
C13147fSI.c(th);
EnumC13195fTi.a(th, interfaceC13174fSv);
}
}
/* loaded from: classes6.dex */
static final class RVV<T> implements InterfaceC13174fSv<T> {
private AtomicReference<fSJ> a;
private C13389fZA<T> c;
RVV(C13389fZA<T> c13389fZA, AtomicReference<fSJ> atomicReference) {
this.c = c13389fZA;
this.a = atomicReference;
}
@Override // o.InterfaceC13174fSv
public final void onSubscribe(fSJ fsj) {
EnumC13192fTf.a(this.a, fsj);
}
@Override // o.InterfaceC13174fSv
public final void onNext(T t) {
this.c.onNext(t);
}
@Override // o.InterfaceC13174fSv
public final void onError(Throwable th) {
this.c.onError(th);
}
@Override // o.InterfaceC13174fSv
public final void onComplete() {
this.c.onComplete();
}
}
/* loaded from: classes6.dex */
static final class Sts<R> extends AtomicReference<fSJ> implements InterfaceC13174fSv<R>, fSJ {
private InterfaceC13174fSv<? super R> a;
private fSJ b;
Sts(InterfaceC13174fSv<? super R> interfaceC13174fSv) {
this.a = interfaceC13174fSv;
}
@Override // o.InterfaceC13174fSv
public final void onSubscribe(fSJ fsj) {
if (EnumC13192fTf.d(this.b, fsj)) {
this.b = fsj;
this.a.onSubscribe(this);
}
}
@Override // o.InterfaceC13174fSv
public final void onNext(R r) {
this.a.onNext(r);
}
@Override // o.InterfaceC13174fSv
public final void onError(Throwable th) {
EnumC13192fTf.e(this);
this.a.onError(th);
}
@Override // o.InterfaceC13174fSv
public final void onComplete() {
EnumC13192fTf.e(this);
this.a.onComplete();
}
@Override // o.fSJ
public final void dispose() {
this.b.dispose();
EnumC13192fTf.e(this);
}
@Override // o.fSJ
public final boolean isDisposed() {
return this.b.isDisposed();
}
}
}