19066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project/* 29066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Copyright (C) 2007 The Android Open Source Project 39066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * 49066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Licensed under the Apache License, Version 2.0 (the "License"); 59066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * you may not use this file except in compliance with the License. 69066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * You may obtain a copy of the License at 79066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * 89066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * http://www.apache.org/licenses/LICENSE-2.0 99066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * 109066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Unless required by applicable law or agreed to in writing, software 119066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * distributed under the License is distributed on an "AS IS" BASIS, 129066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 139066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * See the License for the specific language governing permissions and 149066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * limitations under the License. 159066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 169066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 179066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectpackage android.os; 189066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 19ad2171acf423224d925d1b7cefa7184882e100bfDoug Zongkerimport com.android.internal.telephony.TelephonyProperties; 20ad2171acf423224d925d1b7cefa7184882e100bfDoug Zongker 219066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project/** 229066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Information about the current build, extracted from system properties. 239066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 249066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectpublic class Build { 259066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** Value used for when a build property is unknown. */ 2671de7851a2d1c1ef0251bdc1ea59c5e6f58cf429Ficus Kirkpatrick public static final String UNKNOWN = "unknown"; 279066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 289066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** Either a changelist number, or a label like "M4-rc20". */ 299066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final String ID = getString("ro.build.id"); 309066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 319066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** A build ID string meant for displaying to the user */ 329066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final String DISPLAY = getString("ro.build.display.id"); 339066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 349066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** The name of the overall product. */ 359066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final String PRODUCT = getString("ro.product.name"); 369066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 379066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** The name of the industrial design. */ 389066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final String DEVICE = getString("ro.product.device"); 399066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 409066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** The name of the underlying board, like "goldfish". */ 419066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final String BOARD = getString("ro.product.board"); 429066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 43b181118b6e58c0014da4e9d52bf38548adc73a8aDianne Hackborn /** The name of the instruction set (CPU type + ABI convention) of native code. */ 44b181118b6e58c0014da4e9d52bf38548adc73a8aDianne Hackborn public static final String CPU_ABI = getString("ro.product.cpu.abi"); 45b181118b6e58c0014da4e9d52bf38548adc73a8aDianne Hackborn 46fa9cafa074eb5d98b49b63795cd947877df1f21dFicus Kirkpatrick /** The name of the second instruction set (CPU type + ABI convention) of native code. */ 47fa9cafa074eb5d98b49b63795cd947877df1f21dFicus Kirkpatrick public static final String CPU_ABI2 = getString("ro.product.cpu.abi2"); 48fa9cafa074eb5d98b49b63795cd947877df1f21dFicus Kirkpatrick 49d62ad4f120e92fd597f44caf125ac853ac0ea11cDianne Hackborn /** The manufacturer of the product/hardware. */ 50d62ad4f120e92fd597f44caf125ac853ac0ea11cDianne Hackborn public static final String MANUFACTURER = getString("ro.product.manufacturer"); 51d62ad4f120e92fd597f44caf125ac853ac0ea11cDianne Hackborn 529066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** The brand (e.g., carrier) the software is customized for, if any. */ 539066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final String BRAND = getString("ro.product.brand"); 549066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 559066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** The end-user-visible name for the end product. */ 569066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final String MODEL = getString("ro.product.model"); 579066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 5874885efc8ce6d315e0593e5f669cc805e264cf68Doug Zongker /** The system bootloader version number. */ 5942471dd5552a346dd82a58a663159875ccc4fb79Dan Egnor public static final String BOOTLOADER = getString("ro.bootloader"); 6042471dd5552a346dd82a58a663159875ccc4fb79Dan Egnor 61ad2171acf423224d925d1b7cefa7184882e100bfDoug Zongker /** 62ad2171acf423224d925d1b7cefa7184882e100bfDoug Zongker * The radio firmware version number. 63ad2171acf423224d925d1b7cefa7184882e100bfDoug Zongker * 64ad2171acf423224d925d1b7cefa7184882e100bfDoug Zongker * @deprecated The radio firmware version is frequently not 65ad2171acf423224d925d1b7cefa7184882e100bfDoug Zongker * available when this class is initialized, leading to a blank or 66ad2171acf423224d925d1b7cefa7184882e100bfDoug Zongker * "unknown" value for this string. Use 67ad2171acf423224d925d1b7cefa7184882e100bfDoug Zongker * {@link #getRadioVersion} instead. 68ad2171acf423224d925d1b7cefa7184882e100bfDoug Zongker */ 69ad2171acf423224d925d1b7cefa7184882e100bfDoug Zongker @Deprecated 70ad2171acf423224d925d1b7cefa7184882e100bfDoug Zongker public static final String RADIO = getString(TelephonyProperties.PROPERTY_BASEBAND_VERSION); 7142471dd5552a346dd82a58a663159875ccc4fb79Dan Egnor 7274885efc8ce6d315e0593e5f669cc805e264cf68Doug Zongker /** The name of the hardware (from the kernel command line or /proc). */ 7374885efc8ce6d315e0593e5f669cc805e264cf68Doug Zongker public static final String HARDWARE = getString("ro.hardware"); 7442471dd5552a346dd82a58a663159875ccc4fb79Dan Egnor 757d2e3df60d33a73f5ef62ea462a9c6da5e3efc9aDoug Zongker /** A hardware serial number, if available. Alphanumeric only, case-insensitive. */ 767d2e3df60d33a73f5ef62ea462a9c6da5e3efc9aDoug Zongker public static final String SERIAL = getString("ro.serialno"); 777d2e3df60d33a73f5ef62ea462a9c6da5e3efc9aDoug Zongker 789066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** Various version strings. */ 799066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static class VERSION { 809066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 819066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * The internal value used by the underlying source control to 829066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * represent this build. E.g., a perforce changelist number 839066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * or a git hash. 849066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 859066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final String INCREMENTAL = getString("ro.build.version.incremental"); 869066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 879066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 889066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * The user-visible version string. E.g., "1.0" or "3.4b5". 899066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 909066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final String RELEASE = getString("ro.build.version.release"); 919066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 929066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 93851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn * The user-visible SDK version of the framework in its raw String 94851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn * representation; use {@link #SDK_INT} instead. 95851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn * 96851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn * @deprecated Use {@link #SDK_INT} to easily get this as an integer. 979066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 984a51c20ce607c74914f90fd897f04080121ac13bDianne Hackborn @Deprecated 999066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final String SDK = getString("ro.build.version.sdk"); 100851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn 101851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn /** 102851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn * The user-visible SDK version of the framework; its possible 103851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn * values are defined in {@link Build.VERSION_CODES}. 104851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn */ 105851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn public static final int SDK_INT = SystemProperties.getInt( 106851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn "ro.build.version.sdk", 0); 107851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn 108851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn /** 109851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn * The current development codename, or the string "REL" if this is 110851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn * a release build. 111851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn */ 112851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn public static final String CODENAME = getString("ro.build.version.codename"); 1133b81bc18bb661c02ad8074c39dab16644c1e65d0Dianne Hackborn 1143b81bc18bb661c02ad8074c39dab16644c1e65d0Dianne Hackborn /** 1153b81bc18bb661c02ad8074c39dab16644c1e65d0Dianne Hackborn * The SDK version to use when accessing resources. 1163b81bc18bb661c02ad8074c39dab16644c1e65d0Dianne Hackborn * Use the current SDK version code. If we are a development build, 1173b81bc18bb661c02ad8074c39dab16644c1e65d0Dianne Hackborn * also allow the previous SDK version + 1. 1183b81bc18bb661c02ad8074c39dab16644c1e65d0Dianne Hackborn * @hide 1193b81bc18bb661c02ad8074c39dab16644c1e65d0Dianne Hackborn */ 1203b81bc18bb661c02ad8074c39dab16644c1e65d0Dianne Hackborn public static final int RESOURCES_SDK_INT = SDK_INT 1213b81bc18bb661c02ad8074c39dab16644c1e65d0Dianne Hackborn + ("REL".equals(CODENAME) ? 0 : 1); 1229066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 1239066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 124851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn /** 125851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn * Enumeration of the currently known SDK version codes. These are the 126851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn * values that can be found in {@link VERSION#SDK}. Version numbers 127851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn * increment monotonically with each official platform release. 128851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn */ 129851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn public static class VERSION_CODES { 130851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn /** 131a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn * Magic version number for a current development build, which has 132a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn * not yet turned into an official release. 133a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn */ 134a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn public static final int CUR_DEVELOPMENT = 10000; 135a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn 136a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn /** 137851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn * October 2008: The original, first, version of Android. Yay! 138851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn */ 139851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn public static final int BASE = 1; 1400fa35918af608b56fb3f6aa98341624e22447f92Dianne Hackborn 141851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn /** 142851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn * February 2009: First Android update, officially called 1.1. 143851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn */ 144851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn public static final int BASE_1_1 = 2; 1450fa35918af608b56fb3f6aa98341624e22447f92Dianne Hackborn 146851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn /** 147851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn * May 2009: Android 1.5. 148851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn */ 149851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn public static final int CUPCAKE = 3; 1500fa35918af608b56fb3f6aa98341624e22447f92Dianne Hackborn 151a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn /** 1520fa35918af608b56fb3f6aa98341624e22447f92Dianne Hackborn * September 2009: Android 1.6. 153a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn * 154a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn * <p>Applications targeting this or a later release will get these 155a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn * new changes in behavior:</p> 156a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn * <ul> 157a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn * <li> They must explicitly request the 1585a3a77dabd744d5be79d7745c2a977c108a9ad98San Mehat * {@link android.Manifest.permission#WRITE_EXTERNAL_STORAGE} permission to be 159a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn * able to modify the contents of the SD card. (Apps targeting 160a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn * earlier versions will always request the permission.) 161fe77ec8e0881963714b2464efad9514d921d089aDianne Hackborn * <li> They must explicitly request the 162fe77ec8e0881963714b2464efad9514d921d089aDianne Hackborn * {@link android.Manifest.permission#READ_PHONE_STATE} permission to be 163fe77ec8e0881963714b2464efad9514d921d089aDianne Hackborn * able to be able to retrieve phone state info. (Apps targeting 164fe77ec8e0881963714b2464efad9514d921d089aDianne Hackborn * earlier versions will always request the permission.) 165fe77ec8e0881963714b2464efad9514d921d089aDianne Hackborn * <li> They are assumed to support different screen densities and 166fe77ec8e0881963714b2464efad9514d921d089aDianne Hackborn * sizes. (Apps targeting earlier versions are assumed to only support 167fe77ec8e0881963714b2464efad9514d921d089aDianne Hackborn * medium density normal size screens unless otherwise indicated). 168fe77ec8e0881963714b2464efad9514d921d089aDianne Hackborn * They can still explicitly specify screen support either way with the 169fe77ec8e0881963714b2464efad9514d921d089aDianne Hackborn * supports-screens manifest tag. 17081e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * <li> {@link android.widget.TabHost} will use the new dark tab 17181e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * background design. 172a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn * </ul> 173a96cbb435d7b2197ab2b61fd98d14cbd6e0c5c3dDianne Hackborn */ 174fe77ec8e0881963714b2464efad9514d921d089aDianne Hackborn public static final int DONUT = 4; 1750fa35918af608b56fb3f6aa98341624e22447f92Dianne Hackborn 176f6f9f2d0256930ce0bb4913b2260b8480914edc2Dianne Hackborn /** 1770fa35918af608b56fb3f6aa98341624e22447f92Dianne Hackborn * November 2009: Android 2.0 178f6f9f2d0256930ce0bb4913b2260b8480914edc2Dianne Hackborn * 179f6f9f2d0256930ce0bb4913b2260b8480914edc2Dianne Hackborn * <p>Applications targeting this or a later release will get these 180f6f9f2d0256930ce0bb4913b2260b8480914edc2Dianne Hackborn * new changes in behavior:</p> 181f6f9f2d0256930ce0bb4913b2260b8480914edc2Dianne Hackborn * <ul> 182f6f9f2d0256930ce0bb4913b2260b8480914edc2Dianne Hackborn * <li> The {@link android.app.Service#onStartCommand 183f6f9f2d0256930ce0bb4913b2260b8480914edc2Dianne Hackborn * Service.onStartCommand} function will return the new 184f6f9f2d0256930ce0bb4913b2260b8480914edc2Dianne Hackborn * {@link android.app.Service#START_STICKY} behavior instead of the 185f6f9f2d0256930ce0bb4913b2260b8480914edc2Dianne Hackborn * old compatibility {@link android.app.Service#START_STICKY_COMPATIBILITY}. 1868d37426c754e9822feaa8c6cc0b7c13e8523e217Dianne Hackborn * <li> The {@link android.app.Activity} class will now execute back 1878d37426c754e9822feaa8c6cc0b7c13e8523e217Dianne Hackborn * key presses on the key up instead of key down, to be able to detect 1888d37426c754e9822feaa8c6cc0b7c13e8523e217Dianne Hackborn * canceled presses from virtual keys. 1897609764295d1b3ec0b53d1ae536ee0280f5e0407Mike Cleron * <li> The {@link android.widget.TabWidget} class will use a new color scheme 1907609764295d1b3ec0b53d1ae536ee0280f5e0407Mike Cleron * for tabs. In the new scheme, the foreground tab has a medium gray background 1917609764295d1b3ec0b53d1ae536ee0280f5e0407Mike Cleron * the background tabs have a dark gray background. 192f6f9f2d0256930ce0bb4913b2260b8480914edc2Dianne Hackborn * </ul> 193f6f9f2d0256930ce0bb4913b2260b8480914edc2Dianne Hackborn */ 1946dc3f4e553d333b9f115a222a9a684bb2aa55b5eJeff Hamilton public static final int ECLAIR = 5; 1950fa35918af608b56fb3f6aa98341624e22447f92Dianne Hackborn 1960fa35918af608b56fb3f6aa98341624e22447f92Dianne Hackborn /** 1971778776cf1349a5f275945c53edcd1454d58639cDianne Hackborn * December 2009: Android 2.0.1 1980fa35918af608b56fb3f6aa98341624e22447f92Dianne Hackborn */ 1991778776cf1349a5f275945c53edcd1454d58639cDianne Hackborn public static final int ECLAIR_0_1 = 6; 20023ef7b4836d66d31430fedee2aac36275bb30d4bDianne Hackborn 20123ef7b4836d66d31430fedee2aac36275bb30d4bDianne Hackborn /** 20223ef7b4836d66d31430fedee2aac36275bb30d4bDianne Hackborn * January 2010: Android 2.1 20323ef7b4836d66d31430fedee2aac36275bb30d4bDianne Hackborn */ 20423ef7b4836d66d31430fedee2aac36275bb30d4bDianne Hackborn public static final int ECLAIR_MR1 = 7; 205216bccf804db9c972b317620a27de6a8adf7fbfeAdam Powell 2063e03cfa3af8acf3aad0abc464d2bcab1225a971dDianne Hackborn /** 2073e03cfa3af8acf3aad0abc464d2bcab1225a971dDianne Hackborn * June 2010: Android 2.2 2083e03cfa3af8acf3aad0abc464d2bcab1225a971dDianne Hackborn */ 209216bccf804db9c972b317620a27de6a8adf7fbfeAdam Powell public static final int FROYO = 8; 21014cee9f688c32d63d8521188e7422811629bb7c2Dianne Hackborn 2113e03cfa3af8acf3aad0abc464d2bcab1225a971dDianne Hackborn /** 2129d97b63d0e0c7c9deb2d140c1dd579b51f52c1afDianne Hackborn * November 2010: Android 2.3 21381e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * 21481e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * <p>Applications targeting this or a later release will get these 21581e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * new changes in behavior:</p> 21681e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * <ul> 21781e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * <li> The application's notification icons will be shown on the new 21881e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * dark status bar background, so must be visible in this situation. 21981e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * </ul> 2203e03cfa3af8acf3aad0abc464d2bcab1225a971dDianne Hackborn */ 2214fa1a221b466d6da6c68150b38cd17b085ab5e26Dianne Hackborn public static final int GINGERBREAD = 9; 2229d97b63d0e0c7c9deb2d140c1dd579b51f52c1afDianne Hackborn 2239d97b63d0e0c7c9deb2d140c1dd579b51f52c1afDianne Hackborn /** 224edf1fc6ce642c8d0f675795635d223b26d9f825cDianne Hackborn * February 2011: Android 2.3.3. 2259d97b63d0e0c7c9deb2d140c1dd579b51f52c1afDianne Hackborn */ 2269d97b63d0e0c7c9deb2d140c1dd579b51f52c1afDianne Hackborn public static final int GINGERBREAD_MR1 = 10; 227b1ad5977bc8178b6d350ebe9099daded4c1ef603Dianne Hackborn 228b1ad5977bc8178b6d350ebe9099daded4c1ef603Dianne Hackborn /** 229edf1fc6ce642c8d0f675795635d223b26d9f825cDianne Hackborn * February 2011: Android 3.0. 230b1ad5977bc8178b6d350ebe9099daded4c1ef603Dianne Hackborn * 231b1ad5977bc8178b6d350ebe9099daded4c1ef603Dianne Hackborn * <p>Applications targeting this or a later release will get these 232b1ad5977bc8178b6d350ebe9099daded4c1ef603Dianne Hackborn * new changes in behavior:</p> 233b1ad5977bc8178b6d350ebe9099daded4c1ef603Dianne Hackborn * <ul> 2343e6d50cc484f2eee0cff63789cc7796718eb6b68Dianne Hackborn * <li> The default theme for applications is now dark holographic: 2353e6d50cc484f2eee0cff63789cc7796718eb6b68Dianne Hackborn * {@link android.R.style#Theme_Holo}. 23681e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * <li> On large screen devices that do not have a physical menu 23781e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * button, the soft (compatibility) menu is disabled. 2380aae2d4e0075fd699cf40b26dca0eb2c3b3e37d2Dianne Hackborn * <li> The activity lifecycle has changed slightly as per 2390aae2d4e0075fd699cf40b26dca0eb2c3b3e37d2Dianne Hackborn * {@link android.app.Activity}. 24081e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * <li> An application will crash if it does not call through 24181e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * to the super implementation of its 24281e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * {@link android.app.Activity#onPause Activity.onPause()} method. 2439d97b63d0e0c7c9deb2d140c1dd579b51f52c1afDianne Hackborn * <li> When an application requires a permission to access one of 2446c2c5fc9930d14d502a22326dee9bf4475dbd649Dianne Hackborn * its components (activity, receiver, service, provider), this 2456c2c5fc9930d14d502a22326dee9bf4475dbd649Dianne Hackborn * permission is no longer enforced when the application wants to 2466c2c5fc9930d14d502a22326dee9bf4475dbd649Dianne Hackborn * access its own component. This means it can require a permission 2476c2c5fc9930d14d502a22326dee9bf4475dbd649Dianne Hackborn * on a component that it does not itself hold and still access that 2486c2c5fc9930d14d502a22326dee9bf4475dbd649Dianne Hackborn * component. 24981e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * <li> {@link android.content.Context#getSharedPreferences 25081e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * Context.getSharedPreferences()} will not automatically reload 25181e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * the preferences if they have changed on storage, unless 25281e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * {@link android.content.Context#MODE_MULTI_PROCESS} is used. 25381e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * <li> {@link android.view.ViewGroup#setMotionEventSplittingEnabled} 25481e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * will default to true. 25581e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * <li> {@link android.view.WindowManager.LayoutParams#FLAG_SPLIT_TOUCH} 25681e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * is enabled by default on windows. 25781e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * <li> {@link android.widget.PopupWindow#isSplitTouchEnabled() 25881e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * PopupWindow.isSplitTouchEnabled()} will return true by default. 25981e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * <li> {@link android.widget.GridView} and {@link android.widget.ListView} 26081e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * will use {@link android.view.View#setActivated View.setActivated} 26181e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * for selected items if they do not implement {@link android.widget.Checkable}. 26281e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * <li> {@link android.widget.Scroller} will be constructed with 26381e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * "flywheel" behavior enabled by default. 264b1ad5977bc8178b6d350ebe9099daded4c1ef603Dianne Hackborn * </ul> 265b1ad5977bc8178b6d350ebe9099daded4c1ef603Dianne Hackborn */ 2669d97b63d0e0c7c9deb2d140c1dd579b51f52c1afDianne Hackborn public static final int HONEYCOMB = 11; 267edf1fc6ce642c8d0f675795635d223b26d9f825cDianne Hackborn 268edf1fc6ce642c8d0f675795635d223b26d9f825cDianne Hackborn /** 269a8138732a01b92f0a40f72050b74a3bd4cf6d215Dianne Hackborn * May 2011: Android 3.1. 270edf1fc6ce642c8d0f675795635d223b26d9f825cDianne Hackborn */ 271edf1fc6ce642c8d0f675795635d223b26d9f825cDianne Hackborn public static final int HONEYCOMB_MR1 = 12; 272a8138732a01b92f0a40f72050b74a3bd4cf6d215Dianne Hackborn 273a8138732a01b92f0a40f72050b74a3bd4cf6d215Dianne Hackborn /** 274426431adcc220b6adfbe1d9530247f897e60fa36Dianne Hackborn * June 2011: Android 3.2. 275e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn * 276e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn * <p>Update to Honeycomb MR1 to support 7 inch tablets, improve 277e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn * screen compatibility mode, etc.</p> 278e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn * 279e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn * <p>As of this version, applications that don't say whether they 280e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn * support XLARGE screens will be assumed to do so only if they target 281e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn * {@link #HONEYCOMB} or later; it had been {@link #GINGERBREAD} or 282e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn * later. Applications that don't support a screen size at least as 283e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn * large as the current screen will provide the user with a UI to 284e66763516a9c27c192adaba417616371a1c3c9bfDianne Hackborn * switch them in to screen size compatibility mode.</p> 285e289bff0ec2b1af4ba773e0c8d49d5fd46eb9921Dianne Hackborn * 286e289bff0ec2b1af4ba773e0c8d49d5fd46eb9921Dianne Hackborn * <p>This version introduces new screen size resource qualifiers 287e289bff0ec2b1af4ba773e0c8d49d5fd46eb9921Dianne Hackborn * based on the screen size in dp: see 288e289bff0ec2b1af4ba773e0c8d49d5fd46eb9921Dianne Hackborn * {@link android.content.res.Configuration#screenWidthDp}, 289e289bff0ec2b1af4ba773e0c8d49d5fd46eb9921Dianne Hackborn * {@link android.content.res.Configuration#screenHeightDp}, and 290e289bff0ec2b1af4ba773e0c8d49d5fd46eb9921Dianne Hackborn * {@link android.content.res.Configuration#smallestScreenWidthDp}. 291e289bff0ec2b1af4ba773e0c8d49d5fd46eb9921Dianne Hackborn * Supplying these in <supports-screens> as per 292e289bff0ec2b1af4ba773e0c8d49d5fd46eb9921Dianne Hackborn * {@link android.content.pm.ApplicationInfo#requiresSmallestWidthDp}, 293e289bff0ec2b1af4ba773e0c8d49d5fd46eb9921Dianne Hackborn * {@link android.content.pm.ApplicationInfo#compatibleWidthLimitDp}, and 294e289bff0ec2b1af4ba773e0c8d49d5fd46eb9921Dianne Hackborn * {@link android.content.pm.ApplicationInfo#largestWidthLimitDp} is 295e289bff0ec2b1af4ba773e0c8d49d5fd46eb9921Dianne Hackborn * preferred over the older screen size buckets and for older devices 296e289bff0ec2b1af4ba773e0c8d49d5fd46eb9921Dianne Hackborn * the appropriate buckets will be inferred from them.</p> 297e289bff0ec2b1af4ba773e0c8d49d5fd46eb9921Dianne Hackborn * 29881e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * <p>Applications targeting this or a later release will get these 29981e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * new changes in behavior:</p> 30081e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * <ul> 30181e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * <li><p>New {@link android.content.pm.PackageManager#FEATURE_SCREEN_PORTRAIT} 302e289bff0ec2b1af4ba773e0c8d49d5fd46eb9921Dianne Hackborn * and {@link android.content.pm.PackageManager#FEATURE_SCREEN_LANDSCAPE} 30381e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * features were introduced in this release. Applications that target 304e289bff0ec2b1af4ba773e0c8d49d5fd46eb9921Dianne Hackborn * previous platform versions are assumed to require both portrait and 305e289bff0ec2b1af4ba773e0c8d49d5fd46eb9921Dianne Hackborn * landscape support in the device; when targeting Honeycomb MR1 or 306e289bff0ec2b1af4ba773e0c8d49d5fd46eb9921Dianne Hackborn * greater the application is responsible for specifying any specific 307e289bff0ec2b1af4ba773e0c8d49d5fd46eb9921Dianne Hackborn * orientation it requires.</p> 30881e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * <li><p>{@link android.os.AsyncTask} will use the serial executor 30981e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * by default when calling {@link android.os.AsyncTask#execute}.</p> 31081e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * <li><p>{@link android.content.pm.ActivityInfo#configChanges 31181e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * ActivityInfo.configChanges} will have the 31281e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * {@link android.content.pm.ActivityInfo#CONFIG_SCREEN_SIZE} and 31381e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * {@link android.content.pm.ActivityInfo#CONFIG_SMALLEST_SCREEN_SIZE} 31481e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * bits set; these need to be cleared for older applications because 31581e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * some developers have done absolute comparisons against this value 31681e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * instead of correctly masking the bits they are interested in. 31781e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * </ul> 318a8138732a01b92f0a40f72050b74a3bd4cf6d215Dianne Hackborn */ 319426431adcc220b6adfbe1d9530247f897e60fa36Dianne Hackborn public static final int HONEYCOMB_MR2 = 13; 3203fc982f41fda1f254bfbc35490d81cd82a0ed90aDianne Hackborn 3213fc982f41fda1f254bfbc35490d81cd82a0ed90aDianne Hackborn /** 322f35fe23669aeeebd2db2acb6baacae503dba03a8Dianne Hackborn * October 2011: Android 4.0. 3232d6833bab353e31ceb4230f3f3563fca2e0d9f6fDianne Hackborn * 3242d6833bab353e31ceb4230f3f3563fca2e0d9f6fDianne Hackborn * <p>Applications targeting this or a later release will get these 3252d6833bab353e31ceb4230f3f3563fca2e0d9f6fDianne Hackborn * new changes in behavior:</p> 3262d6833bab353e31ceb4230f3f3563fca2e0d9f6fDianne Hackborn * <ul> 3279d0e37e27cc4e71088afb2cda927454bca14b939Dianne Hackborn * <li> For devices without a dedicated menu key, the software compatibility 3289d0e37e27cc4e71088afb2cda927454bca14b939Dianne Hackborn * menu key will not be shown even on phones. By targeting Ice Cream Sandwich 3299d0e37e27cc4e71088afb2cda927454bca14b939Dianne Hackborn * or later, your UI must always have its own menu UI affordance if needed, 3309d0e37e27cc4e71088afb2cda927454bca14b939Dianne Hackborn * on both tablets and phones. The ActionBar will take care of this for you. 3312d6833bab353e31ceb4230f3f3563fca2e0d9f6fDianne Hackborn * <li> 2d drawing hardware acceleration is now turned on by default. 3322d6833bab353e31ceb4230f3f3563fca2e0d9f6fDianne Hackborn * You can use 3332d6833bab353e31ceb4230f3f3563fca2e0d9f6fDianne Hackborn * {@link android.R.attr#hardwareAccelerated android:hardwareAccelerated} 3342d6833bab353e31ceb4230f3f3563fca2e0d9f6fDianne Hackborn * to turn it off if needed, although this is strongly discouraged since 3352d6833bab353e31ceb4230f3f3563fca2e0d9f6fDianne Hackborn * it will result in poor performance on larger screen devices. 3366e90a362bc66cc67b1beae27b21d3f0148403b08Adam Powell * <li> The default theme for applications is now the "device default" theme: 3376e90a362bc66cc67b1beae27b21d3f0148403b08Adam Powell * {@link android.R.style#Theme_DeviceDefault}. This may be the 3386e90a362bc66cc67b1beae27b21d3f0148403b08Adam Powell * holo dark theme or a different dark theme defined by the specific device. 3396e90a362bc66cc67b1beae27b21d3f0148403b08Adam Powell * The {@link android.R.style#Theme_Holo} family must not be modified 3406e90a362bc66cc67b1beae27b21d3f0148403b08Adam Powell * for a device to be considered compatible. Applications that explicitly 3416e90a362bc66cc67b1beae27b21d3f0148403b08Adam Powell * request a theme from the Holo family will be guaranteed that these themes 3426e90a362bc66cc67b1beae27b21d3f0148403b08Adam Powell * will not change character within the same platform version. Applications 3436e90a362bc66cc67b1beae27b21d3f0148403b08Adam Powell * that wish to blend in with the device should use a theme from the 3446e90a362bc66cc67b1beae27b21d3f0148403b08Adam Powell * {@link android.R.style#Theme_DeviceDefault} family. 3459d0e37e27cc4e71088afb2cda927454bca14b939Dianne Hackborn * <li> Managed cursors can now throw an exception if you directly close 3469d0e37e27cc4e71088afb2cda927454bca14b939Dianne Hackborn * the cursor yourself without stopping the management of it; previously failures 3479d0e37e27cc4e71088afb2cda927454bca14b939Dianne Hackborn * would be silently ignored. 3489d0e37e27cc4e71088afb2cda927454bca14b939Dianne Hackborn * <li> The fadingEdge attribute on views will be ignored (fading edges is no 3499d0e37e27cc4e71088afb2cda927454bca14b939Dianne Hackborn * longer a standard part of the UI). A new requiresFadingEdge attribute allows 3509d0e37e27cc4e71088afb2cda927454bca14b939Dianne Hackborn * applications to still force fading edges on for special cases. 35181e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * <li> {@link android.content.Context#bindService Context.bindService()} 35281e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * will not automatically add in {@link android.content.Context#BIND_WAIVE_PRIORITY}. 35381e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * <li> App Widgets will have standard padding automatically added around 35481e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * them, rather than relying on the padding being baked into the widget itself. 35581e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * <li> An exception will be thrown if you try to change the type of a 35681e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * window after it has been added to the window manager. Previously this 35781e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * would result in random incorrect behavior. 35881e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * <li> {@link android.view.animation.AnimationSet} will parse out 35981e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * the duration, fillBefore, fillAfter, repeatMode, and startOffset 36081e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * XML attributes that are defined. 36181e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * <li> {@link android.app.ActionBar#setHomeButtonEnabled 36281e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * ActionBar.setHomeButtonEnabled()} is false by default. 3632d6833bab353e31ceb4230f3f3563fca2e0d9f6fDianne Hackborn * </ul> 3643fc982f41fda1f254bfbc35490d81cd82a0ed90aDianne Hackborn */ 3650784cfb4b75e5ec3f4cc2ff57000c007f93b50b1Dianne Hackborn public static final int ICE_CREAM_SANDWICH = 14; 366f35fe23669aeeebd2db2acb6baacae503dba03a8Dianne Hackborn 367f35fe23669aeeebd2db2acb6baacae503dba03a8Dianne Hackborn /** 36881e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn * December 2011: Android 4.0.3. 369f35fe23669aeeebd2db2acb6baacae503dba03a8Dianne Hackborn */ 370f35fe23669aeeebd2db2acb6baacae503dba03a8Dianne Hackborn public static final int ICE_CREAM_SANDWICH_MR1 = 15; 37181e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn 37281e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn /** 373435cdb4604d9112c2fa8b2bb8d0ec49468bfdcf2Dianne Hackborn * June 2012: Android 4.1. 3746569625beef705ec489662b80d372c4423f9c7f7Dianne Hackborn * 3756569625beef705ec489662b80d372c4423f9c7f7Dianne Hackborn * <p>Applications targeting this or a later release will get these 3766569625beef705ec489662b80d372c4423f9c7f7Dianne Hackborn * new changes in behavior:</p> 3776569625beef705ec489662b80d372c4423f9c7f7Dianne Hackborn * <ul> 378636fd528f7ad51f565a390226d9f469f8c675ccfDianne Hackborn * <li> You must explicitly request the {@link android.Manifest.permission#READ_CALL_LOG} 379636fd528f7ad51f565a390226d9f469f8c675ccfDianne Hackborn * and/or {@link android.Manifest.permission#WRITE_CALL_LOG} permissions; 380636fd528f7ad51f565a390226d9f469f8c675ccfDianne Hackborn * access to the call log is no longer implicitly provided through 381636fd528f7ad51f565a390226d9f469f8c675ccfDianne Hackborn * {@link android.Manifest.permission#READ_CONTACTS} and 382636fd528f7ad51f565a390226d9f469f8c675ccfDianne Hackborn * {@link android.Manifest.permission#WRITE_CONTACTS}. 383636fd528f7ad51f565a390226d9f469f8c675ccfDianne Hackborn * <li> {@link android.widget.RemoteViews} will throw an exception if 384636fd528f7ad51f565a390226d9f469f8c675ccfDianne Hackborn * setting an onClick handler for views being generated by a 385636fd528f7ad51f565a390226d9f469f8c675ccfDianne Hackborn * {@link android.widget.RemoteViewsService} for a collection container; 386636fd528f7ad51f565a390226d9f469f8c675ccfDianne Hackborn * previously this just resulted in a warning log message. 387636fd528f7ad51f565a390226d9f469f8c675ccfDianne Hackborn * <li> New {@link android.app.ActionBar} policy for embedded tabs: 388636fd528f7ad51f565a390226d9f469f8c675ccfDianne Hackborn * embedded tabs are now always stacked in the action bar when in portrait 389636fd528f7ad51f565a390226d9f469f8c675ccfDianne Hackborn * mode, regardless of the size of the screen. 390636fd528f7ad51f565a390226d9f469f8c675ccfDianne Hackborn * <li> {@link android.webkit.WebSettings#setAllowFileAccessFromFileURLs(boolean) 391636fd528f7ad51f565a390226d9f469f8c675ccfDianne Hackborn * WebSettings.setAllowFileAccessFromFileURLs} and 392636fd528f7ad51f565a390226d9f469f8c675ccfDianne Hackborn * {@link android.webkit.WebSettings#setAllowUniversalAccessFromFileURLs(boolean) 393636fd528f7ad51f565a390226d9f469f8c675ccfDianne Hackborn * WebSettings.setAllowUniversalAccessFromFileURLs} default to false. 3946569625beef705ec489662b80d372c4423f9c7f7Dianne Hackborn * <li> Calls to {@link android.content.pm.PackageManager#setComponentEnabledSetting 3956569625beef705ec489662b80d372c4423f9c7f7Dianne Hackborn * PackageManager.setComponentEnabledSetting} will now throw an 3966569625beef705ec489662b80d372c4423f9c7f7Dianne Hackborn * IllegalArgumentException if the given component class name does not 3976569625beef705ec489662b80d372c4423f9c7f7Dianne Hackborn * exist in the application's manifest. 398636fd528f7ad51f565a390226d9f469f8c675ccfDianne Hackborn * <li> {@link android.nfc.NfcAdapter#setNdefPushMessage 399636fd528f7ad51f565a390226d9f469f8c675ccfDianne Hackborn * NfcAdapter.setNdefPushMessage}, 400636fd528f7ad51f565a390226d9f469f8c675ccfDianne Hackborn * {@link android.nfc.NfcAdapter#setNdefPushMessageCallback 401636fd528f7ad51f565a390226d9f469f8c675ccfDianne Hackborn * NfcAdapter.setNdefPushMessageCallback} and 402636fd528f7ad51f565a390226d9f469f8c675ccfDianne Hackborn * {@link android.nfc.NfcAdapter#setOnNdefPushCompleteCallback 403636fd528f7ad51f565a390226d9f469f8c675ccfDianne Hackborn * NfcAdapter.setOnNdefPushCompleteCallback} will throw 404636fd528f7ad51f565a390226d9f469f8c675ccfDianne Hackborn * IllegalStateException if called after the Activity has been destroyed. 405636fd528f7ad51f565a390226d9f469f8c675ccfDianne Hackborn * <li> Accessibility services must require the new 406636fd528f7ad51f565a390226d9f469f8c675ccfDianne Hackborn * {@link android.Manifest.permission#BIND_ACCESSIBILITY_SERVICE} permission or 407636fd528f7ad51f565a390226d9f469f8c675ccfDianne Hackborn * they will not be available for use. 408636fd528f7ad51f565a390226d9f469f8c675ccfDianne Hackborn * <li> {@link android.accessibilityservice.AccessibilityServiceInfo#FLAG_INCLUDE_NOT_IMPORTANT_VIEWS 409636fd528f7ad51f565a390226d9f469f8c675ccfDianne Hackborn * AccessibilityServiceInfo.FLAG_INCLUDE_NOT_IMPORTANT_VIEWS} must be set 410636fd528f7ad51f565a390226d9f469f8c675ccfDianne Hackborn * for unimportant views to be included in queries. 4116569625beef705ec489662b80d372c4423f9c7f7Dianne Hackborn * </ul> 41281e9276a479fd3a5ccc3129505c0fb018941934bDianne Hackborn */ 413fa61f0b2e25382d3a8ea35024dd227606151e87aDianne Hackborn public static final int JELLY_BEAN = 16; 414435cdb4604d9112c2fa8b2bb8d0ec49468bfdcf2Dianne Hackborn 415435cdb4604d9112c2fa8b2bb8d0ec49468bfdcf2Dianne Hackborn /** 416fc4947491f785600b8770112fa1d19ece06d42f9Dianne Hackborn * Android 4.2: Moar jelly beans! 417f097b16cfddce2dbb097b929458fe9b0a402963eNick Kralevich * 418f097b16cfddce2dbb097b929458fe9b0a402963eNick Kralevich * <p>Applications targeting this or a later release will get these 419f097b16cfddce2dbb097b929458fe9b0a402963eNick Kralevich * new changes in behavior:</p> 420f097b16cfddce2dbb097b929458fe9b0a402963eNick Kralevich * <ul> 421f097b16cfddce2dbb097b929458fe9b0a402963eNick Kralevich * <li>Content Providers: The default value of {@code android:exported} is now 422f097b16cfddce2dbb097b929458fe9b0a402963eNick Kralevich * {@code false}. See 4232caec6c682853ccbfe73ef5ae15c1d03ea043e8aNick Kralevich * <a href="{@docRoot}guide/topics/manifest/provider-element.html#exported"> 424f097b16cfddce2dbb097b929458fe9b0a402963eNick Kralevich * the android:exported section</a> in the provider documentation for more details.</li> 425fc4947491f785600b8770112fa1d19ece06d42f9Dianne Hackborn * <li>{@link android.view.View#getLayoutDirection() View.getLayoutDirection()} 426fc4947491f785600b8770112fa1d19ece06d42f9Dianne Hackborn * can return different values than {@link android.view.View#LAYOUT_DIRECTION_LTR} 427fc4947491f785600b8770112fa1d19ece06d42f9Dianne Hackborn * based on the locale etc. 428fc4947491f785600b8770112fa1d19ece06d42f9Dianne Hackborn * <li> {@link android.webkit.WebView#addJavascriptInterface(Object, String) 429fc4947491f785600b8770112fa1d19ece06d42f9Dianne Hackborn * WebView.addJavascriptInterface} requires explicit annotations on methods 430fc4947491f785600b8770112fa1d19ece06d42f9Dianne Hackborn * for them to be accessible from Javascript. 431f097b16cfddce2dbb097b929458fe9b0a402963eNick Kralevich * </ul> 432435cdb4604d9112c2fa8b2bb8d0ec49468bfdcf2Dianne Hackborn */ 433435cdb4604d9112c2fa8b2bb8d0ec49468bfdcf2Dianne Hackborn public static final int JELLY_BEAN_MR1 = 17; 434851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn } 435851a54143c15a1c33361efae2db3f7f45059b472Dianne Hackborn 4369066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** The type of build, like "user" or "eng". */ 4379066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final String TYPE = getString("ro.build.type"); 4389066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 4399066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** Comma-separated tags describing the build, like "unsigned,debug". */ 4409066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final String TAGS = getString("ro.build.tags"); 4419066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 4429066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** A string that uniquely identifies this build. Do not attempt to parse this value. */ 4439066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final String FINGERPRINT = getString("ro.build.fingerprint"); 4449066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 4459066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project // The following properties only make sense for internal engineering builds. 4469066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final long TIME = getLong("ro.build.date.utc") * 1000; 4479066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final String USER = getString("ro.build.user"); 4489066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project public static final String HOST = getString("ro.build.host"); 4499066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 450ad2171acf423224d925d1b7cefa7184882e100bfDoug Zongker /** 45189101cd9d9b5c1a6ff1ed85eba0613ca4c4802e2Jeff Brown * Returns true if we are running a debug build such as "user-debug" or "eng". 45289101cd9d9b5c1a6ff1ed85eba0613ca4c4802e2Jeff Brown * @hide 45389101cd9d9b5c1a6ff1ed85eba0613ca4c4802e2Jeff Brown */ 45489101cd9d9b5c1a6ff1ed85eba0613ca4c4802e2Jeff Brown public static final boolean IS_DEBUGGABLE = 45589101cd9d9b5c1a6ff1ed85eba0613ca4c4802e2Jeff Brown SystemProperties.getInt("ro.debuggable", 0) == 1; 45689101cd9d9b5c1a6ff1ed85eba0613ca4c4802e2Jeff Brown 45789101cd9d9b5c1a6ff1ed85eba0613ca4c4802e2Jeff Brown /** 458ad2171acf423224d925d1b7cefa7184882e100bfDoug Zongker * Returns the version string for the radio firmware. May return 459ad2171acf423224d925d1b7cefa7184882e100bfDoug Zongker * null (if, for instance, the radio is not currently on). 460ad2171acf423224d925d1b7cefa7184882e100bfDoug Zongker */ 461ad2171acf423224d925d1b7cefa7184882e100bfDoug Zongker public static String getRadioVersion() { 462ad2171acf423224d925d1b7cefa7184882e100bfDoug Zongker return SystemProperties.get(TelephonyProperties.PROPERTY_BASEBAND_VERSION, null); 463ad2171acf423224d925d1b7cefa7184882e100bfDoug Zongker } 464ad2171acf423224d925d1b7cefa7184882e100bfDoug Zongker 4659066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project private static String getString(String property) { 4669066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project return SystemProperties.get(property, UNKNOWN); 4679066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 4689066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 4699066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project private static long getLong(String property) { 4709066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project try { 4719066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project return Long.parseLong(SystemProperties.get(property)); 4729066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } catch (NumberFormatException e) { 4739066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project return -1; 4749066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 4759066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project } 4769066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project} 477