cmsdk: API level 4 for M release.
Change-Id: Ieed8ebf256e91515b6921186487b83462910bca9
This commit is contained in:
parent
5c29aa4e50
commit
4e53461e71
|
@ -236,7 +236,8 @@ LOCAL_DROIDDOC_OPTIONS := \
|
||||||
-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
|
-since $(CM_SRC_API_DIR)/3.txt 3 \
|
||||||
|
-since $(CM_SRC_API_DIR)/4.txt 4
|
||||||
|
|
||||||
$(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.CANTALOUPE;
|
public static final int PARCELABLE_VERSION = CM_VERSION_CODES.DRAGON_FRUIT;
|
||||||
|
|
||||||
private static final SparseArray<String> sdkMap;
|
private static final SparseArray<String> sdkMap;
|
||||||
static
|
static
|
||||||
|
@ -45,6 +45,7 @@ public class Build {
|
||||||
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");
|
sdkMap.put(CM_VERSION_CODES.CANTALOUPE, "Cantaloupe");
|
||||||
|
sdkMap.put(CM_VERSION_CODES.DRAGON_FRUIT, "Dragon Fruit");
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Various version strings. */
|
/** Various version strings. */
|
||||||
|
@ -111,6 +112,13 @@ public class Build {
|
||||||
* TODO: Pending Q1 release
|
* TODO: Pending Q1 release
|
||||||
*/
|
*/
|
||||||
public static final int CANTALOUPE = 3;
|
public static final int CANTALOUPE = 3;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* First M Release
|
||||||
|
*/
|
||||||
|
public static final int DRAGON_FRUIT = 4;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -38,20 +38,20 @@ public class BuildTest extends AndroidTestCase {
|
||||||
|
|
||||||
@SmallTest
|
@SmallTest
|
||||||
public void testSdkApiLevelCurrent() {
|
public void testSdkApiLevelCurrent() {
|
||||||
assertEquals(Build.CM_VERSION_CODES.CANTALOUPE, Build.CM_VERSION.SDK_INT);
|
assertEquals(Build.CM_VERSION_CODES.DRAGON_FRUIT, 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.CANTALOUPE), apiName);
|
assertEquals(Build.getNameForSDKInt(Build.CM_VERSION_CODES.DRAGON_FRUIT), 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.CANTALOUPE + 1) {
|
if (Build.CM_VERSION.SDK_INT > Build.CM_VERSION_CODES.DRAGON_FRUIT + 1) {
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
assertEquals(0, i);
|
assertEquals(0, i);
|
||||||
|
|
Loading…
Reference in New Issue