camera3: Don't try to disconnect stream native windows more than once
This fixes the multiple-disconnect-from-BufferQueue bug.
(In logs)
BufferQueue: [SurfaceView] disconnect: connected to another api (cur=0, req=4)
Bug: 9114681
Change-Id: I21ae1c5bd993701eea13648aa9994979a24eb210
diff --git a/services/camera/libcameraservice/camera3/Camera3Stream.h b/services/camera/libcameraservice/camera3/Camera3Stream.h
index 4b3b346..69d81e4 100644
--- a/services/camera/libcameraservice/camera3/Camera3Stream.h
+++ b/services/camera/libcameraservice/camera3/Camera3Stream.h
@@ -251,6 +251,7 @@
virtual status_t returnInputBufferLocked(
const camera3_stream_buffer &buffer);
virtual bool hasOutstandingBuffersLocked() const = 0;
+ // Can return -ENOTCONN when we are already disconnected (not an error)
virtual status_t disconnectLocked() = 0;
// Configure the buffer queue interface to the other end of the stream,