alexandroid/decompiled/jadx/sources/com/mapbox/common/LogThrottler.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

63 lines
1.7 KiB
Java

package com.mapbox.common;
import androidx.annotation.Nullable;
import androidx.annotation.RestrictTo;
import com.mapbox.bindgen.CleanerService;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX})
/* loaded from: classes8.dex */
public class LogThrottler {
protected long peer;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
public static class LogThrottlerPeerCleaner implements Runnable {
private long peer;
public LogThrottlerPeerCleaner(long j) {
this.peer = j;
}
@Override // java.lang.Runnable
public void run() {
LogThrottler.cleanNativePeer(this.peer);
}
}
static {
BaseMapboxInitializer.init(MapboxSDKCommonInitializerImpl.class);
try {
nativeSelfRegister();
} catch (UnsatisfiedLinkError unused) {
}
}
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX})
public LogThrottler(@Nullable Long l) {
initialize(l);
}
public static native void cleanNativePeer(long j);
private native void initialize(@Nullable Long l);
private static native void nativeSelfRegister();
private void setPeer(long j) {
this.peer = j;
if (j == 0) {
return;
}
CleanerService.register(this, new LogThrottlerPeerCleaner(j));
}
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX})
public native void allowLog();
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP_PREFIX})
public native boolean onLog();
public LogThrottler(long j) {
setPeer(j);
}
}