diff options
5 files changed, 18 insertions, 42 deletions
diff --git a/apps/CtsVerifier/AndroidManifest.xml b/apps/CtsVerifier/AndroidManifest.xml index 12f5c7d78e0..5e3317e66f2 100644 --- a/apps/CtsVerifier/AndroidManifest.xml +++ b/apps/CtsVerifier/AndroidManifest.xml @@ -18,7 +18,7 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.cts.verifier" android:versionCode="5" - android:versionName="6.0_r30"> + android:versionName="6.0_r31"> <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="23"/> diff --git a/tests/tests/content/src/android/content/cts/ContentProviderCursorWindowTest.java b/tests/tests/content/src/android/content/cts/ContentProviderCursorWindowTest.java index 004b193bda1..636b44074d9 100644 --- a/tests/tests/content/src/android/content/cts/ContentProviderCursorWindowTest.java +++ b/tests/tests/content/src/android/content/cts/ContentProviderCursorWindowTest.java @@ -17,24 +17,32 @@ package android.content.cts; import android.database.Cursor; +import android.database.CursorWindowAllocationException; import android.database.sqlite.SQLiteException; import android.net.Uri; import android.test.AndroidTestCase; import android.util.Log; -import java.io.IOException; - /** * Test {@link CursorWindowContentProvider} . */ public class ContentProviderCursorWindowTest extends AndroidTestCase { private static final String TAG = "ContentProviderCursorWindowTest"; - public void testQuery() throws IOException { - Cursor cursor = getContext().getContentResolver().query( - Uri.parse("content://cursorwindow.provider/hello"), - null, null, null, null - ); + public void testQuery() { + // First check if the system has a patch for enforcing protected Parcel data + Cursor cursor; + try { + cursor = getContext().getContentResolver().query( + Uri.parse("content://cursorwindow.provider/hello"), + null, null, null, null); + } catch (CursorWindowAllocationException expected) { + Log.i(TAG, "Expected exception: " + expected); + return; + } + + // If the system has no patch for protected Parcel data, + // it should still fail while reading from the cursor try { cursor.moveToFirst(); diff --git a/tests/tests/os/src/android/os/cts/SecurityPatchTest.java b/tests/tests/os/src/android/os/cts/SecurityPatchTest.java index 9ff3ece835b..4c7895df279 100644 --- a/tests/tests/os/src/android/os/cts/SecurityPatchTest.java +++ b/tests/tests/os/src/android/os/cts/SecurityPatchTest.java @@ -29,10 +29,6 @@ public class SecurityPatchTest extends InstrumentationTestCase { private static final String TAG = SecurityPatchTest.class.getSimpleName(); private static final String SECURITY_PATCH_ERROR = "ro.build.version.security_patch should be in the format \"YYYY-MM-DD\". Found \"%s\""; - private static final String SECURITY_PATCH_DATE_ERROR = - "ro.build.version.security_patch should be \"%d-%02d\" or later. Found \"%s\""; - private static final int SECURITY_PATCH_YEAR = 2017; - private static final int SECURITY_PATCH_MONTH = 04; private boolean mSkipTests = false; @@ -75,32 +71,4 @@ public class SecurityPatchTest extends InstrumentationTestCase { assertTrue(error, Character.isDigit(buildSecurityPatch.charAt(8))); assertTrue(error, Character.isDigit(buildSecurityPatch.charAt(9))); } - - /** Security patch should no older than the month this test was updated in M or higher **/ - public void testSecurityPatchDate() { - if (mSkipTests) { - Log.w(TAG, "Skipping M+ Test."); - return; - } - - String buildSecurityPatch = Build.VERSION.SECURITY_PATCH; - String error = String.format(SECURITY_PATCH_DATE_ERROR, - SECURITY_PATCH_YEAR, - SECURITY_PATCH_MONTH, - buildSecurityPatch); - - int declaredYear = 0; - int declaredMonth = 0; - - try { - declaredYear = Integer.parseInt(buildSecurityPatch.substring(0,4)); - declaredMonth = Integer.parseInt(buildSecurityPatch.substring(5,7)); - } catch (Exception e) { - assertTrue(error, false); - } - - assertTrue(error, declaredYear >= SECURITY_PATCH_YEAR); - assertTrue(error, (declaredYear > SECURITY_PATCH_YEAR) || - (declaredMonth >= SECURITY_PATCH_MONTH)); - } } diff --git a/tests/tests/security/src/android/security/cts/StagefrightTest.java b/tests/tests/security/src/android/security/cts/StagefrightTest.java index 5f6ae5a6253..e2921e36918 100644 --- a/tests/tests/security/src/android/security/cts/StagefrightTest.java +++ b/tests/tests/security/src/android/security/cts/StagefrightTest.java @@ -196,7 +196,7 @@ public class StagefrightTest extends InstrumentationTestCase { ***********************************************************/ @SecurityTest - public void testStagefright_b72165027() throws Exception { + public void testStagefright_bug_72165027() throws Exception { doStagefrightTest(R.raw.bug_72165027); } diff --git a/tools/tradefed-host/src/com/android/cts/tradefed/build/CtsBuildProvider.java b/tools/tradefed-host/src/com/android/cts/tradefed/build/CtsBuildProvider.java index b60d390be3d..19ea96d87bd 100644 --- a/tools/tradefed-host/src/com/android/cts/tradefed/build/CtsBuildProvider.java +++ b/tools/tradefed-host/src/com/android/cts/tradefed/build/CtsBuildProvider.java @@ -31,7 +31,7 @@ public class CtsBuildProvider implements IBuildProvider { @Option(name="cts-install-path", description="the path to the cts installation to use") private String mCtsRootDirPath = System.getProperty("CTS_ROOT"); - public static final String CTS_BUILD_VERSION = "6.0_r30"; + public static final String CTS_BUILD_VERSION = "6.0_r31"; public static final String CTS_PACKAGE = "com.android.cts.tradefed.testtype"; /** |