Camera3: Skip no-op stream configurations.

If configuring the same set of streams more than once, don't actually
call into the HAL for the second and subsequent configure calls, since
they're no-ops.

This can speed up camera operation substantially if the
HAL implementation does not detect no-ops on its own and does a full
shutdown/restart on each configure call.

Bug: 9392513
Change-Id: I23baf4acbae2304735899adcf8e17565fa94d31d
diff --git a/services/camera/libcameraservice/Camera3Device.h b/services/camera/libcameraservice/Camera3Device.h
index 7a8c22a..faa42b9 100644
--- a/services/camera/libcameraservice/Camera3Device.h
+++ b/services/camera/libcameraservice/Camera3Device.h
@@ -149,6 +149,7 @@
     StreamSet                  mOutputStreams;
     sp<camera3::Camera3Stream> mInputStream;
     int                        mNextStreamId;
+    bool                       mNeedConfig;
 
     // Need to hold on to stream references until configure completes.
     Vector<sp<camera3::Camera3StreamInterface> > mDeletedStreams;