Camera2: Erase ZSL queue after each use.

Since preview stops after a capture is submitted, need to clear out
the ZSL queue to avoid using stale buffers when the preview starts up
again.

Bug: 7189765
Change-Id: I9ae2382d0af132208aca5ccba49b5464d18a263e
diff --git a/services/camera/libcameraservice/camera2/CaptureSequencer.cpp b/services/camera/libcameraservice/camera2/CaptureSequencer.cpp
index 941ad15..a836321 100644
--- a/services/camera/libcameraservice/camera2/CaptureSequencer.cpp
+++ b/services/camera/libcameraservice/camera2/CaptureSequencer.cpp
@@ -223,6 +223,11 @@
                 res = INVALID_OPERATION;
         }
     }
+    sp<ZslProcessor> processor = mZslProcessor.promote();
+    if (processor != 0) {
+        processor->clearZslQueue();
+    }
+
     if (mCaptureBuffer != 0 && res == OK) {
         Camera2Client::SharedCameraClient::Lock l(client->mSharedCameraClient);
         ALOGV("%s: Sending still image to client", __FUNCTION__);