Loading services/tests/displayservicetests/src/com/android/server/display/EventDeliveryTestBase.java +6 −4 Original line number Diff line number Diff line Loading @@ -153,7 +153,7 @@ public abstract class EventDeliveryTestBase { mContext.startActivity(intent); }, android.Manifest.permission.START_ACTIVITIES_FROM_SDK_SANDBOX); waitLatch(mLatchActivityLaunch); waitLatch(mLatchActivityLaunch, "Failed to launch test activity"); try { String cmd = "pidof " + getTestPackage(); Loading Loading @@ -202,7 +202,7 @@ public abstract class EventDeliveryTestBase { mInstrumentation.startActivitySync(intent2); }, android.Manifest.permission.START_ACTIVITIES_FROM_SDK_SANDBOX); waitLatch(mLatchActivityCached); waitLatch(mLatchActivityCached, "Failed to make test activity cached"); } // Sleep, ignoring interrupts. Loading Loading @@ -249,9 +249,11 @@ public abstract class EventDeliveryTestBase { /** * Wait for CountDownLatch with timeout */ private void waitLatch(CountDownLatch latch) { private void waitLatch(CountDownLatch latch, String errorMsg) { try { latch.await(TEST_FAILURE_TIMEOUT_MSEC, TimeUnit.MILLISECONDS); if (!latch.await(TEST_FAILURE_TIMEOUT_MSEC, TimeUnit.MILLISECONDS)) { fail(errorMsg); } } catch (InterruptedException e) { throw new RuntimeException(e); } Loading Loading
services/tests/displayservicetests/src/com/android/server/display/EventDeliveryTestBase.java +6 −4 Original line number Diff line number Diff line Loading @@ -153,7 +153,7 @@ public abstract class EventDeliveryTestBase { mContext.startActivity(intent); }, android.Manifest.permission.START_ACTIVITIES_FROM_SDK_SANDBOX); waitLatch(mLatchActivityLaunch); waitLatch(mLatchActivityLaunch, "Failed to launch test activity"); try { String cmd = "pidof " + getTestPackage(); Loading Loading @@ -202,7 +202,7 @@ public abstract class EventDeliveryTestBase { mInstrumentation.startActivitySync(intent2); }, android.Manifest.permission.START_ACTIVITIES_FROM_SDK_SANDBOX); waitLatch(mLatchActivityCached); waitLatch(mLatchActivityCached, "Failed to make test activity cached"); } // Sleep, ignoring interrupts. Loading Loading @@ -249,9 +249,11 @@ public abstract class EventDeliveryTestBase { /** * Wait for CountDownLatch with timeout */ private void waitLatch(CountDownLatch latch) { private void waitLatch(CountDownLatch latch, String errorMsg) { try { latch.await(TEST_FAILURE_TIMEOUT_MSEC, TimeUnit.MILLISECONDS); if (!latch.await(TEST_FAILURE_TIMEOUT_MSEC, TimeUnit.MILLISECONDS)) { fail(errorMsg); } } catch (InterruptedException e) { throw new RuntimeException(e); } Loading