Fix a CTS test case where MediaRecorder.setMaxFileSize() assumes that
the output file size never exceeds the specified/target max size.

The fix is to give a tolerance to the target max file size.

- fix a typo
- rebased

bug - 2492800

Change-Id: I661a843c59f4250ce1dadada1c8f68d55de2487a
diff --git a/tests/tests/media/src/android/media/cts/MediaRecorderTest.java b/tests/tests/media/src/android/media/cts/MediaRecorderTest.java
index 6dddaaa..e5dc1ff 100644
--- a/tests/tests/media/src/android/media/cts/MediaRecorderTest.java
+++ b/tests/tests/media/src/android/media/cts/MediaRecorderTest.java
@@ -443,7 +443,9 @@
         Thread.sleep(RECORD_TIME);
         mMediaRecorder.stop();
         assertTrue(mOutFile.exists());
-        assertTrue(mOutFile.length() < maxFileSize);
+        // The max file size is always guaranteed.
+        // We just make sure that the margin is not too big
+        assertTrue(mOutFile.length() < 1.1 * maxFileSize);
         assertTrue(mOutFile.length() > 0);
     }