- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
62 lines
2.0 KiB
Java
62 lines
2.0 KiB
Java
package com.facebook.internal;
|
|
|
|
import com.facebook.FacebookSdk;
|
|
import java.util.concurrent.Callable;
|
|
import java.util.concurrent.CountDownLatch;
|
|
import java.util.concurrent.FutureTask;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class LockOnGetVariable<T> {
|
|
private CountDownLatch initLatch;
|
|
private T storedValue;
|
|
|
|
public final T getValue() {
|
|
waitOnInit();
|
|
return this.storedValue;
|
|
}
|
|
|
|
public LockOnGetVariable(T t) {
|
|
this.storedValue = t;
|
|
}
|
|
|
|
public LockOnGetVariable(final Callable<T> callable) {
|
|
Intrinsics.checkNotNullParameter(callable, "callable");
|
|
this.initLatch = new CountDownLatch(1);
|
|
FacebookSdk.getExecutor().execute(new FutureTask(new Callable() { // from class: com.facebook.internal.LockOnGetVariable$$ExternalSyntheticLambda0
|
|
@Override // java.util.concurrent.Callable
|
|
public final Object call() {
|
|
Void m575_init_$lambda0;
|
|
m575_init_$lambda0 = LockOnGetVariable.m575_init_$lambda0(LockOnGetVariable.this, callable);
|
|
return m575_init_$lambda0;
|
|
}
|
|
}));
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
/* renamed from: _init_$lambda-0, reason: not valid java name */
|
|
public static final Void m575_init_$lambda0(LockOnGetVariable this$0, Callable callable) {
|
|
Intrinsics.checkNotNullParameter(this$0, "this$0");
|
|
Intrinsics.checkNotNullParameter(callable, "$callable");
|
|
try {
|
|
this$0.storedValue = (T) callable.call();
|
|
} finally {
|
|
CountDownLatch countDownLatch = this$0.initLatch;
|
|
if (countDownLatch != null) {
|
|
countDownLatch.countDown();
|
|
}
|
|
}
|
|
}
|
|
|
|
private final void waitOnInit() {
|
|
CountDownLatch countDownLatch = this.initLatch;
|
|
if (countDownLatch == null) {
|
|
return;
|
|
}
|
|
try {
|
|
countDownLatch.await();
|
|
} catch (InterruptedException unused) {
|
|
}
|
|
}
|
|
}
|