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

Commit bb852635 authored by Chien-Yu Chen's avatar Chien-Yu Chen Committed by Android (Google) Code Review
Browse files

Merge "CameraService: Notify flashlight about device close" into nyc-mr1-dev

parents 065d4e64 e4fe21bb
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -2119,6 +2119,8 @@ binder::Status CameraService::BasicClient::disconnect() {
    }

    finishCameraOps();
    // Notify flashlight that a camera device is closed.
    mCameraService->mFlashlight->deviceClosed(String8::format("%d", mCameraId));
    ALOGI("%s: Disconnected client for camera %d for PID %d", __FUNCTION__, mCameraId, mClientPid);

    // client shouldn't be able to call into us anymore
@@ -2216,10 +2218,6 @@ status_t CameraService::BasicClient::finishCameraOps() {
        // Transition device state to CLOSED
        mCameraService->updateProxyDeviceState(ICameraServiceProxy::CAMERA_STATE_CLOSED,
                String8::format("%d", mCameraId));

        // Notify flashlight that a camera device is closed.
        mCameraService->mFlashlight->deviceClosed(
                String8::format("%d", mCameraId));
    }
    // Always stop watching, even if no camera op is active
    if (mOpsCallback != NULL) {