package o; import io.reactivex.rxjava3.exceptions.CompositeException; /* loaded from: classes6.dex */ public final class fWG extends fUX { private fSS a; public fWG(InterfaceC13169fSq interfaceC13169fSq, fSS fss) { super(interfaceC13169fSq); this.a = fss; } @Override // o.AbstractC13163fSk public final void subscribeActual(InterfaceC13174fSv interfaceC13174fSv) { this.c.subscribe(new IeS(interfaceC13174fSv, this.a)); } /* loaded from: classes6.dex */ static final class IeS implements InterfaceC13174fSv, fSJ { private fSJ a; private InterfaceC13174fSv c; private fSS d; IeS(InterfaceC13174fSv interfaceC13174fSv, fSS fss) { this.c = interfaceC13174fSv; this.d = fss; } @Override // o.InterfaceC13174fSv public final void onSubscribe(fSJ fsj) { if (EnumC13192fTf.d(this.a, fsj)) { this.a = fsj; this.c.onSubscribe(this); } } @Override // o.fSJ public final void dispose() { this.a.dispose(); } @Override // o.fSJ public final boolean isDisposed() { return this.a.isDisposed(); } @Override // o.InterfaceC13174fSv public final void onNext(T t) { this.c.onNext(t); } @Override // o.InterfaceC13174fSv public final void onError(Throwable th) { try { T a = this.d.a(th); if (a == null) { NullPointerException nullPointerException = new NullPointerException("The supplied value is null"); nullPointerException.initCause(th); this.c.onError(nullPointerException); } else { this.c.onNext(a); this.c.onComplete(); } } catch (Throwable th2) { C13147fSI.c(th2); this.c.onError(new CompositeException(th, th2)); } } @Override // o.InterfaceC13174fSv public final void onComplete() { this.c.onComplete(); } } }