2021-06-27 20:44:35 +00:00
|
|
|
package j0.l.a;
|
|
|
|
|
|
|
|
import j0.k.b;
|
|
|
|
import rx.Observable;
|
|
|
|
import rx.Subscriber;
|
|
|
|
/* compiled from: OperatorTakeUntilPredicate */
|
|
|
|
public final class h2<T> implements Observable.b<T, T> {
|
|
|
|
public final b<? super T, Boolean> i;
|
|
|
|
|
|
|
|
/* compiled from: OperatorTakeUntilPredicate */
|
|
|
|
public final class a extends Subscriber<T> {
|
|
|
|
public final Subscriber<? super T> i;
|
|
|
|
public boolean j;
|
|
|
|
|
|
|
|
public a(Subscriber<? super T> subscriber) {
|
|
|
|
this.i = subscriber;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // j0.g
|
|
|
|
public void onCompleted() {
|
|
|
|
if (!this.j) {
|
|
|
|
this.i.onCompleted();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // j0.g
|
|
|
|
public void onError(Throwable th) {
|
|
|
|
if (!this.j) {
|
|
|
|
this.i.onError(th);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // j0.g
|
|
|
|
public void onNext(T t) {
|
|
|
|
this.i.onNext(t);
|
|
|
|
try {
|
|
|
|
if (h2.this.i.call(t).booleanValue()) {
|
|
|
|
this.j = true;
|
|
|
|
this.i.onCompleted();
|
|
|
|
unsubscribe();
|
|
|
|
}
|
|
|
|
} catch (Throwable th) {
|
|
|
|
this.j = true;
|
2021-06-27 20:53:42 +00:00
|
|
|
c.q.a.k.a.b0(th, this.i, t);
|
2021-06-27 20:44:35 +00:00
|
|
|
unsubscribe();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public h2(b<? super T, Boolean> bVar) {
|
|
|
|
this.i = bVar;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // j0.k.b
|
|
|
|
public Object call(Object obj) {
|
|
|
|
Subscriber subscriber = (Subscriber) obj;
|
|
|
|
a aVar = new a(subscriber);
|
|
|
|
subscriber.add(aVar);
|
|
|
|
subscriber.setProducer(new g2(this, aVar));
|
|
|
|
return aVar;
|
|
|
|
}
|
|
|
|
}
|