summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-prod (mdb) <android-build-team-robot@google.com>2021-02-01 21:41:52 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2021-02-01 21:41:52 +0000
commitf8a1f4f7e89d82c29121bc1e99315421fe021190 (patch)
tree96140cb38ada36844962ac289d3211c26b6e9356
parentd2e94c9cab9a1ebacaf17df4ee9de83f72030a87 (diff)
parentc473c57873974c286cb3bc7647f0116c48ba07be (diff)
downloadcts-sparse-7116676-L99600000804967018.tar.gz
Merge "Merge cherrypicks of [1567483, 1567484, 1567485, 1567486, 1567487, 1567728, 1567729, 1566923] into sparse-7081403-L04100000803344655" into sparse-7081403-L04100000803344655sparse-7116676-L99600000804967018
-rw-r--r--apps/CameraITS/tools/load_scene.py1
-rw-r--r--apps/CameraITS/tools/run_all_tests.py1
-rw-r--r--hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/AutofillRestrictionsTest.java4
-rw-r--r--hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/DeviceAndProfileOwnerTest.java4
-rw-r--r--tests/tests/media/src/android/media/cts/MediaCodecTest.java13
-rw-r--r--tests/tests/permission2/res/raw/android_manifest.xml5
6 files changed, 21 insertions, 7 deletions
diff --git a/apps/CameraITS/tools/load_scene.py b/apps/CameraITS/tools/load_scene.py
index 1993a54f72e..c1bd79ef679 100644
--- a/apps/CameraITS/tools/load_scene.py
+++ b/apps/CameraITS/tools/load_scene.py
@@ -81,6 +81,7 @@ def main():
with its.device.ItsSession() as cam:
props = cam.get_camera_properties()
+ props = cam.override_with_hidden_physical_camera_props(props)
cam.do_3a()
req = its.objects.fastest_auto_capture_request(props)
print "Capture an image to validate the light level"
diff --git a/apps/CameraITS/tools/run_all_tests.py b/apps/CameraITS/tools/run_all_tests.py
index ca3e9f0c869..67a62a3cb1b 100644
--- a/apps/CameraITS/tools/run_all_tests.py
+++ b/apps/CameraITS/tools/run_all_tests.py
@@ -306,6 +306,7 @@ def run_rotations(camera_id, test_name):
"""Determine if camera rotation is run for this test."""
with ItsSession(camera_id) as cam:
props = cam.get_camera_properties()
+ props = cam.override_with_hidden_physical_camera_props(props)
method = {'test_sensor_fusion': {
'flag': its.caps.sensor_fusion_test_capable(props, cam),
'runs': 10},
diff --git a/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/AutofillRestrictionsTest.java b/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/AutofillRestrictionsTest.java
index 891bd721af4..7e4cd3d13c7 100644
--- a/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/AutofillRestrictionsTest.java
+++ b/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/AutofillRestrictionsTest.java
@@ -63,14 +63,14 @@ public class AutofillRestrictionsTest extends BaseDeviceAdminTest {
mDevicePolicyManager.addUserRestriction(ADMIN_RECEIVER_COMPONENT, DISALLOW_AUTOFILL);
// Must try a couple times because it will be disabled asynchronously.
- for (int i = 1; i <= 5; i++) {
+ for (int i = 1; i <= 15; i++) {
final boolean disabledAfter = !launchActivityAndGetEnabled();
if (disabledAfter) {
return;
}
Thread.sleep(100);
}
- fail("Not disabled after 2.5s");
+ fail("Not disabled after a period of time");
}
private boolean launchActivityAndGetEnabled() throws Exception {
diff --git a/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/DeviceAndProfileOwnerTest.java b/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/DeviceAndProfileOwnerTest.java
index 27d2049c6b1..53a1c4a73d2 100644
--- a/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/DeviceAndProfileOwnerTest.java
+++ b/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/DeviceAndProfileOwnerTest.java
@@ -1233,9 +1233,6 @@ public abstract class DeviceAndProfileOwnerTest extends BaseDevicePolicyTest {
// Wait for the LockTask starting
waitForBroadcastIdle();
- // Make sure that the LockTaskUtilityActivityIfWhitelisted was started.
- executeDeviceTestMethod(".LockTaskHostDrivenTest", "testLockTaskIsActive");
-
// Try to open settings via adb
executeShellCommand("am start -a android.settings.SETTINGS");
@@ -1243,6 +1240,7 @@ public abstract class DeviceAndProfileOwnerTest extends BaseDevicePolicyTest {
executeDeviceTestMethod(".LockTaskHostDrivenTest",
"testLockTaskIsActiveAndCantBeInterrupted");
} finally {
+ Thread.sleep(10000);
executeDeviceTestMethod(".LockTaskHostDrivenTest", "testCleanupLockTask_noAsserts");
}
}
diff --git a/tests/tests/media/src/android/media/cts/MediaCodecTest.java b/tests/tests/media/src/android/media/cts/MediaCodecTest.java
index 201f6e4744c..f90ee5e8e4c 100644
--- a/tests/tests/media/src/android/media/cts/MediaCodecTest.java
+++ b/tests/tests/media/src/android/media/cts/MediaCodecTest.java
@@ -147,8 +147,6 @@ public class MediaCodecTest extends AndroidTestCase {
tested = verifyException(format, false /* isEncoder */) || tested;
// video encoder (H.264/AVC may not be present on some Android devices)
- format.setInteger(MediaFormat.KEY_COLOR_FORMAT,
- MediaCodecInfo.CodecCapabilities.COLOR_FormatYUV420Flexible);
tested = verifyException(format, true /* isEncoder */) || tested;
// signal test is skipped due to no device media codecs.
@@ -187,6 +185,12 @@ public class MediaCodecTest extends AndroidTestCase {
final boolean isVideoEncoder = isEncoder && mimeType.startsWith("video/");
+ if (isVideoEncoder) {
+ format = new MediaFormat(format);
+ format.setInteger(MediaFormat.KEY_COLOR_FORMAT,
+ MediaCodecInfo.CodecCapabilities.COLOR_FormatSurface);
+ }
+
// create codec (enter Initialized State)
MediaCodec codec;
@@ -379,6 +383,11 @@ public class MediaCodecTest extends AndroidTestCase {
// recreate
codec = createCodecByType(format.getString(MediaFormat.KEY_MIME), isEncoder);
+ if (isVideoEncoder) {
+ format.setInteger(MediaFormat.KEY_COLOR_FORMAT,
+ MediaCodecInfo.CodecCapabilities.COLOR_FormatYUV420Flexible);
+ }
+
// configure improperly
try {
codec.configure(format, null /* surface */, null /* crypto */,
diff --git a/tests/tests/permission2/res/raw/android_manifest.xml b/tests/tests/permission2/res/raw/android_manifest.xml
index d91b74f8b0d..e47331ad4e9 100644
--- a/tests/tests/permission2/res/raw/android_manifest.xml
+++ b/tests/tests/permission2/res/raw/android_manifest.xml
@@ -3778,6 +3778,11 @@
<permission android:name="android.permission.OBSERVE_ROLE_HOLDERS"
android:protectionLevel="signature|installer" />
+ <!-- Allows an application to manage the companion devices.
+ @hide -->
+ <permission android:name="android.permission.MANAGE_COMPANION_DEVICES"
+ android:protectionLevel="signature" />
+
<!-- @SystemApi Allows an application to use SurfaceFlinger's low level features.
<p>Not for use by third-party applications.
@hide