diff options
Diffstat (limited to 'src/java/jogamp')
-rw-r--r-- | src/java/jogamp/android/launcher/LauncherTempFileCache.java | 7 | ||||
-rw-r--r-- | src/java/jogamp/common/os/AndroidUtils.java | 7 | ||||
-rw-r--r-- | src/java/jogamp/common/os/android/AndroidUtilsImpl.java | 3 |
3 files changed, 8 insertions, 9 deletions
diff --git a/src/java/jogamp/android/launcher/LauncherTempFileCache.java b/src/java/jogamp/android/launcher/LauncherTempFileCache.java index 06b8516..7e566c9 100644 --- a/src/java/jogamp/android/launcher/LauncherTempFileCache.java +++ b/src/java/jogamp/android/launcher/LauncherTempFileCache.java @@ -40,7 +40,8 @@ public class LauncherTempFileCache { private static final boolean DEBUG = true; // Lifecycle: For all JVMs, ClassLoader and times. - private static final String tmpDirPrefix = "jogamp.tmp.cache"; + private static final String tmpSubDir = "jogamp"; + private static final String tmpDirPrefix = "file_cache"; // Get the value of the tmproot system property // Lifecycle: For all JVMs and ClassLoader @@ -143,13 +144,13 @@ public class LauncherTempFileCache { // Get the name of the tmpbase directory. { final File tmpRoot = ctx.getDir("temp", Context.MODE_WORLD_READABLE); - tmpBaseDir = new File(tmpRoot, tmpDirPrefix); + tmpBaseDir = new File(new File(tmpRoot, tmpSubDir), tmpDirPrefix); } tmpRootPropValue = System.getProperty(tmpRootPropName); if (tmpRootPropValue == null) { // Create the tmpbase directory if it doesn't already exist - tmpBaseDir.mkdir(); + tmpBaseDir.mkdirs(); if (!tmpBaseDir.isDirectory()) { throw new IOException("Cannot create directory " + tmpBaseDir); } 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(); |