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

Commit 2391aabd authored by Shuzhen Wang's avatar Shuzhen Wang Committed by Automerger Merge Worker
Browse files

Camera: Fix race condition between initialize and statusCallback am: 4208ea0d

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/av/+/12178282

Change-Id: I1c1b7e8c93d319de068d9a00328ff53ef9f66a6d
parents 2bb61aaf 4208ea0d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1312,6 +1312,7 @@ CameraProviderManager::ProviderInfo::ProviderInfo(
status_t CameraProviderManager::ProviderInfo::initialize(
        sp<provider::V2_4::ICameraProvider>& interface,
        hardware::hidl_bitfield<provider::V2_5::DeviceState> currentDeviceState) {
    std::lock_guard<std::mutex> lock(mLock);
    status_t res = parseProviderName(mProviderName, &mType, &mId);
    if (res != OK) {
        ALOGE("%s: Invalid provider name, ignoring", __FUNCTION__);