Revert "resolved conflicts for 5365cd9e to lmp-mr1-dev"

This reverts commit 0d95d4addaa17137d7fbd0f321b8e2a669b4c22f.

Change-Id: Id462187fc6bcef2fc350d7e5f65789f36e184fb1
diff --git a/apps/CameraITS/pymodules/its/objects.py b/apps/CameraITS/pymodules/its/objects.py
index be730e2..5967599 100644
--- a/apps/CameraITS/pymodules/its/objects.py
+++ b/apps/CameraITS/pymodules/its/objects.py
@@ -171,16 +171,16 @@
     return out_sizes
 
 def set_filter_off_or_fast_if_possible(props, req, available_modes, filter):
-    """ Check and set controlKey to off or fast in req
+    """Check and set controlKey to off or fast in req.
 
     Args:
         props: the object returned from its.device.get_camera_properties().
-        req: the input request.
+        req: the input request. filter will be set to OFF or FAST if possible.
         available_modes: the key to check available modes.
         filter: the filter key
 
     Returns:
-        None. control_key will be set to OFF or FAST if possible.
+        Nothing.
     """
     if props.has_key(available_modes):
         if 0 in props[available_modes]:
@@ -241,18 +241,7 @@
     e = min(props['android.sensor.info.exposureTimeRange'])
     req = manual_capture_request(s,e)
 
-    set_filter_off_or_fast_if_possible(props, req,
-        "android.noiseReduction.availableNoiseReductionModes",
-        "android.noiseReduction.mode")
-    set_filter_off_or_fast_if_possible(props, req,
-        "android.colorCorrection.availableAberrationModes",
-        "android.colorCorrection.aberrationMode")
-    set_filter_off_or_fast_if_possible(props, req,
-        "android.hotPixel.availableHotPixelModes",
-        "android.hotPixel.mode")
-    set_filter_off_or_fast_if_possible(props, req,
-        "android.edge.availableEdgeModes",
-        "android.edge.mode")
+    turn_slow_filters_off(props, req)
 
     return req, out_spec
 
diff --git a/apps/CameraITS/tests/inprog/test_burst_sameness_auto.py b/apps/CameraITS/tests/inprog/test_burst_sameness_auto.py
index fdf72be..87500c7 100644
--- a/apps/CameraITS/tests/inprog/test_burst_sameness_auto.py
+++ b/apps/CameraITS/tests/inprog/test_burst_sameness_auto.py
@@ -48,7 +48,7 @@
         cam.do_3a(lock_ae=True, lock_awb=True)
 
         # After 3A has converged, lock AE+AWB for the duration of the test.
-        req = its.objects.auto_capture_request()
+        req = its.objects.fastest_auto_capture_request(props)
         req["android.blackLevel.lock"] = True
         req["android.control.awbLock"] = True
         req["android.control.aeLock"] = True
diff --git a/apps/CameraITS/tests/inprog/test_burst_sameness_fullres_auto.py b/apps/CameraITS/tests/inprog/test_burst_sameness_fullres_auto.py
index a8d1d45..932c051 100644
--- a/apps/CameraITS/tests/inprog/test_burst_sameness_fullres_auto.py
+++ b/apps/CameraITS/tests/inprog/test_burst_sameness_fullres_auto.py
@@ -47,7 +47,7 @@
         cam.do_3a(lock_ae=True, lock_awb=True)
 
         # After 3A has converged, lock AE+AWB for the duration of the test.
-        req = its.objects.auto_capture_request()
+        req = its.objects.fastest_auto_capture_request(props)
         req["android.blackLevel.lock"] = True
         req["android.control.awbLock"] = True
         req["android.control.aeLock"] = True
diff --git a/apps/CameraITS/tests/scene1/test_locked_burst.py b/apps/CameraITS/tests/scene1/test_locked_burst.py
index 8d3bc8e..a33a9f8 100644
--- a/apps/CameraITS/tests/scene1/test_locked_burst.py
+++ b/apps/CameraITS/tests/scene1/test_locked_burst.py
@@ -43,7 +43,7 @@
         cam.do_3a(do_af=True, lock_ae=True, lock_awb=True)
 
         # After 3A has converged, lock AE+AWB for the duration of the test.
-        req = its.objects.auto_capture_request()
+        req = its.objects.fastest_auto_capture_request(props)
         req["android.control.awbLock"] = True
         req["android.control.aeLock"] = True
 
diff --git a/tests/tests/hardware/src/android/hardware/camera2/cts/CaptureRequestTest.java b/tests/tests/hardware/src/android/hardware/camera2/cts/CaptureRequestTest.java
index be29a8e..92eef80 100644
--- a/tests/tests/hardware/src/android/hardware/camera2/cts/CaptureRequestTest.java
+++ b/tests/tests/hardware/src/android/hardware/camera2/cts/CaptureRequestTest.java
@@ -2146,7 +2146,8 @@
                     prevCaptureTime = captureTime;
                 }
                 mCollector.expectInRange(
-                        "Frame duration must be in the range of " + Arrays.toString(frameDurationRange),
+                        "Frame duration must be in the range of " +
+                                Arrays.toString(frameDurationRange),
                         frameDuration,
                         (long) (frameDurationRange[0] * (1 - frameDurationErrorMargin)),
                         (long) (frameDurationRange[1] * (1 + frameDurationErrorMargin)));
diff --git a/tests/tests/hardware/src/android/hardware/camera2/cts/RobustnessTest.java b/tests/tests/hardware/src/android/hardware/camera2/cts/RobustnessTest.java
index 3731753..abc0fea 100644
--- a/tests/tests/hardware/src/android/hardware/camera2/cts/RobustnessTest.java
+++ b/tests/tests/hardware/src/android/hardware/camera2/cts/RobustnessTest.java
@@ -22,7 +22,6 @@
 import android.content.Context;
 import android.graphics.ImageFormat;
 import android.graphics.SurfaceTexture;
-import android.hardware.camera2.CameraAccessException;
 import android.hardware.camera2.CameraCaptureSession;
 import android.hardware.camera2.CameraCharacteristics;
 import android.hardware.camera2.CameraDevice;
@@ -34,6 +33,7 @@
 import android.hardware.camera2.cts.helpers.StaticMetadata;
 import android.hardware.camera2.cts.testcases.Camera2AndroidTestCase;
 import android.media.CamcorderProfile;
+import android.media.Image;
 import android.media.ImageReader;
 import android.util.Log;
 import android.util.Size;