2 * Copyright (C) 2011 OpenIntents.org
\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
8 * http://www.apache.org/licenses/LICENSE-2.0
\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
17 package android.support.v2.os;
\r
20 * Information about the current build, extracted from system properties.
\r
22 * This class ensures backward compatibility down to Android 1.1 (API level 2).
\r
24 public class Build {
\r
25 public static class VERSION {
\r
26 public static int SDK_INT = 2;
\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
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
46 public static class VERSION_CODES {
\r
48 * Magic version number for a current development build, which has
\r
49 * not yet turned into an official release.
\r
51 public static final int CUR_DEVELOPMENT = 10000;
\r
54 * October 2008: Android 1.0
\r
56 public static final int BASE = 1;
\r
59 * February 2009: Android 1.1.
\r
61 public static final int BASE_1_1 = 2;
\r
64 * May 2009: Android 1.5.
\r
66 public static final int CUPCAKE = 3;
\r
69 * September 2009: Android 1.6.
\r
71 public static final int DONUT = 4;
\r
74 * November 2009: Android 2.0
\r
77 public static final int ECLAIR = 5;
\r
80 * December 2009: Android 2.0.1
\r
82 public static final int ECLAIR_0_1 = 6;
\r
85 * January 2010: Android 2.1
\r
87 public static final int ECLAIR_MR1 = 7;
\r
90 * June 2010: Android 2.2
\r
92 public static final int FROYO = 8;
\r
95 * November 2010: Android 2.3
\r
97 public static final int GINGERBREAD = 9;
\r
100 * February 2011: Android 2.3.3.
\r
102 public static final int GINGERBREAD_MR1 = 10;
\r
105 * February 2011: Android 3.0.
\r
107 public static final int HONEYCOMB = 11;
\r
110 * May 2011: Android 3.1.
\r
112 public static final int HONEYCOMB_MR1 = 12;
\r