alexandroid/decompiled/jadx/sources/com/ReactNativeBlobUtil/ReactNativeBlobUtilProgressConfig.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

43 lines
1.3 KiB
Java

package com.ReactNativeBlobUtil;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
/* loaded from: classes15.dex */
public class ReactNativeBlobUtilProgressConfig {
private int count;
private boolean enable;
private int interval;
private long lastTick = 0;
private int tick = 0;
private ReportType type;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
public enum ReportType {
Upload,
Download
}
public ReactNativeBlobUtilProgressConfig(boolean z, int i, int i2, ReportType reportType) {
this.count = -1;
this.interval = -1;
this.enable = false;
ReportType reportType2 = ReportType.Upload;
this.enable = z;
this.interval = i;
this.type = reportType;
this.count = i2;
}
public boolean shouldReport(float f) {
int i = this.count;
boolean z = false;
boolean z2 = i <= 0 || f <= 0.0f || Math.floor((double) (f * ((float) i))) > ((double) this.tick);
if (System.currentTimeMillis() - this.lastTick > this.interval && this.enable && z2) {
z = true;
}
if (z) {
this.tick++;
this.lastTick = System.currentTimeMillis();
}
return z;
}
}