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

Commit d851e320 authored by Austin Borger's avatar Austin Borger Committed by Gerrit Code Review
Browse files

Merge "Code clean for libcameraservice"

parents c7607bb5 c7f9b13d
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -3714,8 +3714,7 @@ void CameraService::BasicClient::block() {
// ----------------------------------------------------------------------------

void CameraService::Client::notifyError(int32_t errorCode,
        const CaptureResultExtras& resultExtras) {
    (void) resultExtras;
        [[maybe_unused]] const CaptureResultExtras& resultExtras) {
    if (mRemoteCallback != NULL) {
        int32_t api1ErrorCode = CAMERA_ERROR_RELEASED;
        if (errorCode == hardware::camera2::ICameraDeviceCallbacks::ERROR_CAMERA_DISABLED) {
+3 −6
Original line number Diff line number Diff line
@@ -1332,21 +1332,18 @@ bool Camera2Client::recordingEnabledL() {
            || l.mParameters.state == Parameters::VIDEO_SNAPSHOT);
}

void Camera2Client::releaseRecordingFrame(const sp<IMemory>& mem) {
    (void)mem;
void Camera2Client::releaseRecordingFrame([[maybe_unused]] const sp<IMemory>& mem) {
    ATRACE_CALL();
    ALOGW("%s: Not supported in buffer queue mode.", __FUNCTION__);
}

void Camera2Client::releaseRecordingFrameHandle(native_handle_t *handle) {
    (void)handle;
void Camera2Client::releaseRecordingFrameHandle([[maybe_unused]] native_handle_t *handle) {
    ATRACE_CALL();
    ALOGW("%s: Not supported in buffer queue mode.", __FUNCTION__);
}

void Camera2Client::releaseRecordingFrameHandleBatch(
        const std::vector<native_handle_t*>& handles) {
    (void)handles;
        [[maybe_unused]] const std::vector<native_handle_t*>& handles) {
    ATRACE_CALL();
    ALOGW("%s: Not supported in buffer queue mode.", __FUNCTION__);
}
+1 −3
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ CameraDeviceClientBase::CameraDeviceClientBase(
        bool systemNativeClient,
        const std::optional<String16>& clientFeatureId,
        const String8& cameraId,
        int api1CameraId,
        [[maybe_unused]] int api1CameraId,
        int cameraFacing,
        int sensorOrientation,
        int clientPid,
@@ -81,8 +81,6 @@ CameraDeviceClientBase::CameraDeviceClientBase(
            servicePid,
            overrideToPortrait),
    mRemoteCallback(remoteCallback) {
    // We don't need it for API2 clients, but Camera2ClientBase requires it.
    (void) api1CameraId;
}

// Interface used by CameraService
+6 −12
Original line number Diff line number Diff line
@@ -309,26 +309,20 @@ void CameraOfflineSessionClient::notifyIdle(
    finishCameraStreamingOps();
}

void CameraOfflineSessionClient::notifyAutoFocus(uint8_t newState, int triggerId) {
    (void)newState;
    (void)triggerId;

void CameraOfflineSessionClient::notifyAutoFocus([[maybe_unused]] uint8_t newState,
                [[maybe_unused]] int triggerId) {
    ALOGV("%s: Autofocus state now %d, last trigger %d",
          __FUNCTION__, newState, triggerId);
}

void CameraOfflineSessionClient::notifyAutoExposure(uint8_t newState, int triggerId) {
    (void)newState;
    (void)triggerId;

void CameraOfflineSessionClient::notifyAutoExposure([[maybe_unused]] uint8_t newState,
                [[maybe_unused]] int triggerId) {
    ALOGV("%s: Autoexposure state now %d, last trigger %d",
            __FUNCTION__, newState, triggerId);
}

void CameraOfflineSessionClient::notifyAutoWhitebalance(uint8_t newState, int triggerId) {
    (void)newState;
    (void)triggerId;

void CameraOfflineSessionClient::notifyAutoWhitebalance([[maybe_unused]] uint8_t newState,
                [[maybe_unused]] int triggerId) {
    ALOGV("%s: Auto-whitebalance state now %d, last trigger %d", __FUNCTION__, newState,
            triggerId);
}
+13 −26
Original line number Diff line number Diff line
@@ -380,50 +380,38 @@ void Camera2ClientBase<TClientBase>::notifyIdleWithUserTag(
}

template <typename TClientBase>
void Camera2ClientBase<TClientBase>::notifyShutter(const CaptureResultExtras& resultExtras,
                                                   nsecs_t timestamp) {
    (void)resultExtras;
    (void)timestamp;

void Camera2ClientBase<TClientBase>::notifyShutter(
                [[maybe_unused]] const CaptureResultExtras& resultExtras,
                [[maybe_unused]] nsecs_t timestamp) {
    ALOGV("%s: Shutter notification for request id %" PRId32 " at time %" PRId64,
            __FUNCTION__, resultExtras.requestId, timestamp);
}

template <typename TClientBase>
void Camera2ClientBase<TClientBase>::notifyAutoFocus(uint8_t newState,
                                                     int triggerId) {
    (void)newState;
    (void)triggerId;

void Camera2ClientBase<TClientBase>::notifyAutoFocus([[maybe_unused]] uint8_t newState,
                                                     [[maybe_unused]] int triggerId) {
    ALOGV("%s: Autofocus state now %d, last trigger %d",
          __FUNCTION__, newState, triggerId);

}

template <typename TClientBase>
void Camera2ClientBase<TClientBase>::notifyAutoExposure(uint8_t newState,
                                                        int triggerId) {
    (void)newState;
    (void)triggerId;

void Camera2ClientBase<TClientBase>::notifyAutoExposure([[maybe_unused]] uint8_t newState,
                                                        [[maybe_unused]] int triggerId) {
    ALOGV("%s: Autoexposure state now %d, last trigger %d",
            __FUNCTION__, newState, triggerId);
}

template <typename TClientBase>
void Camera2ClientBase<TClientBase>::notifyAutoWhitebalance(uint8_t newState,
                                                            int triggerId) {
    (void)newState;
    (void)triggerId;

void Camera2ClientBase<TClientBase>::notifyAutoWhitebalance(
                [[maybe_unused]] uint8_t newState,
                [[maybe_unused]] int triggerId) {
    ALOGV("%s: Auto-whitebalance state now %d, last trigger %d",
            __FUNCTION__, newState, triggerId);
}

template <typename TClientBase>
void Camera2ClientBase<TClientBase>::notifyPrepared(int streamId) {
    (void)streamId;

void Camera2ClientBase<TClientBase>::notifyPrepared([[maybe_unused]] int streamId) {
    ALOGV("%s: Stream %d now prepared",
            __FUNCTION__, streamId);
}
@@ -435,9 +423,8 @@ void Camera2ClientBase<TClientBase>::notifyRequestQueueEmpty() {
}

template <typename TClientBase>
void Camera2ClientBase<TClientBase>::notifyRepeatingRequestError(long lastFrameNumber) {
    (void)lastFrameNumber;

void Camera2ClientBase<TClientBase>::notifyRepeatingRequestError(
            [[maybe_unused]] long lastFrameNumber) {
    ALOGV("%s: Repeating request was stopped. Last frame number is %ld",
            __FUNCTION__, lastFrameNumber);
}
Loading