summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Scott <scottjonathan@google.com>2021-01-29 19:32:24 +0000
committerandroid-build-prod (mdb) <android-build-team-robot@google.com>2021-02-01 21:40:58 +0000
commit736168fe812831b7294e881c1cce5ada0b71a37a (patch)
tree96140cb38ada36844962ac289d3211c26b6e9356
parent23b912778cb8d0e78bd71175a58ebc7d84fa06f5 (diff)
downloadcts-736168fe812831b7294e881c1cce5ada0b71a37a.tar.gz
Wait for broadcast idle before cleanup and remove call to missing method in tryOpenSettings.
We already test that the lock task is active after attempting to launch settings. WaitForBroadcastIdle doesn't work during cleanup. Test: atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testLockTaskAfterReboot_tryOpeningSettings Test: atest com.android.cts.devicepolicy.MixedProfileOwnerTest#testLockTaskAfterReboot_tryOpeningSettings Bug: 178136337 Change-Id: Ibc2149346d25f1c681227021885fe605abd9c63f (cherry picked from commit b1515af43c4e8d7af9e6ea81da6fdaf89e41ce57)
-rw-r--r--hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/DeviceAndProfileOwnerTest.java4
1 files changed, 1 insertions, 3 deletions
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");
}
}