Camera: fix legacy device CTS failure

Bug: 64259581
Test: emulator CTS failure is fixed
Change-Id: I9988ffb7877c3f5d62c82ab3c7b8744720824fba
This commit is contained in:
Yin-Chia Yeh
2017-08-10 15:41:50 -07:00
parent eb43cdbc2e
commit daf20731ca

View File

@@ -504,12 +504,18 @@ public class CameraDeviceUserShim implements ICameraDeviceUser {
if (mLegacyDevice.isClosed()) {
String err = "Cannot end configure, device has been closed.";
Log.e(TAG, err);
synchronized(mConfigureLock) {
mConfiguring = false;
}
throw new ServiceSpecificException(ICameraService.ERROR_DISCONNECTED, err);
}
if (operatingMode != ICameraDeviceUser.NORMAL_MODE) {
String err = "LEGACY devices do not support this operating mode";
Log.e(TAG, err);
synchronized(mConfigureLock) {
mConfiguring = false;
}
throw new ServiceSpecificException(ICameraService.ERROR_ILLEGAL_ARGUMENT, err);
}