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

Commit da2ecaff authored by Jyoti Bhayana's avatar Jyoti Bhayana
Browse files

Camera multi-client fix bug in notifyError

In camera multi-client feature a check was added to deliver notifications to the clients only if the reqid is one of the
requests sent by them. For some of the notifications like disconnect in
notifyError, the error does not correspond to any specific request id. Hence the reqid matching check should be skipped for such errors when req id is -1.

Flag: com.android.internal.camera.flags.camera_multi_client
Bug: 392222024
Test: run CTS test SharedCameraTest#testOpenMixedMode
Change-Id: I13fb01789f3e8d86369b4366f92990cb1eeed633
parent 6a650211
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -2328,9 +2328,8 @@ void CameraDeviceClient::notifyError(int32_t errorCode,
                                     const CaptureResultExtras& resultExtras) {
    // Thread safe. Don't bother locking.
    sp<hardware::camera2::ICameraDeviceCallbacks> remoteCb = getRemoteCallback();

    bool skipClientNotification = false;
    if (flags::camera_multi_client() && mSharedMode) {
    if (flags::camera_multi_client() && mSharedMode && (resultExtras.requestId != -1)) {
        int clientReqId;
        if (!matchClientRequest(resultExtras, &clientReqId)) {
            return;