diff options
author | Sven Gothel <[email protected]> | 2012-06-16 05:31:47 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-06-16 05:31:47 +0200 |
commit | 1468286bf569a493e4fdb887d5f3732f88c8cec3 (patch) | |
tree | afc32c3e1805405ea7faf56bcc8ae3c16d8f9fb4 /src/java/jogamp/common/os | |
parent | a52fe4275045252d9bd4436adec11aec393fadd5 (diff) |
Fix Bug 587: Use alternative storage location if platform's temp directory is mounted w/ noexec ; IOUtil API change!
Test whether executable files can be launched in temporary folder
by trying to run an empty executable file - if !( WINDOWS | OPENKODE )
TempDir:
1) ${java.io.tmpdir}/jogamp
2) $XDG_CACHE_HOME/jogamp - if !( ANDROID | MACOS | WINDOWS | OPENKODE )
3) $HOME/.jogamp
$XDG_CACHE_HOME defaults to $HOME/.cache
- TempFileCache: ${TempDir}/file_cache -> ${java.io.tmpdir}/jogamp/file_cache
- LauncherTempFileCache: ${TempDir}/file_cache -> ${java.io.tmpdir}/jogamp/file_cache
+++
AndroidUtils*.getTempRoot(): Remove unused AccessControlContext param
Diffstat (limited to 'src/java/jogamp/common/os')
-rw-r--r-- | src/java/jogamp/common/os/AndroidUtils.java | 7 | ||||
-rw-r--r-- | src/java/jogamp/common/os/android/AndroidUtilsImpl.java | 3 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/java/jogamp/common/os/AndroidUtils.java b/src/java/jogamp/common/os/AndroidUtils.java index 743a736..c6d5819 100644 --- a/src/java/jogamp/common/os/AndroidUtils.java +++ b/src/java/jogamp/common/os/AndroidUtils.java @@ -29,7 +29,6 @@ package jogamp.common.os; import java.io.File; import java.lang.reflect.Method; -import java.security.AccessControlContext; import com.jogamp.common.os.AndroidVersion; import com.jogamp.common.util.ReflectionUtil; @@ -46,7 +45,7 @@ public class AndroidUtils { final Class<?> androidAndroidUtilsImplClz = ReflectionUtil.getClass("jogamp.common.os.android.AndroidUtilsImpl", true, cl); androidGetPackageInfoVersionCodeMethod = ReflectionUtil.getMethod(androidAndroidUtilsImplClz, "getPackageInfoVersionCode", String.class); androidGetPackageInfoVersionNameMethod = ReflectionUtil.getMethod(androidAndroidUtilsImplClz, "getPackageInfoVersionName", String.class); - androidGetTempRootMethod = ReflectionUtil.getMethod(androidAndroidUtilsImplClz, "getTempRoot", AccessControlContext.class); + androidGetTempRootMethod = ReflectionUtil.getMethod(androidAndroidUtilsImplClz, "getTempRoot"); } else { androidGetPackageInfoVersionCodeMethod = null; androidGetPackageInfoVersionNameMethod = null; @@ -83,10 +82,10 @@ public class AndroidUtils { * via {@link jogamp.common.os.android.StaticContext#init(android.content.Context) StaticContext.init(..)}, * otherwise the context relative world readable <code>temp</code> directory returned. */ - public static File getTempRoot(AccessControlContext acc) + public static File getTempRoot() throws RuntimeException { if(null != androidGetTempRootMethod) { - return (File) ReflectionUtil.callMethod(null, androidGetTempRootMethod, acc); + return (File) ReflectionUtil.callMethod(null, androidGetTempRootMethod); } return null; } diff --git a/src/java/jogamp/common/os/android/AndroidUtilsImpl.java b/src/java/jogamp/common/os/android/AndroidUtilsImpl.java index f6a1444..fc8d606 100644 --- a/src/java/jogamp/common/os/android/AndroidUtilsImpl.java +++ b/src/java/jogamp/common/os/android/AndroidUtilsImpl.java @@ -28,7 +28,6 @@ package jogamp.common.os.android; import java.io.File; -import java.security.AccessControlContext; import android.content.Context; import android.content.pm.PackageInfo; @@ -71,7 +70,7 @@ public class AndroidUtilsImpl { * via {@link jogamp.common.os.android.StaticContext#init(android.content.Context) StaticContext.init(..)}, * otherwise the context relative world readable <code>temp</code> directory returned. */ - public static File getTempRoot(AccessControlContext acc) + public static File getTempRoot() throws SecurityException, RuntimeException { final Context ctx = StaticContext.getContext(); |