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

Commit 42d63ad2 authored by Steve Kondik's avatar Steve Kondik
Browse files

libcameraservice: Remove references to playShutterSoundOnly

Removing cruft from a CAF patch. This fixes the shutter sound.

Change-Id: Ibefb50e7404a8a73336ae055ca0f6e815aed909b
parent dc1bd26e
Loading
Loading
Loading
Loading
+14 −21
Original line number Diff line number Diff line
@@ -985,16 +985,12 @@ status_t CameraService::Client::takePicture()

// snapshot taken
void CameraService::Client::handleShutter(
    image_rect_type *size, // The width and height of yuv picture for
    image_rect_type *size // The width and height of yuv picture for
                          // registerBuffer. If this is NULL, use the picture
                          // size from parameters.
   bool playShutterSoundOnly
)
{
    // Play shutter sound.

    if(playShutterSoundOnly) {

    if (mMediaPlayerClick.get() != NULL) {
        // do not play shutter sound if stream volume is 0
        // (typically because ringer mode is silent).
@@ -1005,19 +1001,16 @@ void CameraService::Client::handleShutter(
            mMediaPlayerClick->start();
        }
    }
        sp<ICameraClient> c = mCameraClient;
        if (c != NULL) {
            c->notifyCallback(CAMERA_MSG_SHUTTER, 0, 0);
        }
        return ;
    }


    // Screen goes black after the buffer is unregistered.
    if (mSurface != 0 && !mUseOverlay) {
        mSurface->unregisterBuffers();
    }

    sp<ICameraClient> c = mCameraClient;
    if (c != NULL) {
        c->notifyCallback(CAMERA_MSG_SHUTTER, 0, 0);
    }
    mHardware->disableMsgType(CAMERA_MSG_SHUTTER);

    // It takes some time before yuvPicture callback to be called.
@@ -1192,7 +1185,7 @@ void CameraService::Client::notifyCallback(int32_t msgType, int32_t ext1, int32_
    switch (msgType) {
        case CAMERA_MSG_SHUTTER:
            // ext1 is the dimension of the yuv picture.
            client->handleShutter((image_rect_type *)ext1, (bool)ext2);
            client->handleShutter((image_rect_type *)ext1);
            break;
        default:
            sp<ICameraClient> c = client->mCameraClient;
+1 −1
Original line number Diff line number Diff line
@@ -150,7 +150,7 @@ private:
        static      sp<Client>  getClientFromCookie(void* user);

                    void        handlePreviewData(const sp<IMemory>&);
                    void        handleShutter(image_rect_type *image,  bool playShutterSoundOnly);
                    void        handleShutter(image_rect_type *image);
                    void        handlePostview(const sp<IMemory>&);
                    void        handleRawPicture(const sp<IMemory>&);
                    void        handleCompressedPicture(const sp<IMemory>&);