aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/jogamp/common/os
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-04-09 04:13:26 +0200
committerSven Gothel <[email protected]>2012-04-09 04:13:26 +0200
commitae3756ff570f2c274fca005c50028101aef176e9 (patch)
tree3dd28aec267eb7a3e3dbcc79dd169f8768aa79d1 /src/java/jogamp/common/os
parent6b5332374ff238b09d44858873d600e4290302f6 (diff)
ActivityLauncher/LauncherUtil: Clear properties 'onDestroy()'
Diffstat (limited to 'src/java/jogamp/common/os')
-rw-r--r--src/java/jogamp/common/os/android/StaticContext.java19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/java/jogamp/common/os/android/StaticContext.java b/src/java/jogamp/common/os/android/StaticContext.java
index cb55e65..055fa2f 100644
--- a/src/java/jogamp/common/os/android/StaticContext.java
+++ b/src/java/jogamp/common/os/android/StaticContext.java
@@ -27,26 +27,29 @@
*/
package jogamp.common.os.android;
-import android.content.*;
+import android.content.Context;
import android.util.Log;
public class StaticContext {
- private static Context context = null;
+ private static Context appContext = null;
private static boolean DEBUG = false;
- public static final synchronized void init(Context ctx) {
- if(null != context) {
+ /**
+ * @param appContext mandatory application Context
+ */
+ public static final synchronized void init(Context appContext) {
+ if(null != StaticContext.appContext) {
throw new RuntimeException("Context already set");
}
- if(DEBUG) { Log.d(MD.TAG, "init("+ctx+")"); }
- context = ctx;
+ if(DEBUG) { Log.d(MD.TAG, "init(appCtx "+appContext+")"); }
+ StaticContext.appContext = appContext;
}
public static final synchronized void clear() {
if(DEBUG) { Log.d(MD.TAG, "clear()"); }
- context = null;
+ appContext = null;
}
public static final synchronized Context getContext() {
- return context;
+ return appContext;
}
}