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

Commit 6a9b217a authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Merge cherrypicks of [2454758, 2454859, 2454837, 2454965, 2454984, 2455001,...

Merge cherrypicks of [2454758, 2454859, 2454837, 2454965, 2454984, 2455001, 2454760, 2454860, 2454838, 2454899, 2454970, 2455005, 2455027, 2454973, 2455006, 2455061, 2455007, 2454914, 2454987, 2454974] into oc-release

Change-Id: I09c0a830491cea2d0e6d8c91456dd9c9e9331550
parents 4db6575a a8dcad04
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ CameraDevice::~CameraDevice() {
    Mutex::Autolock _l(mLock);
    if (mDevice != nullptr) {
        ALOGW("%s: camera %s is deleted while open", __FUNCTION__, mCameraId.c_str());
        close();
        closeLocked();
    }
    mHalPreviewWindow.cleanUpCirculatingBuffers();
}
@@ -130,7 +130,7 @@ void CameraDevice::setConnectionStatus(bool connected) {
    }
    if (!connected) {
        ALOGW("%s: camera %s is disconneted. Closing", __FUNCTION__, mCameraId.c_str());
        close();
        closeLocked();
    }
    return;
}
@@ -982,8 +982,13 @@ Return<Status> CameraDevice::sendCommand(CommandType cmd, int32_t arg1, int32_t
}

Return<void> CameraDevice::close() {
    ALOGI("Closing camera %s", mCameraId.c_str());
    Mutex::Autolock _l(mLock);
    closeLocked();
    return Void();
}

void CameraDevice::closeLocked() {
    ALOGI("Closing camera %s", mCameraId.c_str());
    if(mDevice) {
        int rc = mDevice->common.close(&mDevice->common);
        if (rc != OK) {
@@ -991,7 +996,6 @@ Return<void> CameraDevice::close() {
        }
        mDevice = nullptr;
    }
    return Void();
}

}  // namespace implementation
+1 −0
Original line number Diff line number Diff line
@@ -222,6 +222,7 @@ private:
    static status_t getStatusT(const Status& s);

    Status initStatus() const;
    void closeLocked();
};

}  // namespace implementation