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

Commit b662e6c2 authored by Tom Rudick's avatar Tom Rudick Committed by android-build-merger
Browse files

If a device does not have a camera, do not set a camera death notifier am: d859d8a3

am: 879c32ed

Change-Id: Iee89dce954d0fccfd3337f746cd0fa2a91028a62
parents ce85a697 879c32ed
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -369,9 +369,13 @@ status_t MediaRecorderClient::setListener(const sp<IMediaRecorderClient>& listen

    sp<IServiceManager> sm = defaultServiceManager();
    sp<IBinder> binder = sm->getService(String16("media.camera"));

    // If the device does not have a camera, do not create a death listener for it.
    if (binder != NULL) {
        mCameraDeathListener = new ServiceDeathNotifier(binder, listener,
                MediaPlayerService::CAMERA_PROCESS_DEATH);
        binder->linkToDeath(mCameraDeathListener);
    }

    binder = sm->getService(String16("media.codec"));
    mCodecDeathListener = new ServiceDeathNotifier(binder, listener,