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

Commit 6a650211 authored by Jyoti Bhayana's avatar Jyoti Bhayana
Browse files

Fix bug in ndk api isCameraDeviceSharingSupported

When camera device sharing is not supported, the function
ACameraManager_isCameraDeviceSharingSupported should return
ACAMERA_OK and sharing supported as false.

Flag: com.android.internal.camera.flags.camera_multi_client
Bug: 392150062
Test: run CTS test SharedCameraTest#testCameraDeviceSharingNotSupported
Change-Id: If58d5f97f146cbc0882129c27b3f85c3a73524ab
parent 4a5f9716
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -881,7 +881,10 @@ ACameraManager::isCameraDeviceSharingSupported(
    ret = ACameraMetadata_getConstEntry(chars, ANDROID_SHARED_SESSION_OUTPUT_CONFIGURATIONS,
            &entry);
    if (ret != ACAMERA_OK) {
        return ret;
        // If shared session metadata is not found return with sharing
        // supported as false.
        *isSharingSupported = false;
        return ACAMERA_OK;
    }
    *isSharingSupported =  (entry.count > 0) ? true : false;
    return ACAMERA_OK;