Merge "Camera2: Fix a deadlock when closing the camera: DO NOT MERGE" into jb-mr1-aah-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
778dd967ad
@@ -166,6 +166,7 @@ status_t EmulatedFakeCamera2::connectCamera(hw_device_t** device) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
status_t EmulatedFakeCamera2::closeCamera() {
|
status_t EmulatedFakeCamera2::closeCamera() {
|
||||||
|
{
|
||||||
Mutex::Autolock l(mMutex);
|
Mutex::Autolock l(mMutex);
|
||||||
|
|
||||||
status_t res;
|
status_t res;
|
||||||
@@ -181,7 +182,10 @@ status_t EmulatedFakeCamera2::closeCamera() {
|
|||||||
mReadoutThread->requestExit();
|
mReadoutThread->requestExit();
|
||||||
mControlThread->requestExit();
|
mControlThread->requestExit();
|
||||||
mJpegCompressor->cancel();
|
mJpegCompressor->cancel();
|
||||||
|
}
|
||||||
|
|
||||||
|
// give up the lock since we will now block and the threads
|
||||||
|
// can call back into this object
|
||||||
mConfigureThread->join();
|
mConfigureThread->join();
|
||||||
mReadoutThread->join();
|
mReadoutThread->join();
|
||||||
mControlThread->join();
|
mControlThread->join();
|
||||||
|
|||||||
Reference in New Issue
Block a user