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

124 lines
3.5 KiB
Java

package o;
import android.os.Handler;
import android.os.Message;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
import o.AbstractC13173fSu;
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes.dex */
public final class fRV extends AbstractC13173fSu {
private final boolean c = true;
private final Handler d;
/* JADX INFO: Access modifiers changed from: package-private */
public fRV(Handler handler) {
this.d = handler;
}
@Override // o.AbstractC13173fSu
public final AbstractC13173fSu.Sts c() {
return new HBt(this.d, this.c);
}
/* loaded from: classes6.dex */
static final class HBt extends AbstractC13173fSu.Sts {
private final boolean b;
private volatile boolean c;
private final Handler e;
HBt(Handler handler, boolean z) {
this.e = handler;
this.b = z;
}
@Override // o.AbstractC13173fSu.Sts
public final fSJ a(Runnable runnable, long j, TimeUnit timeUnit) {
if (runnable == null) {
throw new NullPointerException("run == null");
}
if (timeUnit == null) {
throw new NullPointerException("unit == null");
}
if (this.c) {
return fSJ.bs_();
}
Objects.requireNonNull(runnable, "run is null");
Sts sts = new Sts(this.e, runnable);
Message obtain = Message.obtain(this.e, sts);
obtain.obj = this;
if (this.b) {
obtain.setAsynchronous(true);
}
this.e.sendMessageDelayed(obtain, timeUnit.toMillis(j));
if (!this.c) {
return sts;
}
this.e.removeCallbacks(sts);
return fSJ.bs_();
}
@Override // o.fSJ
public final void dispose() {
this.c = true;
this.e.removeCallbacksAndMessages(this);
}
@Override // o.fSJ
public final boolean isDisposed() {
return this.c;
}
}
/* loaded from: classes6.dex */
static final class Sts implements Runnable, fSJ {
private final Runnable a;
private volatile boolean b;
private final Handler e;
Sts(Handler handler, Runnable runnable) {
this.e = handler;
this.a = runnable;
}
@Override // java.lang.Runnable
public final void run() {
try {
this.a.run();
} catch (Throwable th) {
C13418fZu.c(th);
}
}
@Override // o.fSJ
public final void dispose() {
this.e.removeCallbacks(this);
this.b = true;
}
@Override // o.fSJ
public final boolean isDisposed() {
return this.b;
}
}
@Override // o.AbstractC13173fSu
public final fSJ d(Runnable runnable, long j, TimeUnit timeUnit) {
if (runnable == null) {
throw new NullPointerException("run == null");
}
if (timeUnit == null) {
throw new NullPointerException("unit == null");
}
Objects.requireNonNull(runnable, "run is null");
Sts sts = new Sts(this.d, runnable);
Message obtain = Message.obtain(this.d, sts);
if (this.c) {
obtain.setAsynchronous(true);
}
this.d.sendMessageDelayed(obtain, timeUnit.toMillis(j));
return sts;
}
}