Camera: update FPS range check per spec update

Bug: 25427163
Change-Id: I0a71529fb146fbf9662f7bafb103894f11ac2132
diff --git a/tests/camera/src/android/hardware/camera2/cts/RecordingTest.java b/tests/camera/src/android/hardware/camera2/cts/RecordingTest.java
index de0e3d5..feade79 100644
--- a/tests/camera/src/android/hardware/camera2/cts/RecordingTest.java
+++ b/tests/camera/src/android/hardware/camera2/cts/RecordingTest.java
@@ -599,6 +599,7 @@
         List<Range<Integer> > fpsRanges = Arrays.asList(
                 mStaticInfo.getAeAvailableTargetFpsRangesChecked());
         int cameraId = Integer.valueOf(mCamera.getId());
+        int maxVideoFrameRate = -1;
         for (int profileId : camcorderProfileList) {
             if (!CamcorderProfile.hasProfile(cameraId, profileId) ||
                     allowedUnsupported(cameraId, profileId)) {
@@ -608,6 +609,9 @@
             CamcorderProfile profile = CamcorderProfile.get(cameraId, profileId);
             Size videoSz = new Size(profile.videoFrameWidth, profile.videoFrameHeight);
             Range<Integer> fpsRange = new Range(profile.videoFrameRate, profile.videoFrameRate);
+            if (maxVideoFrameRate < profile.videoFrameRate) {
+                maxVideoFrameRate = profile.videoFrameRate;
+            }
             if (mStaticInfo.isHardwareLevelLegacy() &&
                     (videoSz.getWidth() > maxPreviewSize.getWidth() ||
                      videoSz.getHeight() > maxPreviewSize.getHeight())) {
@@ -658,6 +662,11 @@
             // Validation.
             validateRecording(videoSz, durationMs);
         }
+        if (maxVideoFrameRate != -1) {
+            // At least one CamcorderProfile is present, check FPS
+            assertTrue("At least one CamcorderProfile must support >= 24 FPS",
+                    maxVideoFrameRate >= 24);
+        }
     }
 
     /**
diff --git a/tests/camera/src/android/hardware/camera2/cts/helpers/StaticMetadata.java b/tests/camera/src/android/hardware/camera2/cts/helpers/StaticMetadata.java
index 4310b3a..e892e42 100644
--- a/tests/camera/src/android/hardware/camera2/cts/helpers/StaticMetadata.java
+++ b/tests/camera/src/android/hardware/camera2/cts/helpers/StaticMetadata.java
@@ -1401,17 +1401,9 @@
         int fpsRangeLength = fpsRanges.length;
         int minFps, maxFps;
         long maxFrameDuration = getMaxFrameDurationChecked();
-        boolean foundConstant30Range = false;
-        boolean foundPreviewStreamingRange = false;
         for (int i = 0; i < fpsRangeLength; i += 1) {
             minFps = fpsRanges[i].getLower();
             maxFps = fpsRanges[i].getUpper();
-            if (minFps == 30 && maxFps == 30) {
-                foundConstant30Range = true;
-            }
-            if (minFps <= 15 && maxFps >= 30) {
-                foundPreviewStreamingRange = true;
-            }
             checkTrueForKey(key, " min fps must be no larger than max fps!",
                     minFps > 0 && maxFps >= minFps);
             long maxDuration = (long) (1e9 / minFps);
@@ -1419,10 +1411,6 @@
                     " the frame duration %d for min fps %d must smaller than maxFrameDuration %d",
                     maxDuration, minFps, maxFrameDuration), maxDuration <= maxFrameDuration);
         }
-        checkTrueForKey(key, String.format(" (30, 30) must be included"), foundConstant30Range);
-        checkTrueForKey(key, String.format(
-                " (min, max) where min <= 15 and max >= 30 must be included"),
-                foundPreviewStreamingRange);
         return fpsRanges;
     }