trial fix for MediaRecorderTest.testOnErrorListener

- add delay before checking file length. may not fix.

Bug: 6469397
Change-Id: Ib13ab52f59f39de145576a438b65d496051a7e52
diff --git a/tests/tests/media/src/android/media/cts/MediaRecorderTest.java b/tests/tests/media/src/android/media/cts/MediaRecorderTest.java
index f56b0a7..f48a280 100644
--- a/tests/tests/media/src/android/media/cts/MediaRecorderTest.java
+++ b/tests/tests/media/src/android/media/cts/MediaRecorderTest.java
@@ -371,6 +371,9 @@
         mMediaRecorder.start();
         Thread.sleep(RECORD_TIME);
         mMediaRecorder.stop();
+        // onErrorListner sometimes fails in the 3rd assert.
+        // Fix trial: give some time to write, but this may not fix it.
+        Thread.sleep(1000);
         assertTrue(outFile.exists());
         // The max file size is always guaranteed.
         // We just make sure that the margin is not too big