From 869c49c22573147c94b1e6d931c2cff696a54a47 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 24 Jul 2011 11:37:45 +0200 Subject: Android integration / cross-test ; Enhance Platform - android minor build fix - started dex'ing (gluegen-rt.apk, more to come for full junit tests) - android remote dalvikvm launch works (crosstest-java-android-armv7-rel.sh) - android detection, incl version (reflection) - Platform: - Add JAVA_VM_NAME and JAVA_VM_RUNIME - OSType maybe ANDROID, where the OS name (String) is Linux ! (ok ?) --- src/java/jogamp/common/os/MachineDescriptionRuntime.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/java/jogamp') 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(); -- cgit v1.2.3