diff options
author | Sven Gothel <[email protected]> | 2011-07-24 11:37:45 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-07-24 11:37:45 +0200 |
commit | 869c49c22573147c94b1e6d931c2cff696a54a47 (patch) | |
tree | 882779724e74c324de714bbc6f8c2f88e5492862 /src/java/jogamp/common/os | |
parent | 9f45b6f09cbce6c7889e099939656356befa585d (diff) |
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 ?)
Diffstat (limited to 'src/java/jogamp/common/os')
-rw-r--r-- | src/java/jogamp/common/os/MachineDescriptionRuntime.java | 12 |
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(); |