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

Commit f2dc5f0e authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "MediaRecorderClient: Fix binder dereference while connecting to camera"...

Merge "MediaRecorderClient: Fix binder dereference while connecting to camera" into av-aosp.lnx.2.0-dev
parents c32383c0 34732806
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -371,11 +371,21 @@ status_t MediaRecorderClient::setListener(const sp<IMediaRecorderClient>& listen

    sp<IServiceManager> sm = defaultServiceManager();
    sp<IBinder> binder = sm->getService(String16("media.camera"));
    if (binder == NULL) {
        ALOGE("Unable to connect to camera service");
        return NO_INIT;
    }

    mCameraDeathListener = new ServiceDeathNotifier(binder, listener,
            MediaPlayerService::CAMERA_PROCESS_DEATH);
    binder->linkToDeath(mCameraDeathListener);

    binder = sm->getService(String16("media.codec"));
    if (binder == NULL) {
        ALOGE("Unable to connect to media codec service");
        return NO_INIT;
    }

    mCodecDeathListener = new ServiceDeathNotifier(binder, listener,
            MediaPlayerService::MEDIACODEC_PROCESS_DEATH);
    binder->linkToDeath(mCodecDeathListener);