switch to alsa.omap3 module
[android_pandora.git] / apps / AndroidSupportV2 / src / android / support / v2 / os / Build.java
1 /* \r
2  * Copyright (C) 2011 OpenIntents.org\r
3  *\r
4  * Licensed under the Apache License, Version 2.0 (the "License");\r
5  * you may not use this file except in compliance with the License.\r
6  * You may obtain a copy of the License at\r
7  *\r
8  *      http://www.apache.org/licenses/LICENSE-2.0\r
9  *\r
10  * Unless required by applicable law or agreed to in writing, software\r
11  * distributed under the License is distributed on an "AS IS" BASIS,\r
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
13  * See the License for the specific language governing permissions and\r
14  * limitations under the License.\r
15  */\r
16 \r
17 package android.support.v2.os;\r
18 \r
19 /**\r
20  * Information about the current build, extracted from system properties.\r
21  * \r
22  * This class ensures backward compatibility down to Android 1.1 (API level 2).\r
23  */\r
24 public class Build {\r
25         public static class VERSION {\r
26                 public static int SDK_INT = 2;\r
27                 \r
28                 static {\r
29                         try {\r
30                                 // Android 1.6 (v4) and higher:\r
31                                 // access Build.VERSION.SDK_INT.\r
32                                 SDK_INT = android.os.Build.VERSION.class.getField("SDK_INT").getInt(null);\r
33                         } catch (Exception e) {\r
34                                 try {\r
35                                         // Android 1.5 (v3) and lower:\r
36                                         // access Build.VERSION.SDK.\r
37                                         SDK_INT = Integer.parseInt((String) android.os.Build.VERSION.class.getField("SDK").get(null));\r
38                                 } catch (Exception e2) {\r
39                                         // This should never happen:\r
40                                         SDK_INT = 2;\r
41                                 }\r
42                         }\r
43                 }       \r
44         }\r
45         \r
46         public static class VERSION_CODES {\r
47                 /**\r
48                  * Magic version number for a current development build, which has\r
49                  * not yet turned into an official release.\r
50                  */\r
51                 public static final int CUR_DEVELOPMENT = 10000;\r
52                 \r
53                 /**\r
54                  * October 2008: Android 1.0\r
55                  */\r
56                 public static final int BASE = 1;\r
57                 \r
58                 /**\r
59                  * February 2009: Android 1.1.\r
60                  */\r
61                 public static final int BASE_1_1 = 2;\r
62                 \r
63                 /**\r
64                  * May 2009: Android 1.5.\r
65                  */\r
66                 public static final int CUPCAKE = 3;\r
67                 \r
68                 /**\r
69                  * September 2009: Android 1.6.\r
70                  */\r
71                 public static final int DONUT = 4;\r
72                 \r
73                 /**\r
74                  * November 2009: Android 2.0\r
75                  * \r
76                  */\r
77                 public static final int ECLAIR = 5;\r
78                 \r
79                 /**\r
80                  * December 2009: Android 2.0.1\r
81                  */\r
82                 public static final int ECLAIR_0_1 = 6;\r
83                 \r
84                 /**\r
85                  * January 2010: Android 2.1\r
86                  */\r
87                 public static final int ECLAIR_MR1 = 7;\r
88                 \r
89                 /**\r
90                  * June 2010: Android 2.2\r
91                  */\r
92                 public static final int FROYO = 8;\r
93                 \r
94                 /**\r
95                  * November 2010: Android 2.3\r
96                  */\r
97                 public static final int GINGERBREAD = 9;\r
98                 \r
99                 /**\r
100                  * February 2011: Android 2.3.3.\r
101                  */\r
102                 public static final int GINGERBREAD_MR1 = 10;\r
103                 \r
104                 /**\r
105                  * February 2011: Android 3.0.\r
106                  */\r
107                 public static final int HONEYCOMB = 11;\r
108                 \r
109                 /**\r
110                  * May 2011: Android 3.1.\r
111                  */\r
112                 public static final int HONEYCOMB_MR1 = 12;\r
113         }\r
114 }\r