cmsdk: Create api level 3, cantaloupe.
Change-Id: I5cefacf1196261b071ce2c3561f18ebaf74de604
This commit is contained in:
parent
05d0129478
commit
38e8b11ea7
|
@ -235,7 +235,8 @@ LOCAL_DROIDDOC_OPTIONS := \
|
||||||
-hdf sdk.rel.id $(cmplat_docs_docs_SDK_REL_ID) \
|
-hdf sdk.rel.id $(cmplat_docs_docs_SDK_REL_ID) \
|
||||||
-hdf sdk.preview 0 \
|
-hdf sdk.preview 0 \
|
||||||
-since $(CM_SRC_API_DIR)/1.txt 1 \
|
-since $(CM_SRC_API_DIR)/1.txt 1 \
|
||||||
-since $(CM_SRC_API_DIR)/2.txt 2
|
-since $(CM_SRC_API_DIR)/2.txt 2 \
|
||||||
|
-since $(CM_SRC_API_DIR)/3.txt 3
|
||||||
|
|
||||||
$(full_target): $(cm_framework_built) $(gen)
|
$(full_target): $(cm_framework_built) $(gen)
|
||||||
include $(BUILD_DROIDDOC)
|
include $(BUILD_DROIDDOC)
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class Build {
|
||||||
* {@link CM_VERSION_CODES}
|
* {@link CM_VERSION_CODES}
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
public static final int PARCELABLE_VERSION = CM_VERSION_CODES.BOYSENBERRY;
|
public static final int PARCELABLE_VERSION = CM_VERSION_CODES.CANTALOUPE;
|
||||||
|
|
||||||
private static final SparseArray<String> sdkMap;
|
private static final SparseArray<String> sdkMap;
|
||||||
static
|
static
|
||||||
|
@ -44,6 +44,7 @@ public class Build {
|
||||||
sdkMap = new SparseArray<String>();
|
sdkMap = new SparseArray<String>();
|
||||||
sdkMap.put(CM_VERSION_CODES.APRICOT, "Apricot");
|
sdkMap.put(CM_VERSION_CODES.APRICOT, "Apricot");
|
||||||
sdkMap.put(CM_VERSION_CODES.BOYSENBERRY, "Boysenberry");
|
sdkMap.put(CM_VERSION_CODES.BOYSENBERRY, "Boysenberry");
|
||||||
|
sdkMap.put(CM_VERSION_CODES.CANTALOUPE, "Cantaloupe");
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Various version strings. */
|
/** Various version strings. */
|
||||||
|
@ -105,6 +106,11 @@ public class Build {
|
||||||
* </ul>
|
* </ul>
|
||||||
*/
|
*/
|
||||||
public static final int BOYSENBERRY = 2;
|
public static final int BOYSENBERRY = 2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO: Pending Q1 release
|
||||||
|
*/
|
||||||
|
public static final int CANTALOUPE = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -38,20 +38,20 @@ public class BuildTest extends AndroidTestCase {
|
||||||
|
|
||||||
@SmallTest
|
@SmallTest
|
||||||
public void testSdkApiLevelCurrent() {
|
public void testSdkApiLevelCurrent() {
|
||||||
assertEquals(Build.CM_VERSION_CODES.BOYSENBERRY, Build.CM_VERSION.SDK_INT);
|
assertEquals(Build.CM_VERSION_CODES.CANTALOUPE, Build.CM_VERSION.SDK_INT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SmallTest
|
@SmallTest
|
||||||
public void testSdkApiLevelCanMatch() {
|
public void testSdkApiLevelCanMatch() {
|
||||||
String apiName = Build.getNameForSDKInt(Build.CM_VERSION.SDK_INT);
|
String apiName = Build.getNameForSDKInt(Build.CM_VERSION.SDK_INT);
|
||||||
assertNotNull(apiName);
|
assertNotNull(apiName);
|
||||||
assertEquals(Build.getNameForSDKInt(Build.CM_VERSION_CODES.BOYSENBERRY), apiName);
|
assertEquals(Build.getNameForSDKInt(Build.CM_VERSION_CODES.CANTALOUPE), apiName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SmallTest
|
@SmallTest
|
||||||
public void testSdkApiLevelSkippedIfGreaterThanAllowed() {
|
public void testSdkApiLevelSkippedIfGreaterThanAllowed() {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
if (Build.CM_VERSION.SDK_INT > Build.CM_VERSION_CODES.BOYSENBERRY + 1) {
|
if (Build.CM_VERSION.SDK_INT > Build.CM_VERSION_CODES.CANTALOUPE + 1) {
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
assertEquals(0, i);
|
assertEquals(0, i);
|
||||||
|
|
Loading…
Reference in New Issue