enable cyanogenmod stuff
[android_pandora.git] / apps / oi-filemanager / FileManager / src / org / openintents / util / VersionUtils.java
diff --git a/apps/oi-filemanager/FileManager/src/org/openintents/util/VersionUtils.java b/apps/oi-filemanager/FileManager/src/org/openintents/util/VersionUtils.java
deleted file mode 100644 (file)
index 714cfbb..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-/* \r
- * Copyright (C) 2007-2009 OpenIntents.org\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package org.openintents.util;\r
-\r
-import android.content.Context;\r
-import android.content.pm.PackageInfo;\r
-import android.content.pm.PackageManager;\r
-import android.content.pm.PackageManager.NameNotFoundException;\r
-import android.os.Build;\r
-import android.util.Log;\r
-\r
-/**\r
- * \r
- * @version 2011-01-22\r
- * @author Peli\r
- *\r
- */\r
-public class VersionUtils {\r
-       \r
-       private static final String TAG = "VersionUtils";\r
-\r
-       /**\r
-        * Get current version code.\r
-        * \r
-        * @return\r
-        */\r
-       public static int getVersionCode(Context context) {\r
-               int version = 0;\r
-               try {\r
-                       PackageInfo pi = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);\r
-                       version = pi.versionCode;\r
-               } catch (PackageManager.NameNotFoundException e) {\r
-                       Log.e(TAG, "Package name not found", e);\r
-               };\r
-               return version;\r
-       }\r
-       \r
-       /**\r
-        * Get current version number.\r
-        * \r
-        * @return\r
-        */\r
-       public static String getVersionNumber(Context context) {\r
-               String version = "?";\r
-               try {\r
-                       PackageInfo pi = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);\r
-                       version = pi.versionName;\r
-               } catch (PackageManager.NameNotFoundException e) {\r
-                       Log.e(TAG, "Package name not found", e);\r
-               };\r
-               return version;\r
-       }\r
-       \r
-       /**\r
-        * Get application name.\r
-        * \r
-        * Since API level 4 this routine could be replaced by\r
-        * appname = getString(getApplicationInfo().labelRes);\r
-        * \r
-        * @return\r
-        */\r
-       public static String getApplicationName(Context context) {\r
-               String name = "?";\r
-               try {\r
-                       PackageInfo pi = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);\r
-                       name = context.getString(pi.applicationInfo.labelRes);\r
-               } catch (PackageManager.NameNotFoundException e) {\r
-                       Log.e(TAG, "Package name not found", e);\r
-               };\r
-               return name;\r
-       }\r
-\r
-       /**\r
-        * Get application icon.\r
-        * \r
-        * Since API level 4 this routine could be replaced by\r
-        * icon = getApplicationInfo().icon;\r
-        * \r
-        * @return\r
-        */\r
-       public static int getApplicationIcon(Context context) {\r
-               int icon = 0;\r
-               try {\r
-                       PackageInfo pi = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);\r
-                       icon = pi.applicationInfo.icon;\r
-               } catch (PackageManager.NameNotFoundException e) {\r
-                       Log.e(TAG, "Package name not found", e);\r
-               };\r
-               return icon;\r
-       }\r
-\r
-       /**\r
-        * Indicates whether a specific package with minimum version code is available.\r
-        */\r
-       public static boolean isPackageAvailable(final Context context, final String packageName,\r
-                       final int minVersionCode) {\r
-               boolean result = false;\r
-               try {\r
-                       PackageInfo pi = context.getPackageManager().getPackageInfo(\r
-                                       packageName, 0);\r
-                       if (pi.versionCode >= minVersionCode) {\r
-                               result = true;\r
-                       }\r
-           } catch (PackageManager.NameNotFoundException e) {\r
-               \r
-           }\r
-           return result;\r
-       }\r
-}\r