Loading camera/ndk/ndk_vendor/impl/ACameraManager.cpp +8 −1 Original line number Original line Diff line number Diff line Loading @@ -165,7 +165,10 @@ CameraManagerGlobal::~CameraManagerGlobal() { Mutex::Autolock _l(mLock); Mutex::Autolock _l(mLock); if (mCameraService != nullptr) { if (mCameraService != nullptr) { mCameraService->unlinkToDeath(mDeathNotifier); mCameraService->unlinkToDeath(mDeathNotifier); mCameraService->removeListener(mCameraServiceListener); auto stat = mCameraService->removeListener(mCameraServiceListener); if (!stat.isOk()) { ALOGE("Failed to remove listener to camera service %s", stat.description().c_str()); } } } mDeathNotifier.clear(); mDeathNotifier.clear(); if (mCbLooper != nullptr) { if (mCbLooper != nullptr) { Loading Loading @@ -475,6 +478,10 @@ void CameraManagerGlobal::CallbackHandler::onMessageReceivedInternal( ALOGE("%s: Cannot find camera callback fp!", __FUNCTION__); ALOGE("%s: Cannot find camera callback fp!", __FUNCTION__); return; return; } } if (cb == nullptr) { // Physical camera callback is null return; } found = msg->findPointer(kContextKey, &context); found = msg->findPointer(kContextKey, &context); if (!found) { if (!found) { ALOGE("%s: Cannot find callback context!", __FUNCTION__); ALOGE("%s: Cannot find callback context!", __FUNCTION__); Loading Loading
camera/ndk/ndk_vendor/impl/ACameraManager.cpp +8 −1 Original line number Original line Diff line number Diff line Loading @@ -165,7 +165,10 @@ CameraManagerGlobal::~CameraManagerGlobal() { Mutex::Autolock _l(mLock); Mutex::Autolock _l(mLock); if (mCameraService != nullptr) { if (mCameraService != nullptr) { mCameraService->unlinkToDeath(mDeathNotifier); mCameraService->unlinkToDeath(mDeathNotifier); mCameraService->removeListener(mCameraServiceListener); auto stat = mCameraService->removeListener(mCameraServiceListener); if (!stat.isOk()) { ALOGE("Failed to remove listener to camera service %s", stat.description().c_str()); } } } mDeathNotifier.clear(); mDeathNotifier.clear(); if (mCbLooper != nullptr) { if (mCbLooper != nullptr) { Loading Loading @@ -475,6 +478,10 @@ void CameraManagerGlobal::CallbackHandler::onMessageReceivedInternal( ALOGE("%s: Cannot find camera callback fp!", __FUNCTION__); ALOGE("%s: Cannot find camera callback fp!", __FUNCTION__); return; return; } } if (cb == nullptr) { // Physical camera callback is null return; } found = msg->findPointer(kContextKey, &context); found = msg->findPointer(kContextKey, &context); if (!found) { if (!found) { ALOGE("%s: Cannot find callback context!", __FUNCTION__); ALOGE("%s: Cannot find callback context!", __FUNCTION__); Loading