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

Commit 3dce9c8d authored by Jayant Chowdhary's avatar Jayant Chowdhary
Browse files

cameraserver: remove assumption that status change callbacks must be called...


cameraserver: remove assumption that status change callbacks must be called from cameraserver process.

Some code in disconnectClient, which is probably a remnant from pre-treble days assumes
onDeviceStatusChanged callbacks can be made from only the cameraserver process.
Post treble, this is not true since the cameraserver could receive a cameraDeviceStatusChanged
callback from the camera HAL process (which could call onDeviceStatusChanged).

Bug: 158252149

Test: GCA (sanity)

Change-Id: Ic76ecf45b0c06dcb69d1b0758b7cd9047a0364ac
Signed-off-by: default avatarJayant Chowdhary <jchowdhary@google.com>
parent 6d5a5c10
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -496,9 +496,6 @@ void CameraService::disconnectClient(const String8& id, sp<BasicClient> clientTo
        clientToDisconnect->notifyError(
                hardware::camera2::ICameraDeviceCallbacks::ERROR_CAMERA_DISCONNECTED,
                CaptureResultExtras{});
        // Ensure not in binder RPC so client disconnect PID checks work correctly
        LOG_ALWAYS_FATAL_IF(CameraThreadState::getCallingPid() != getpid(),
                "onDeviceStatusChanged must be called from the camera service process!");
        clientToDisconnect->disconnect();
    }
}