- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
30 lines
776 B
Java
30 lines
776 B
Java
package com.facebook.ads.internal.util.common;
|
|
|
|
import android.os.Looper;
|
|
import androidx.annotation.Keep;
|
|
import com.facebook.infer.annotation.Nullsafe;
|
|
|
|
@Keep
|
|
@Nullsafe(Nullsafe.Mode.LOCAL)
|
|
/* loaded from: classes2.dex */
|
|
public final class Preconditions {
|
|
public static <T> T checkNotNull(T t, String str) {
|
|
if (t != null) {
|
|
return t;
|
|
}
|
|
throw new IllegalArgumentException(str);
|
|
}
|
|
|
|
public static void checkIsTrue(boolean z, String str) {
|
|
if (!z) {
|
|
throw new IllegalArgumentException(str);
|
|
}
|
|
}
|
|
|
|
public static void checkIsOnMainThread() {
|
|
if (Looper.myLooper() != Looper.getMainLooper()) {
|
|
throw new RuntimeException("Must be called from the UiThread");
|
|
}
|
|
}
|
|
}
|