stopPreviewL may do nothing in certain states. Stop streams directly
to avoid those failures, so that we always maintain the HAL interface
invariant that streams referenced by in-flight requests are never
deleted.
Bug:
7276954
Change-Id: Ic4cffc43036f4944684d941981a43d6dd1dce7af
ALOGV("Camera %d: Shutting down", mCameraId);
- stopPreviewL();
+ res = mStreamingProcessor->stopStream();
+ if (res != OK) {
+ ALOGE("%s: Problem stopping streaming: %s (%d)",
+ __FUNCTION__, strerror(-res), res);
+ }
+ res = mDevice->waitUntilDrained();
+ if (res != OK) {
+ ALOGE("%s: Problem waiting for HAL: %s (%d)",
+ __FUNCTION__, strerror(-res), res);
+ }
{
SharedParameters::Lock l(mParameters);