Replace FIRST_SDK_INT to DEVICE_INITIAL_SDK_INT in Connectivity am: bee1c6d9cd

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1686026

Change-Id: I6dd95839749f877a272070387130aada5a157062
This commit is contained in:
paulhu
2021-07-19 10:08:41 +00:00
committed by Automerger Merge Worker
3 changed files with 5 additions and 5 deletions

View File

@@ -153,7 +153,7 @@ public class PermissionMonitor {
* Get device first sdk version.
*/
public int getDeviceFirstSdkInt() {
return Build.VERSION.FIRST_SDK_INT;
return Build.VERSION.DEVICE_INITIAL_SDK_INT;
}
/**

View File

@@ -1698,7 +1698,7 @@ public class ConnectivityManagerTest {
return;
}
final int firstSdk = Build.VERSION.FIRST_SDK_INT;
final int firstSdk = Build.VERSION.DEVICE_INITIAL_SDK_INT;
if (firstSdk < Build.VERSION_CODES.Q) {
Log.i(TAG, "testSocketKeepaliveLimitTelephony: skip test for devices launching"
+ " before Q: " + firstSdk);

View File

@@ -123,7 +123,7 @@ public class IpSecAlgorithmTest {
@Test
public void testValidationForAlgosAddedInS() throws Exception {
if (Build.VERSION.FIRST_SDK_INT <= Build.VERSION_CODES.R) {
if (Build.VERSION.DEVICE_INITIAL_SDK_INT <= Build.VERSION_CODES.R) {
return;
}
@@ -196,13 +196,13 @@ public class IpSecAlgorithmTest {
private static Set<String> getMandatoryAlgos() {
return CollectionUtils.filter(
ALGO_TO_REQUIRED_FIRST_SDK.keySet(),
i -> Build.VERSION.FIRST_SDK_INT >= ALGO_TO_REQUIRED_FIRST_SDK.get(i));
i -> Build.VERSION.DEVICE_INITIAL_SDK_INT >= ALGO_TO_REQUIRED_FIRST_SDK.get(i));
}
private static Set<String> getOptionalAlgos() {
return CollectionUtils.filter(
ALGO_TO_REQUIRED_FIRST_SDK.keySet(),
i -> Build.VERSION.FIRST_SDK_INT < ALGO_TO_REQUIRED_FIRST_SDK.get(i));
i -> Build.VERSION.DEVICE_INITIAL_SDK_INT < ALGO_TO_REQUIRED_FIRST_SDK.get(i));
}
@Test