am 229f3977: am 7c7453c0: am 4455ca26: am c53bf778: am 40bc3681: Merge "Change FRAMEDROP_TOLERANCE value when upper 15MP camera size." into lollipop-cts-dev automerge: ea2805d

* commit '229f3977110af97545cc272025ce1521e4ba00ce':
  Change FRAMEDROP_TOLERANCE value when upper 15MP camera size.
diff --git a/tests/tests/hardware/src/android/hardware/camera2/cts/RecordingTest.java b/tests/tests/hardware/src/android/hardware/camera2/cts/RecordingTest.java
index 87895c1..20a7834 100644
--- a/tests/tests/hardware/src/android/hardware/camera2/cts/RecordingTest.java
+++ b/tests/tests/hardware/src/android/hardware/camera2/cts/RecordingTest.java
@@ -614,6 +614,10 @@
             throws Exception {
         final int NUM_SINGLE_SHOT_TEST = 5;
         final int FRAMEDROP_TOLERANCE = 8;
+        final int FRAME_SIZE_15M = 15000000;
+        final float FRAME_DROP_TOLERENCE_FACTOR = 1.5f;
+        int kFrameDrop_Tolerence = FRAMEDROP_TOLERANCE;
+
         for (int profileId : mCamcorderProfileList) {
             int cameraId = Integer.valueOf(mCamera.getId());
             if (!CamcorderProfile.hasProfile(cameraId, profileId) ||
@@ -649,6 +653,8 @@
                     videoSnapshotSz = candidateSize;
                 }
             }
+            if (videoSnapshotSz.getWidth() * videoSnapshotSz.getHeight() > FRAME_SIZE_15M)
+                kFrameDrop_Tolerence = (int)(FRAMEDROP_TOLERANCE * FRAME_DROP_TOLERENCE_FACTOR);
 
             /**
              * Only test full res snapshot when below conditions are all true.
@@ -762,8 +768,8 @@
                                 "Camera %d Video size %s: Number of dropped frames %d must not"
                                 + " be larger than %d",
                                 cameraId, videoSz.toString(), totalDroppedFrames,
-                                FRAMEDROP_TOLERANCE),
-                        FRAMEDROP_TOLERANCE, totalDroppedFrames);
+                                kFrameDrop_Tolerence),
+                        kFrameDrop_Tolerence, totalDroppedFrames);
             }
             closeImageReader();
         }