Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit daf20731 authored by Yin-Chia Yeh's avatar Yin-Chia Yeh
Browse files

Camera: fix legacy device CTS failure

Bug: 64259581
Test: emulator CTS failure is fixed
Change-Id: I9988ffb7877c3f5d62c82ab3c7b8744720824fba
parent eb43cdbc
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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);
        }