- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
43 lines
1.1 KiB
Java
43 lines
1.1 KiB
Java
package csdk.glucentralservices.util;
|
|
|
|
import android.os.Handler;
|
|
import android.os.Looper;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public class Common {
|
|
private static Handler mainHandler = new Handler(Looper.getMainLooper());
|
|
|
|
public static void require(boolean z) {
|
|
if (!z) {
|
|
throw new IllegalArgumentException();
|
|
}
|
|
}
|
|
|
|
public static void require(boolean z, String str) {
|
|
if (z) {
|
|
return;
|
|
}
|
|
if (str != null) {
|
|
throw new IllegalArgumentException(str);
|
|
}
|
|
throw new IllegalArgumentException();
|
|
}
|
|
|
|
public static RuntimeException propagate(Throwable th) {
|
|
if (th instanceof Error) {
|
|
throw ((Error) th);
|
|
}
|
|
if (th instanceof RuntimeException) {
|
|
throw ((RuntimeException) th);
|
|
}
|
|
throw new RuntimeException(th);
|
|
}
|
|
|
|
public static void runOnUIThread(Runnable runnable) {
|
|
require(runnable != null, "runnable == null");
|
|
if (!mainHandler.post(runnable)) {
|
|
throw new IllegalStateException("Failed to post runnable");
|
|
}
|
|
}
|
|
}
|