Camera2: various RecordingTest update

1. The duration from MediaPlayer might be longer due to audio track.
   Change it to only check for video track duration
2. Split basic recording test into two. One test resolutions from
   high to low. The other test video frame rate from low to high.
3. Mark two known failing test
4. Also clean up some duplicated code in RobustnessTest.

Bug: 18705837
Bug: 18689511
Change-Id: I855129cf2d2939c783082dccedee56ef88252a16
diff --git a/tests/expectations/knownfailures.txt b/tests/expectations/knownfailures.txt
index c0875c1..78a0cfe 100644
--- a/tests/expectations/knownfailures.txt
+++ b/tests/expectations/knownfailures.txt
@@ -379,5 +379,19 @@
     "com.android.org.conscrypt.SignatureTest#test_getInstance_OpenSSL_ENGINE"
   ],
   bug: 18030049
+},
+{
+  description: "The new recording test is not yet passing on all devices",
+  names: [
+    "android.hardware.camera2.cts.RecordingTest#testRecordingFramerateLowToHigh"
+  ],
+  bug: 18705837
+},
+{
+  description: "The new image reader test is not yet passing on all devices",
+  names: [
+    "android.hardware.camera2.cts.ImageReaderTest#testAllOutputYUVResolutions"
+  ],
+  bug: 18689511
 }
 ]