Add a camera face detection test.

Make sure startFaceDetection can be called after taking a picture.

bug:6568961
Change-Id: I8065040087ccf8b8c56bf6131b2e2b35ff00dcfe
diff --git a/tests/tests/hardware/src/android/hardware/cts/CameraTest.java b/tests/tests/hardware/src/android/hardware/cts/CameraTest.java
index d98d296..934e46b 100755
--- a/tests/tests/hardware/src/android/hardware/cts/CameraTest.java
+++ b/tests/tests/hardware/src/android/hardware/cts/CameraTest.java
@@ -2622,6 +2622,16 @@
         for (Face[] faces: listener.mFacesArray) {
             testFaces(faces, maxNumOfFaces, optionalFieldSupported);
         }
+
+        // After taking a picture, face detection should be started again.
+        initializeMessageLooper(cameraId);
+        mCamera.startPreview();
+        mCamera.startFaceDetection();
+        mCamera.takePicture(mShutterCallback, mRawPictureCallback, mJpegPictureCallback);
+        waitForSnapshotDone();
+        mCamera.startPreview();
+        mCamera.startFaceDetection();
+        terminateMessageLooper();
     }
 
     private class FaceListener implements FaceDetectionListener {