diff options
Diffstat (limited to 'src/java/jogamp/common/os/android/PackageInfoUtil.java')
-rw-r--r-- | src/java/jogamp/common/os/android/PackageInfoUtil.java | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/java/jogamp/common/os/android/PackageInfoUtil.java b/src/java/jogamp/common/os/android/PackageInfoUtil.java index 473f262..28795a1 100644 --- a/src/java/jogamp/common/os/android/PackageInfoUtil.java +++ b/src/java/jogamp/common/os/android/PackageInfoUtil.java @@ -32,18 +32,13 @@ import android.content.pm.*; import android.util.Log; public class PackageInfoUtil { - private static Context context = null; private static boolean DEBUG = false; - public static final synchronized void setContext(Context ctx) { - if(DEBUG) Log.d(MD.TAG, "setContext("+ctx+")"); - context = ctx; - } - public static final synchronized Context getContext() { - return context; - } public static final PackageInfo getPackageInfo(String packageName) { - Context ctx = getContext(); + return getPackageInfo(StaticContext.getContext(), packageName); + } + + public static final PackageInfo getPackageInfo(Context ctx, String packageName) { if(null != ctx) { try { final PackageInfo pi = ctx.getPackageManager().getPackageInfo(packageName, PackageManager.GET_META_DATA); |