Merge "DO NOT MERGE: [BugFix]android.server.cts.ActivityManagerAmProfileTests#testAmStartStartProfilerNoSamplingNoStreaming" into oreo-mr1-cts-dev
diff --git a/apps/CtsVerifier/AndroidManifest.xml b/apps/CtsVerifier/AndroidManifest.xml
index c2d7188..12bdc69 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="8.1_r10">
+ android:versionName="8.1_r11">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="27"/>
diff --git a/apps/CtsVerifier/res/values/strings.xml b/apps/CtsVerifier/res/values/strings.xml
index 508c192..2b93e87 100755
--- a/apps/CtsVerifier/res/values/strings.xml
+++ b/apps/CtsVerifier/res/values/strings.xml
@@ -2980,7 +2980,10 @@
<string name="disallow_config_mobile_networks">Disallow config mobile networks</string>
<string name="disallow_config_mobile_networks_action">Configuring mobile networks</string>
<string name="disallow_config_tethering">Disallow config tethering</string>
- <string name="disallow_config_tethering_action">Configuring tethering and portable hotspots</string>
+ <string name="disallow_config_tethering_action">
+ Configuring tethering and portable hotspots.\n
+ NOTE: If the device does not support tethering please skip this test and mark it as passing.\n
+ </string>
<string name="disallow_config_wifi">Disallow config Wi-Fi</string>
<string name="disallow_config_wifi_action">Modifying Wi-Fi configuration</string>
<string name="disallow_debugging_features">Disallow debugging features</string>
@@ -4050,14 +4053,14 @@
<!-- USB Audio Peripheral Play Test -->
<string name="usbaudio_play_test"> USB Audio Peripheral Play Test</string>
<string name="usbaudio_play_info">
- This test requires that you have connected a mandated USB Audio Interface peripheral and
+ This test requires that you have connected a USB Audio Interface peripheral and
some way to monitor the output. Press the \"Play\" button and verify that a tone is produced.
</string>
<!-- USB Audio Peripheral Record Test -->
<string name="usbaudio_record_test"> USB Audio Peripheral Record Test</string>
<string name="usbaudio_record_info">
- This test requires that you have connected a mandated USB Audio Interface peripheral.
+ This test requires that you have connected a USB Audio Interface peripheral.
Connect the outputs to the inputs (with patch cables). Start playback by pressing the
\"Record Loopback\" button and verify that the recorded signal is displayed in the wave
display view. (It may be necessary to adjust the input controls on the peripheral).
@@ -4066,9 +4069,11 @@
<!-- USB Audio Peripheral Buttons Test -->
<string name="usbaudio_buttons_test"> USB Audio Peripheral Buttons Test</string>
<string name="usbaudio_buttons_info">
- This test requires that you have connected a mandated USB Audio headset. Press each
- \"transport\" button and verify that it is recognized by the test.
- </string>
+ This test requires that you have connected a USB Audio headset that supports the
+ Android USB audio headset buttons specification. Press each
+ \"transport\" button and verify that it is recognized by the test. When each of the
+ buttons has been recognized the \"pass\" button will be enabled.
+ </string>
<!-- Telecom tests -->
<string name="telecom_enable_phone_account_test"> Telecom Enable Phone Account Test</string>
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/bluetooth/BleClientService.java b/apps/CtsVerifier/src/com/android/cts/verifier/bluetooth/BleClientService.java
index e61cefe..6b686e0 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/bluetooth/BleClientService.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/bluetooth/BleClientService.java
@@ -1292,7 +1292,15 @@
int state = intent.getIntExtra(BluetoothDevice.EXTRA_BOND_STATE, BluetoothDevice.BOND_NONE);
switch (state) {
case BluetoothDevice.BOND_BONDED:
- mBluetoothGatt = connectGatt(device, mContext, false, mSecure, mGattCallbacks);
+ if ((mBluetoothGatt == null) &&
+ (device.getType() != BluetoothDevice.DEVICE_TYPE_CLASSIC)) {
+ if (DEBUG) {
+ Log.d(TAG, "onReceive:BOND_BONDED: calling connectGatt device="
+ + device + ", mSecure=" + mSecure);
+ }
+ mBluetoothGatt = connectGatt(device, mContext, false, mSecure,
+ mGattCallbacks);
+ }
break;
case BluetoothDevice.BOND_NONE:
notifyError("Failed to create bond.");
diff --git a/hostsidetests/appsecurity/src/android/appsecurity/cts/PermissionsHostTest.java b/hostsidetests/appsecurity/src/android/appsecurity/cts/PermissionsHostTest.java
index caabeb5..620e881 100644
--- a/hostsidetests/appsecurity/src/android/appsecurity/cts/PermissionsHostTest.java
+++ b/hostsidetests/appsecurity/src/android/appsecurity/cts/PermissionsHostTest.java
@@ -17,6 +17,7 @@
package android.appsecurity.cts;
import com.android.compatibility.common.tradefed.build.CompatibilityBuildHelper;
+import com.android.compatibility.common.util.CddTest;
import com.android.tradefed.build.IBuildInfo;
import com.android.tradefed.device.DeviceNotAvailableException;
import com.android.tradefed.testtype.DeviceTestCase;
@@ -167,6 +168,7 @@
"testGranted");
}
+ @CddTest(requirement="9.1/C-0-3")
public void testInteractiveGrant23() throws Exception {
assertNull(getDevice().installPackage(mBuildHelper.getTestFile(APK_23), false, false));
runDeviceTests(USES_PERMISSION_PKG, "com.android.cts.usepermission.UsePermissionTest23",
diff --git a/hostsidetests/appsecurity/test-apps/UsePermissionDiffCert/src/com/android/cts/usespermissiondiffcertapp/AccessPermissionWithDiffSigTest.java b/hostsidetests/appsecurity/test-apps/UsePermissionDiffCert/src/com/android/cts/usespermissiondiffcertapp/AccessPermissionWithDiffSigTest.java
index cf16307..0e56901 100644
--- a/hostsidetests/appsecurity/test-apps/UsePermissionDiffCert/src/com/android/cts/usespermissiondiffcertapp/AccessPermissionWithDiffSigTest.java
+++ b/hostsidetests/appsecurity/test-apps/UsePermissionDiffCert/src/com/android/cts/usespermissiondiffcertapp/AccessPermissionWithDiffSigTest.java
@@ -526,10 +526,18 @@
}
private void doTestGrantUriPermissionFail(Uri uri) {
- grantUriPermissionFail(uri, Intent.FLAG_GRANT_READ_URI_PERMISSION, false);
- grantUriPermissionFail(uri, Intent.FLAG_GRANT_WRITE_URI_PERMISSION, false);
- grantUriPermissionFail(uri, Intent.FLAG_GRANT_READ_URI_PERMISSION, true);
- grantUriPermissionFail(uri, Intent.FLAG_GRANT_WRITE_URI_PERMISSION, true);
+ for (boolean service : new boolean[] { false, true }) {
+ for (int flags : new int[] {
+ Intent.FLAG_GRANT_READ_URI_PERMISSION, Intent.FLAG_GRANT_WRITE_URI_PERMISSION
+ }) {
+ grantUriPermissionFail(uri,
+ flags, service);
+ grantUriPermissionFail(uri,
+ flags | Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION, service);
+ grantUriPermissionFail(uri,
+ flags | Intent.FLAG_GRANT_PREFIX_URI_PERMISSION, service);
+ }
+ }
}
/**
diff --git a/hostsidetests/net/app/src/com/android/cts/net/hostside/DataSaverModeTest.java b/hostsidetests/net/app/src/com/android/cts/net/hostside/DataSaverModeTest.java
index c24ca89..c3962fb 100644
--- a/hostsidetests/net/app/src/com/android/cts/net/hostside/DataSaverModeTest.java
+++ b/hostsidetests/net/app/src/com/android/cts/net/hostside/DataSaverModeTest.java
@@ -24,7 +24,7 @@
import com.android.compatibility.common.util.CddTest;
-@CddTest(requirement="7.4.7/C-1-1,H-1-1")
+@CddTest(requirement="7.4.7/C-1-1,H-1-1,C-2-1")
public class DataSaverModeTest extends AbstractRestrictBackgroundNetworkTestCase {
private static final String[] REQUIRED_WHITELISTED_PACKAGES = {
diff --git a/hostsidetests/theme/app/src/android/theme/app/ThemeDeviceActivity.java b/hostsidetests/theme/app/src/android/theme/app/ThemeDeviceActivity.java
index 8709f14..9469a0c 100644
--- a/hostsidetests/theme/app/src/android/theme/app/ThemeDeviceActivity.java
+++ b/hostsidetests/theme/app/src/android/theme/app/ThemeDeviceActivity.java
@@ -18,6 +18,7 @@
import android.app.Activity;
import android.content.Intent;
+import android.content.res.Configuration;
import android.os.Build;
import android.os.Bundle;
import android.theme.app.modifiers.DatePickerModifier;
@@ -76,6 +77,11 @@
mTheme = THEMES[themeIndex];
setTheme(mTheme.id);
+
+ // Force text scaling to 1.0 regardless of system default.
+ Configuration config = new Configuration();
+ config.fontScale = 1.0f;
+ getResources().updateConfiguration(config, null);
setContentView(R.layout.theme_test);
mViewGroup = (ReferenceViewGroup) findViewById(R.id.reference_view_group);
diff --git a/hostsidetests/theme/src/android/theme/cts/ThemeHostTest.java b/hostsidetests/theme/src/android/theme/cts/ThemeHostTest.java
index e559f18..05e0d95 100644
--- a/hostsidetests/theme/src/android/theme/cts/ThemeHostTest.java
+++ b/hostsidetests/theme/src/android/theme/cts/ThemeHostTest.java
@@ -273,7 +273,8 @@
final Pattern p = Pattern.compile("Override density: (\\d+)");
final Matcher m = p.matcher(output);
if (m.find()) {
- return Integer.parseInt(m.group(1));
+ throw new RuntimeException("Cannot test device running at non-default density: "
+ + Integer.parseInt(m.group(1)));
}
final String densityProp;
diff --git a/tests/ProcessTest/Android.mk b/tests/ProcessTest/Android.mk
index 2feff2e..63ee043 100644
--- a/tests/ProcessTest/Android.mk
+++ b/tests/ProcessTest/Android.mk
@@ -24,7 +24,7 @@
LOCAL_SRC_FILES := $(call all-subdir-java-files)
-LOCAL_STATIC_JAVA_LIBRARIES := legacy-android-test junit
+LOCAL_STATIC_JAVA_LIBRARIES := legacy-android-test junit compatibility-device-util
LOCAL_PACKAGE_NAME := ProcessTests
diff --git a/tests/sensor/jni/nativeTestHelper.cpp b/tests/sensor/jni/nativeTestHelper.cpp
index 3c7df9a..69eeba6 100644
--- a/tests/sensor/jni/nativeTestHelper.cpp
+++ b/tests/sensor/jni/nativeTestHelper.cpp
@@ -33,7 +33,11 @@
jclass exClass;
const char *className = "java/lang/AssertionError";
exClass = env->FindClass(className);
- env->ThrowNew(exClass, msg);
+ jmethodID constructor = env->GetMethodID(exClass, "<init>",
+ "(Ljava/lang/String;Ljava/lang/Throwable;)V");
+ jstring msgStr = env->NewStringUTF(msg);
+ jobject exception = env->NewObject(exClass, constructor, msgStr, nullptr);
+ env->Throw(static_cast<jthrowable>(exception));
free(msg);
}
diff --git a/tests/signature/intent-check/DynamicConfig.xml b/tests/signature/intent-check/DynamicConfig.xml
index 3424d73..a2052af 100644
--- a/tests/signature/intent-check/DynamicConfig.xml
+++ b/tests/signature/intent-check/DynamicConfig.xml
@@ -20,7 +20,8 @@
Bug: 38182465 android.intent.action.ACTION_DEFAULT_SMS_SUBSCRIPTION_CHANGED
Bug: 70315695 android.intent.action.HDMI_PLUGGED
Bug: 115848568 android.intent.action.ACTION_AIRPLANE_MODE_CHANGED
- Will be removed after v17 of CS.apk is released.
+ Will be removed after v17 of CS.apk is released.
+ Bug: 114804753 android.intent.action.DISMISS_TIMER (public in API 28)
-->
<dynamicConfig>
<entry key ="intent_whitelist">
@@ -29,5 +30,6 @@
<value>android.intent.action.ACTION_DEFAULT_SMS_SUBSCRIPTION_CHANGED</value>
<value>android.intent.action.HDMI_PLUGGED</value>
<value>android.intent.action.ACTION_AIRPLANE_MODE_CHANGED</value>
+ <value>android.intent.action.DISMISS_TIMER</value>
</entry>
</dynamicConfig>
diff --git a/tests/tests/jni/src/android/jni/cts/JniStaticTest.java b/tests/tests/jni/src/android/jni/cts/JniStaticTest.java
index e351d93..2fde363 100644
--- a/tests/tests/jni/src/android/jni/cts/JniStaticTest.java
+++ b/tests/tests/jni/src/android/jni/cts/JniStaticTest.java
@@ -38,6 +38,7 @@
* Test library accessibility. Internal platform libraries should not
* be accessible from the jni code.
*/
+ @CddTest(requirement="3.3.1/C-0-7,C-0-9,C-0-10")
public void test_linker_namespaces() throws IOException {
String error = LinkerNamespacesHelper.runAccessibilityTest();
if (error != null) {
diff --git a/tests/tests/net/src/android/net/wifi/cts/WifiManagerTest.java b/tests/tests/net/src/android/net/wifi/cts/WifiManagerTest.java
index 87239b4..90540f4 100644
--- a/tests/tests/net/src/android/net/wifi/cts/WifiManagerTest.java
+++ b/tests/tests/net/src/android/net/wifi/cts/WifiManagerTest.java
@@ -838,10 +838,9 @@
TestLocalOnlyHotspotCallback callback = startLocalOnlyHotspot();
- // at this point, wifi should be off
- assertFalse(mWifiManager.isWifiEnabled());
-
stopLocalOnlyHotspot(callback, wifiEnabled);
+
+ // wifi should either stay on, or come back on
assertEquals(wifiEnabled, mWifiManager.isWifiEnabled());
}
@@ -853,7 +852,7 @@
* tethering is started.
* Note: Location mode must be enabled for this test.
*/
- public void testSetWifiEnabledByAppDoesNotStopHotspot() {
+ public void testSetWifiEnabledByAppDoesNotStopHotspot() throws Exception {
if (!WifiFeature.isWifiSupported(getContext())) {
// skip the test if WiFi is not supported
return;
@@ -865,15 +864,18 @@
boolean wifiEnabled = mWifiManager.isWifiEnabled();
+ if (wifiEnabled) {
+ // disable wifi so we have something to turn on (some devices may be able to run
+ // simultaneous modes)
+ setWifiEnabled(false);
+ }
+
TestLocalOnlyHotspotCallback callback = startLocalOnlyHotspot();
- // at this point, wifi should be off
- assertFalse(mWifiManager.isWifiEnabled());
// now we should fail to turn on wifi
assertFalse(mWifiManager.setWifiEnabled(true));
stopLocalOnlyHotspot(callback, wifiEnabled);
- assertEquals(wifiEnabled, mWifiManager.isWifiEnabled());
}
/**
@@ -897,9 +899,6 @@
TestLocalOnlyHotspotCallback callback = startLocalOnlyHotspot();
- // at this point, wifi should be off
- assertFalse(mWifiManager.isWifiEnabled());
-
// now make a second request - this should fail.
TestLocalOnlyHotspotCallback callback2 = new TestLocalOnlyHotspotCallback(mLOHSLock);
try {
@@ -908,9 +907,12 @@
Log.d(TAG, "Caught the IllegalStateException we expected: called startLOHS twice");
caughtException = true;
}
+ if (!caughtException) {
+ // second start did not fail, should clean up the hotspot.
+ stopLocalOnlyHotspot(callback2, wifiEnabled);
+ }
assertTrue(caughtException);
stopLocalOnlyHotspot(callback, wifiEnabled);
- assertEquals(wifiEnabled, mWifiManager.isWifiEnabled());
}
}
diff --git a/tests/tests/os/src/android/os/cts/FileAccessPermissionTest.java b/tests/tests/os/src/android/os/cts/FileAccessPermissionTest.java
index cd89e3d..98df29b 100644
--- a/tests/tests/os/src/android/os/cts/FileAccessPermissionTest.java
+++ b/tests/tests/os/src/android/os/cts/FileAccessPermissionTest.java
@@ -19,6 +19,8 @@
import android.os.Environment;
import android.test.AndroidTestCase;
+import com.android.compatibility.common.util.CddTest;
+
import java.io.File;
import java.io.FileInputStream;
import java.io.FilenameFilter;
@@ -44,6 +46,7 @@
*
* TODO: Combine this file with {@link android.permission.cts.FileSystemPermissionTest}
*/
+@CddTest(requirement="9.3/C-0-1")
public class FileAccessPermissionTest extends AndroidTestCase {
/**
diff --git a/tests/tests/permission/Android.mk b/tests/tests/permission/Android.mk
index b24774f..e86a56d 100644
--- a/tests/tests/permission/Android.mk
+++ b/tests/tests/permission/Android.mk
@@ -33,7 +33,8 @@
ctstestrunner \
guava \
android-ex-camera2 \
- legacy-android-test
+ legacy-android-test \
+ compatibility-device-util
LOCAL_JNI_SHARED_LIBRARIES := libctspermission_jni libnativehelper_compat_libc++
diff --git a/tests/tests/permission/src/android/permission/cts/Camera2PermissionTest.java b/tests/tests/permission/src/android/permission/cts/Camera2PermissionTest.java
index e40d7cb..140557f 100644
--- a/tests/tests/permission/src/android/permission/cts/Camera2PermissionTest.java
+++ b/tests/tests/permission/src/android/permission/cts/Camera2PermissionTest.java
@@ -27,6 +27,8 @@
import android.test.AndroidTestCase;
import android.util.Log;
+import com.android.compatibility.common.util.CddTest;
+
import com.android.ex.camera2.blocking.BlockingCameraManager;
import com.android.ex.camera2.blocking.BlockingStateCallback;
@@ -34,6 +36,7 @@
* Tests for Camera2 API related Permissions. Currently, this means
* android.permission.CAMERA.
*/
+@CddTest(requirement="3.2.1/C-0-1,9.1/C-0-1")
public class Camera2PermissionTest extends AndroidTestCase {
private static final String TAG = "CameraDeviceTest";
private static final boolean VERBOSE = Log.isLoggable(TAG, Log.VERBOSE);
diff --git a/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java b/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java
index bb9f868..25c686b 100644
--- a/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java
+++ b/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java
@@ -28,6 +28,8 @@
import android.test.suitebuilder.annotation.MediumTest;
import android.test.suitebuilder.annotation.LargeTest;
+import com.android.compatibility.common.util.CddTest;
+
import java.io.BufferedReader;
import java.io.File;
import java.io.FileDescriptor;
@@ -63,6 +65,7 @@
*
* TODO: Combine this file with {@link android.os.cts.FileAccessPermissionTest}
*/
+@CddTest(requirement="9.3/C-0-1")
public class FileSystemPermissionTest extends AndroidTestCase {
@MediumTest
diff --git a/tests/tests/permission/src/android/permission/cts/NoAudioPermissionTest.java b/tests/tests/permission/src/android/permission/cts/NoAudioPermissionTest.java
index f3c5ae8..b695840 100644
--- a/tests/tests/permission/src/android/permission/cts/NoAudioPermissionTest.java
+++ b/tests/tests/permission/src/android/permission/cts/NoAudioPermissionTest.java
@@ -21,9 +21,12 @@
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
+import com.android.compatibility.common.util.CddTest;
+
/**
* Verify the audio related operations require specific permissions.
*/
+@CddTest(requirement="3.2.1/C-0-1,9.1/C-0-1")
public class NoAudioPermissionTest extends AndroidTestCase {
private AudioManager mAudioManager;
private static final int MODE_COUNT = 3;
diff --git a/tests/tests/permission/src/android/permission/cts/NoBroadcastPackageRemovedPermissionTest.java b/tests/tests/permission/src/android/permission/cts/NoBroadcastPackageRemovedPermissionTest.java
index 5630c5b..b0223a8 100644
--- a/tests/tests/permission/src/android/permission/cts/NoBroadcastPackageRemovedPermissionTest.java
+++ b/tests/tests/permission/src/android/permission/cts/NoBroadcastPackageRemovedPermissionTest.java
@@ -21,9 +21,12 @@
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
+import com.android.compatibility.common.util.CddTest;
+
/**
* Verify Context related methods without specific BROADCAST series permissions.
*/
+@CddTest(requirement="3.2.1/C-0-1,9.1/C-0-1")
public class NoBroadcastPackageRemovedPermissionTest extends AndroidTestCase {
private static final String TEST_RECEIVER_PERMISSION = "receiverPermission";
diff --git a/tests/tests/permission/src/android/permission/cts/NoLocationPermissionTest.java b/tests/tests/permission/src/android/permission/cts/NoLocationPermissionTest.java
index 8fd4a59..9b2ec15 100644
--- a/tests/tests/permission/src/android/permission/cts/NoLocationPermissionTest.java
+++ b/tests/tests/permission/src/android/permission/cts/NoLocationPermissionTest.java
@@ -31,11 +31,14 @@
import android.test.suitebuilder.annotation.SmallTest;
import android.test.UiThreadTest;
+import com.android.compatibility.common.util.CddTest;
+
import java.util.List;
/**
* Verify the location access without specific permissions.
*/
+@CddTest(requirement="3.2.1/C-0-1,9/C-0-1,9.1/C-0-1")
public class NoLocationPermissionTest extends InstrumentationTestCase {
private static final String TEST_PROVIDER_NAME = "testProvider";
@@ -127,7 +130,7 @@
/**
* Helper method to verify that calling requestLocationUpdates with given
* provider throws SecurityException.
- *
+ *
* @param provider the String provider name.
*/
private void checkRequestLocationUpdates(String provider) {
@@ -198,7 +201,7 @@
/**
* Helper method to verify that calling getLastKnownLocation with given
* provider throws SecurityException.
- *
+ *
* @param provider the String provider name.
*/
private void checkGetLastKnownLocation(String provider) {
@@ -241,7 +244,7 @@
/**
* Helper method to verify that calling getProvider with given provider
* throws SecurityException.
- *
+ *
* @param provider the String provider name.
*/
private void checkGetProvider(String provider) {
diff --git a/tests/tests/permission/src/android/permission/cts/NoReadLogsPermissionTest.java b/tests/tests/permission/src/android/permission/cts/NoReadLogsPermissionTest.java
index 7b3799d..0ab61f5 100644
--- a/tests/tests/permission/src/android/permission/cts/NoReadLogsPermissionTest.java
+++ b/tests/tests/permission/src/android/permission/cts/NoReadLogsPermissionTest.java
@@ -24,6 +24,8 @@
import android.test.suitebuilder.annotation.MediumTest;
import android.util.Log;
+import com.android.compatibility.common.util.CddTest;
+
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
@@ -32,6 +34,7 @@
/**
* Verify the read system log require specific permissions.
*/
+@CddTest(requirement="3.2.1/C-0-1,9/C-0-1,9.1/C-0-1")
public class NoReadLogsPermissionTest extends AndroidTestCase {
/**
* Verify that we'll only get our logs without the READ_LOGS permission.
diff --git a/tests/tests/permission/src/android/permission/cts/NoWifiStatePermissionTest.java b/tests/tests/permission/src/android/permission/cts/NoWifiStatePermissionTest.java
index 3c7b80e..122ed0f 100644
--- a/tests/tests/permission/src/android/permission/cts/NoWifiStatePermissionTest.java
+++ b/tests/tests/permission/src/android/permission/cts/NoWifiStatePermissionTest.java
@@ -22,9 +22,12 @@
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
+import com.android.compatibility.common.util.CddTest;
+
/**
* Verify WifiManager related methods without specific Wifi state permissions.
*/
+@CddTest(requirement="3.2.1/C-0-1,9/C-0-1,9.1/C-0-1")
@SmallTest
public class NoWifiStatePermissionTest extends AndroidTestCase {
private static final int TEST_NET_ID = 1;
diff --git a/tests/tests/permission/src/android/permission/cts/PackageManagerRequiringPermissionsTest.java b/tests/tests/permission/src/android/permission/cts/PackageManagerRequiringPermissionsTest.java
index 2bfef62..764513c 100644
--- a/tests/tests/permission/src/android/permission/cts/PackageManagerRequiringPermissionsTest.java
+++ b/tests/tests/permission/src/android/permission/cts/PackageManagerRequiringPermissionsTest.java
@@ -22,9 +22,12 @@
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
+import com.android.compatibility.common.util.CddTest;
+
/**
* Verify the PackageManager related operations require specific permissions.
*/
+@CddTest(requirement="3.2.1/C-0-1,9/C-0-1,9.1/C-0-1")
@SmallTest
public class PackageManagerRequiringPermissionsTest extends AndroidTestCase {
// Must be a known-present application package other than the one hosting this class
diff --git a/tests/tests/permission/src/android/permission/cts/TvPermissionTest.java b/tests/tests/permission/src/android/permission/cts/TvPermissionTest.java
index 4139059..4cd0257 100644
--- a/tests/tests/permission/src/android/permission/cts/TvPermissionTest.java
+++ b/tests/tests/permission/src/android/permission/cts/TvPermissionTest.java
@@ -22,9 +22,12 @@
import android.net.Uri;
import android.test.AndroidTestCase;
+import com.android.compatibility.common.util.CddTest;
+
/**
* Tests for TV API related permissions.
*/
+@CddTest(requirement="3.2/1/C-0-1,9/C-0-1,9.1/C-0-1")
public class TvPermissionTest extends AndroidTestCase {
private static final String DUMMY_INPUT_ID = "dummy";
diff --git a/tests/tests/permission2/src/android/permission2/cts/PermissionPolicyTest.java b/tests/tests/permission2/src/android/permission2/cts/PermissionPolicyTest.java
index 50a5bce..1852e99 100644
--- a/tests/tests/permission2/src/android/permission2/cts/PermissionPolicyTest.java
+++ b/tests/tests/permission2/src/android/permission2/cts/PermissionPolicyTest.java
@@ -31,6 +31,8 @@
import android.util.Log;
import android.util.Xml;
+import com.android.compatibility.common.util.CddTest;
+
import org.xmlpull.v1.XmlPullParser;
import java.io.InputStream;
@@ -64,6 +66,7 @@
private static final String ATTR_PERMISSION_GROUP = "permissionGroup";
private static final String ATTR_PROTECTION_LEVEL = "protectionLevel";
+ @CddTest(requirement="9.1/C-0-1")
public void testPlatformPermissionPolicyUnaltered() throws Exception {
Map<String, PermissionInfo> declaredPermissionsMap =
getPermissionsForPackage(getContext(), PLATFORM_PACKAGE_NAME);
diff --git a/tests/tests/permission2/src/android/permission2/cts/PrivappPermissionsTest.java b/tests/tests/permission2/src/android/permission2/cts/PrivappPermissionsTest.java
index ae26008..44436e9 100644
--- a/tests/tests/permission2/src/android/permission2/cts/PrivappPermissionsTest.java
+++ b/tests/tests/permission2/src/android/permission2/cts/PrivappPermissionsTest.java
@@ -17,6 +17,7 @@
package android.permission2.cts;
import com.android.compatibility.common.util.SystemUtil;
+import com.android.compatibility.common.util.CddTest;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
@@ -51,6 +52,7 @@
private static final String PLATFORM_PACKAGE_NAME = "android";
+ @CddTest(requirement="9.1/C-0-2")
public void testPrivappPermissionsEnforcement() throws Exception {
Set<String> platformPrivPermissions = new HashSet<>();
PackageManager pm = getContext().getPackageManager();
diff --git a/tests/tests/security/res/raw/bug_65484460.mp4 b/tests/tests/security/res/raw/bug_65484460.mp4
new file mode 100644
index 0000000..13b37e9
--- /dev/null
+++ b/tests/tests/security/res/raw/bug_65484460.mp4
Binary files differ
diff --git a/tests/tests/security/src/android/security/cts/CertificateTest.java b/tests/tests/security/src/android/security/cts/CertificateTest.java
index 07e9714..8805072 100644
--- a/tests/tests/security/src/android/security/cts/CertificateTest.java
+++ b/tests/tests/security/src/android/security/cts/CertificateTest.java
@@ -65,7 +65,7 @@
*
* <p>For questions, comments, and code reviews please contact security@android.com.
*/
- @CddTest(requirement="9.8.4/C-0-1")
+ @CddTest(requirement="9.8.4/C-0-1,C-0-2")
public void testNoAddedCertificates() throws Exception {
Set<String> expectedCertificates = new HashSet<String>(
Arrays.asList(CertificateData.CERTIFICATE_DATA));
@@ -74,6 +74,7 @@
assertEquals("Unknown CA certificates", Collections.EMPTY_SET, deviceCertificates);
}
+ @CddTest(requirement="9.8.4/C-0-1")
public void testBlockCertificates() throws Exception {
Set<String> blockCertificates = new HashSet<String>();
blockCertificates.add("C0:60:ED:44:CB:D8:81:BD:0E:F8:6C:0B:A2:87:DD:CF:81:67:47:8C");
diff --git a/tests/tests/security/src/android/security/cts/EncryptionTest.java b/tests/tests/security/src/android/security/cts/EncryptionTest.java
index 07b39de..f7b279a 100644
--- a/tests/tests/security/src/android/security/cts/EncryptionTest.java
+++ b/tests/tests/security/src/android/security/cts/EncryptionTest.java
@@ -16,6 +16,7 @@
package android.security.cts;
+import com.android.compatibility.common.util.CddTest;
import com.android.compatibility.common.util.PropertyUtil;
import android.platform.test.annotations.SecurityTest;
@@ -49,6 +50,7 @@
return PropertyUtil.getFirstApiLevel() >= MIN_API_LEVEL;
}
+ @CddTest(requirement="9.9/C-2-1")
public void testEncryption() throws Exception {
if (!isRequired() || deviceIsEncrypted()) {
return;
diff --git a/tests/tests/security/src/android/security/cts/StagefrightTest.java b/tests/tests/security/src/android/security/cts/StagefrightTest.java
index af6034a..69266c7 100644
--- a/tests/tests/security/src/android/security/cts/StagefrightTest.java
+++ b/tests/tests/security/src/android/security/cts/StagefrightTest.java
@@ -461,6 +461,11 @@
doStagefrightTest(R.raw.bug_37093318, (4 * 60 * 1000));
}
+ @SecurityTest
+ public void testStagefright_bug_65484460() throws Exception {
+ doStagefrightTest(R.raw.bug_65484460);
+ }
+
private void doStagefrightTest(final int rid) throws Exception {
doStagefrightTestMediaPlayer(rid);
doStagefrightTestMediaCodec(rid);
diff --git a/tests/tests/toast/Android.mk b/tests/tests/toast/Android.mk
index 1ba7d79..e4e889d 100644
--- a/tests/tests/toast/Android.mk
+++ b/tests/tests/toast/Android.mk
@@ -23,7 +23,7 @@
LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
-LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner android-support-test
+LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner android-support-test compatibility-device-util
LOCAL_SRC_FILES := $(call all-java-files-under, src)
diff --git a/tests/tests/toast/src/android/widget/toast/cts/LegacyToastTest.java b/tests/tests/toast/src/android/widget/toast/cts/LegacyToastTest.java
index 4ac88b3..c6865b7 100644
--- a/tests/tests/toast/src/android/widget/toast/cts/LegacyToastTest.java
+++ b/tests/tests/toast/src/android/widget/toast/cts/LegacyToastTest.java
@@ -18,6 +18,9 @@
import android.support.test.runner.AndroidJUnit4;
import android.view.WindowManager;
+
+import com.android.compatibility.common.util.CddTest;
+
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -28,6 +31,7 @@
* like this app the only way to add toast windows is via the dedicated
* toast APIs.
*/
+@CddTest(requirement="3.8.5/C-1-2")
@RunWith(AndroidJUnit4.class)
public class LegacyToastTest extends BaseToastTest {
@Test
diff --git a/tools/cts-tradefed/Android.mk b/tools/cts-tradefed/Android.mk
index c4dd32a..74dbe1e 100644
--- a/tools/cts-tradefed/Android.mk
+++ b/tools/cts-tradefed/Android.mk
@@ -29,7 +29,7 @@
LOCAL_SUITE_TARGET_ARCH := $(TARGET_ARCH)
LOCAL_SUITE_NAME := CTS
LOCAL_SUITE_FULLNAME := "Compatibility Test Suite"
-LOCAL_SUITE_VERSION := 8.1_r10
+LOCAL_SUITE_VERSION := 8.1_r11
LOCAL_STATIC_JAVA_LIBRARIES += cts-tradefed-harness
LOCAL_MODULE := cts-tradefed