cameraserver: clear all requests and signal mRequestSignal from RequestThread during disconnect().
This helps reduce wait time on RequestThread::join() in the following situation:
T1 calls disconnect() -> Request
T2 is in RequestThread::threadLoop -> waitForNextRequest -> mRequestSignal.wait()
which has a timeout of 50ms
The 50ms timeout is cleared if we call clear() instead of
clearRepeatingRequest().
Also call repeatingRequestEnd() HAL call from clear() for correctness.
Bug: 246214490
Test: Camera CTS
Test: Vendor Testing
Change-Id: I4e8e7309b7ee7018840e078e7346ab97d549645b
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
diff --git a/services/camera/libcameraservice/device3/Camera3Device.h b/services/camera/libcameraservice/device3/Camera3Device.h
index 3c60ba2..ac070a6 100644
--- a/services/camera/libcameraservice/device3/Camera3Device.h
+++ b/services/camera/libcameraservice/device3/Camera3Device.h
@@ -856,6 +856,9 @@
*/
void setPaused(bool paused);
+ // set mRequestClearing - no new requests are expected to be queued to RequestThread
+ void setRequestClearing();
+
/**
* Wait until thread processes the capture request with settings'
* android.request.id == requestId.