- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
28 lines
756 B
Java
28 lines
756 B
Java
package androidx.datastore.preferences.protobuf;
|
|
|
|
/* loaded from: classes.dex */
|
|
final class Android {
|
|
private static final boolean IS_ROBOLECTRIC;
|
|
private static final Class<?> MEMORY_CLASS = getClassForName("libcore.io.Memory");
|
|
|
|
public static Class<?> getMemoryClass() {
|
|
return MEMORY_CLASS;
|
|
}
|
|
|
|
public static boolean isOnAndroidDevice() {
|
|
return (MEMORY_CLASS == null || IS_ROBOLECTRIC) ? false : true;
|
|
}
|
|
|
|
static {
|
|
IS_ROBOLECTRIC = getClassForName("org.robolectric.Robolectric") != null;
|
|
}
|
|
|
|
private static <T> Class<T> getClassForName(String str) {
|
|
try {
|
|
return (Class<T>) Class.forName(str);
|
|
} catch (Throwable unused) {
|
|
return null;
|
|
}
|
|
}
|
|
}
|