summaryrefslogtreecommitdiffstats
path: root/src/java/jogamp/common/os/MachineDescriptionRuntime.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/jogamp/common/os/MachineDescriptionRuntime.java')
-rw-r--r--src/java/jogamp/common/os/MachineDescriptionRuntime.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/java/jogamp/common/os/MachineDescriptionRuntime.java b/src/java/jogamp/common/os/MachineDescriptionRuntime.java
index bf49105..0438d30 100644
--- a/src/java/jogamp/common/os/MachineDescriptionRuntime.java
+++ b/src/java/jogamp/common/os/MachineDescriptionRuntime.java
@@ -28,6 +28,7 @@
package jogamp.common.os;
+import com.jogamp.common.os.AndroidVersion;
import com.jogamp.common.os.MachineDescription;
import com.jogamp.common.os.NativeLibrary;
import com.jogamp.common.os.Platform;
@@ -118,6 +119,17 @@ public class MachineDescriptionRuntime {
getAlignmentPointerImpl());
}
+ public static boolean isAndroid() {
+ try {
+ NativeLibrary.ensureNativeLibLoaded();
+ return isAndroidImpl();
+ } catch (UnsatisfiedLinkError err) {
+ return AndroidVersion.isAvailable;
+ }
+ }
+
+ private static native boolean isAndroidImpl();
+
private static native int getPointerSizeInBytesImpl();
private static native long getPageSizeInBytesImpl();