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

Commit 0ed153d1 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "camera2 vndk: Improve error handling" am: 8a4e9b2b am: f9c4003e am: 7d7bd15d

parents 9dd9b722 7d7bd15d
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -165,7 +165,10 @@ CameraManagerGlobal::~CameraManagerGlobal() {
    Mutex::Autolock _l(mLock);
    if (mCameraService != nullptr) {
        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();
    if (mCbLooper != nullptr) {
@@ -475,6 +478,10 @@ void CameraManagerGlobal::CallbackHandler::onMessageReceivedInternal(
                ALOGE("%s: Cannot find camera callback fp!", __FUNCTION__);
                return;
            }
            if (cb == nullptr) {
                // Physical camera callback is null
                return;
            }
            found = msg->findPointer(kContextKey, &context);
            if (!found) {
                ALOGE("%s: Cannot find callback context!", __FUNCTION__);