add OI File Manager and AndroidSupportV2 used by it
[android_pandora.git] / apps / AndroidSupportV2 / src / android / support / v2 / os / Build.java
diff --git a/apps/AndroidSupportV2/src/android/support/v2/os/Build.java b/apps/AndroidSupportV2/src/android/support/v2/os/Build.java
new file mode 100644 (file)
index 0000000..1549cc0
--- /dev/null
@@ -0,0 +1,114 @@
+/* \r
+ * Copyright (C) 2011 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 android.support.v2.os;\r
+\r
+/**\r
+ * Information about the current build, extracted from system properties.\r
+ * \r
+ * This class ensures backward compatibility down to Android 1.1 (API level 2).\r
+ */\r
+public class Build {\r
+       public static class VERSION {\r
+               public static int SDK_INT = 2;\r
+               \r
+               static {\r
+                       try {\r
+                               // Android 1.6 (v4) and higher:\r
+                               // access Build.VERSION.SDK_INT.\r
+                               SDK_INT = android.os.Build.VERSION.class.getField("SDK_INT").getInt(null);\r
+                       } catch (Exception e) {\r
+                               try {\r
+                                       // Android 1.5 (v3) and lower:\r
+                                       // access Build.VERSION.SDK.\r
+                                       SDK_INT = Integer.parseInt((String) android.os.Build.VERSION.class.getField("SDK").get(null));\r
+                               } catch (Exception e2) {\r
+                                       // This should never happen:\r
+                                       SDK_INT = 2;\r
+                               }\r
+                       }\r
+               }       \r
+       }\r
+       \r
+       public static class VERSION_CODES {\r
+               /**\r
+                * Magic version number for a current development build, which has\r
+                * not yet turned into an official release.\r
+                */\r
+               public static final int CUR_DEVELOPMENT = 10000;\r
+               \r
+               /**\r
+                * October 2008: Android 1.0\r
+                */\r
+               public static final int BASE = 1;\r
+               \r
+               /**\r
+                * February 2009: Android 1.1.\r
+                */\r
+               public static final int BASE_1_1 = 2;\r
+               \r
+               /**\r
+                * May 2009: Android 1.5.\r
+                */\r
+               public static final int CUPCAKE = 3;\r
+               \r
+               /**\r
+                * September 2009: Android 1.6.\r
+                */\r
+               public static final int DONUT = 4;\r
+               \r
+               /**\r
+                * November 2009: Android 2.0\r
+                * \r
+                */\r
+               public static final int ECLAIR = 5;\r
+               \r
+               /**\r
+                * December 2009: Android 2.0.1\r
+                */\r
+               public static final int ECLAIR_0_1 = 6;\r
+               \r
+               /**\r
+                * January 2010: Android 2.1\r
+                */\r
+               public static final int ECLAIR_MR1 = 7;\r
+               \r
+               /**\r
+                * June 2010: Android 2.2\r
+                */\r
+               public static final int FROYO = 8;\r
+               \r
+               /**\r
+                * November 2010: Android 2.3\r
+                */\r
+               public static final int GINGERBREAD = 9;\r
+               \r
+               /**\r
+                * February 2011: Android 2.3.3.\r
+                */\r
+               public static final int GINGERBREAD_MR1 = 10;\r
+               \r
+               /**\r
+                * February 2011: Android 3.0.\r
+                */\r
+               public static final int HONEYCOMB = 11;\r
+               \r
+               /**\r
+                * May 2011: Android 3.1.\r
+                */\r
+               public static final int HONEYCOMB_MR1 = 12;\r
+       }\r
+}\r