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

Commit 8a4e9b2b authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "camera2 vndk: Improve error handling"

parents d28d8d49 ed876385
Loading
Loading
Loading
Loading
+8 −1
Original line number Original line Diff line number Diff line
@@ -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) {
@@ -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__);