73 lines
1.8 KiB
Java
73 lines
1.8 KiB
Java
package j0.l.a;
|
|
|
|
import c.q.a.k.a;
|
|
import j0.l.a.o1;
|
|
import java.util.Objects;
|
|
import rx.Producer;
|
|
import rx.Subscriber;
|
|
/* compiled from: OperatorScan */
|
|
public class q1 extends Subscriber<T> {
|
|
public R i;
|
|
public final /* synthetic */ Object j;
|
|
public final /* synthetic */ o1.b k;
|
|
public final /* synthetic */ o1 l;
|
|
|
|
/* JADX DEBUG: Multi-variable search result rejected for r2v0, resolved type: java.lang.Object */
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
public q1(o1 o1Var, Object obj, o1.b bVar) {
|
|
this.l = o1Var;
|
|
this.j = obj;
|
|
this.k = bVar;
|
|
this.i = obj;
|
|
}
|
|
|
|
@Override // j0.g
|
|
public void onCompleted() {
|
|
this.k.onCompleted();
|
|
}
|
|
|
|
@Override // j0.g
|
|
public void onError(Throwable th) {
|
|
o1.b bVar = this.k;
|
|
bVar.q = th;
|
|
bVar.p = true;
|
|
bVar.b();
|
|
}
|
|
|
|
/* JADX WARNING: Unknown variable types count: 1 */
|
|
@Override // j0.g
|
|
public void onNext(T t) {
|
|
try {
|
|
?? call = this.l.k.call(this.i, t);
|
|
this.i = call;
|
|
this.k.onNext(call);
|
|
} catch (Throwable th) {
|
|
a.b0(th, this, t);
|
|
}
|
|
}
|
|
|
|
@Override // rx.Subscriber
|
|
public void setProducer(Producer producer) {
|
|
long j;
|
|
o1.b bVar = this.k;
|
|
Objects.requireNonNull(bVar);
|
|
Objects.requireNonNull(producer);
|
|
synchronized (bVar.n) {
|
|
if (bVar.o == null) {
|
|
j = bVar.m;
|
|
if (j != Long.MAX_VALUE) {
|
|
j--;
|
|
}
|
|
bVar.m = 0;
|
|
bVar.o = producer;
|
|
} else {
|
|
throw new IllegalStateException("Can't set more than one Producer!");
|
|
}
|
|
}
|
|
if (j > 0) {
|
|
producer.j(j);
|
|
}
|
|
bVar.b();
|
|
}
|
|
}
|