jimu-decompiled/sources/com/ubt/jimu/user/view/picker/LoopTimerTask.java
2025-05-13 19:24:51 +02:00

65 lines
1.9 KiB
Java

package com.ubt.jimu.user.view.picker;
import java.util.Timer;
import java.util.TimerTask;
/* loaded from: classes2.dex */
final class LoopTimerTask extends TimerTask {
float a = 2.147484E9f;
final float b;
final Timer c;
final LoopView d;
LoopTimerTask(LoopView loopView, float f, Timer timer) {
this.d = loopView;
this.b = f;
this.c = timer;
}
@Override // java.util.TimerTask, java.lang.Runnable
public final void run() {
if (this.a == 2.147484E9f) {
if (Math.abs(this.b) <= 2000.0f) {
this.a = this.b;
} else if (this.b > 0.0f) {
this.a = 2000.0f;
} else {
this.a = -2000.0f;
}
}
if (Math.abs(this.a) >= 0.0f && Math.abs(this.a) <= 20.0f) {
this.c.cancel();
this.d.c.sendEmptyMessage(2000);
return;
}
int i = (int) ((this.a * 10.0f) / 1000.0f);
LoopView loopView = this.d;
loopView.b -= i;
if (!loopView.x) {
int i2 = loopView.b;
int i3 = loopView.B;
float f = loopView.v;
int i4 = loopView.q;
if (i2 <= ((int) ((-i3) * i4 * f))) {
this.a = 40.0f;
loopView.b = (int) ((-i3) * f * i4);
} else {
int size = loopView.n.size() - 1;
LoopView loopView2 = this.d;
if (i2 >= ((int) ((size - loopView2.B) * loopView2.v * loopView2.q))) {
int size2 = loopView2.n.size() - 1;
loopView2.b = (int) ((size2 - r3.B) * this.d.v * r3.q);
this.a = -40.0f;
}
}
}
float f2 = this.a;
if (f2 < 0.0f) {
this.a = f2 + 20.0f;
} else {
this.a = f2 - 20.0f;
}
this.d.c.sendEmptyMessage(1000);
}
}