do_3a should only be used if supported by the camera

Some cameras do not supprt 3a. Under those circumstances the call to
do_3a and the subsequent printout of the received values should be
skipped. The actual test can be run without them.

Change-Id: Icb3ff8d77af2dfb06698be53cce5e8667b3acdd2
diff --git a/apps/CameraITS/tests/scene2/test_faces.py b/apps/CameraITS/tests/scene2/test_faces.py
index ba4f317..218bc0a 100644
--- a/apps/CameraITS/tests/scene2/test_faces.py
+++ b/apps/CameraITS/tests/scene2/test_faces.py
@@ -13,6 +13,7 @@
 # limitations under the License.
 
 import its.image
+import its.caps
 import its.device
 import its.objects
 import os.path
@@ -31,13 +32,14 @@
         fd_modes = props['android.statistics.info.availableFaceDetectModes']
         a = props['android.sensor.info.activeArraySize']
         aw, ah = a['right'] - a['left'], a['bottom'] - a['top']
-        gain, exp, _, _, focus = cam.do_3a(get_results=True)
-        print 'iso = %d' % gain
-        print 'exp = %.2fms' % (exp*1.0E-6)
-        if focus == 0.0:
-            print 'fd = infinity'
-        else:
-            print 'fd = %.2fcm' % (1.0E2/focus)
+        if its.caps.read_3a(props):
+            gain, exp, _, _, focus = cam.do_3a(get_results=True)
+            print 'iso = %d' % gain
+            print 'exp = %.2fms' % (exp*1.0E-6)
+            if focus == 0.0:
+                print 'fd = infinity'
+            else:
+                print 'fd = %.2fcm' % (1.0E2/focus)
         for fd_mode in fd_modes:
             assert(FD_MODE_OFF <= fd_mode <= FD_MODE_FULL)
             req = its.objects.auto_capture_request()