2021-11-08 18:25:28 +00:00
|
|
|
package j0.l.a;
|
2021-06-27 20:44:35 +00:00
|
|
|
|
2022-01-27 00:50:41 +00:00
|
|
|
import b.i.a.f.e.o.f;
|
2021-06-27 20:44:35 +00:00
|
|
|
import rx.Subscriber;
|
|
|
|
import rx.functions.Func2;
|
2022-03-02 20:59:20 +00:00
|
|
|
/* compiled from: OperatorTakeWhile.java */
|
|
|
|
/* loaded from: classes3.dex */
|
2021-06-27 20:44:35 +00:00
|
|
|
public class j2 extends Subscriber<T> {
|
2021-12-17 22:03:14 +00:00
|
|
|
public int j;
|
|
|
|
public boolean k;
|
|
|
|
public final /* synthetic */ Subscriber l;
|
|
|
|
public final /* synthetic */ i2 m;
|
2021-06-27 20:44:35 +00:00
|
|
|
|
2022-03-02 20:59:20 +00:00
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
2021-06-27 20:44:35 +00:00
|
|
|
public j2(i2 i2Var, Subscriber subscriber, boolean z2, Subscriber subscriber2) {
|
|
|
|
super(subscriber, z2);
|
2021-12-17 22:03:14 +00:00
|
|
|
this.m = i2Var;
|
|
|
|
this.l = subscriber2;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-11-08 18:25:28 +00:00
|
|
|
@Override // j0.g
|
2021-06-27 20:44:35 +00:00
|
|
|
public void onCompleted() {
|
2021-12-17 22:03:14 +00:00
|
|
|
if (!this.k) {
|
|
|
|
this.l.onCompleted();
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-11-08 18:25:28 +00:00
|
|
|
@Override // j0.g
|
2021-06-27 20:44:35 +00:00
|
|
|
public void onError(Throwable th) {
|
2021-12-17 22:03:14 +00:00
|
|
|
if (!this.k) {
|
|
|
|
this.l.onError(th);
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-03-02 20:59:20 +00:00
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
2021-11-08 18:25:28 +00:00
|
|
|
@Override // j0.g
|
2021-06-27 20:44:35 +00:00
|
|
|
public void onNext(T t) {
|
|
|
|
try {
|
2021-12-17 22:03:14 +00:00
|
|
|
Func2<? super T, ? super Integer, Boolean> func2 = this.m.j;
|
|
|
|
int i = this.j;
|
|
|
|
this.j = i + 1;
|
2021-06-27 20:44:35 +00:00
|
|
|
if (func2.call(t, Integer.valueOf(i)).booleanValue()) {
|
2021-12-17 22:03:14 +00:00
|
|
|
this.l.onNext(t);
|
2021-06-27 20:44:35 +00:00
|
|
|
return;
|
|
|
|
}
|
2021-12-17 22:03:14 +00:00
|
|
|
this.k = true;
|
|
|
|
this.l.onCompleted();
|
2021-06-27 20:44:35 +00:00
|
|
|
unsubscribe();
|
|
|
|
} catch (Throwable th) {
|
2021-12-17 22:03:14 +00:00
|
|
|
this.k = true;
|
2022-01-27 00:50:41 +00:00
|
|
|
f.p1(th, this.l, t);
|
2021-06-27 20:44:35 +00:00
|
|
|
unsubscribe();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|