1 /*
2  * Copyright (C) 2018 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package dalvik.annotation.compat;
17 
18 import libcore.api.CorePlatformApi;
19 import libcore.api.IntraCoreApi;
20 
21 /**
22  * Version code constants for Android releases.
23  *
24  * <p>Note: The constants are "public static final int" and are intended for use with annotations
25  * so must stay compile-time resolvable and inline-able. They must match the values from
26  * framework's android.os.Build.VERSION_CODES class.
27  *
28  * <p>Only historically fixed API levels should be included or abstract concepts like "CURRENT"
29  * should be added. Do not predict API levels.
30  *
31  * {@hide}
32  */
33 @CorePlatformApi
34 @IntraCoreApi
35 public class VersionCodes {
36 
VersionCodes()37     private VersionCodes() {
38     }
39 
40     /**
41      * The version code for Android Oreo (API version 26).
42      */
43     @CorePlatformApi
44     @IntraCoreApi
45     public static final int O = 26;
46 
47     /**
48      * The version code for Android Pie (API version 28).
49      */
50     @CorePlatformApi
51     @IntraCoreApi
52     public static final int P = 28;
53 
54     /**
55      * The version code for Android Q (API version 29).
56      */
57     @CorePlatformApi
58     @IntraCoreApi
59     public static final int Q = 29;
60 }
61