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

Commit ac47b257 authored by Yin-Chia Yeh's avatar Yin-Chia Yeh Committed by android-build-merger
Browse files

Camera: check HIDL transaction ret value

am: 73d0374f

Change-Id: I1e7ac93894ba3a2258bf3430e0285e3bf66d70d4
parents d1984830 73d0374f
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -202,12 +202,17 @@ bool CameraProviderManager::supportSetTorchMode(const std::string &id) {
    for (auto& provider : mProviders) {
        auto deviceInfo = findDeviceInfoLocked(id);
        if (deviceInfo != nullptr) {
            provider->mInterface->isSetTorchModeSupported(
            auto ret = provider->mInterface->isSetTorchModeSupported(
                [&support](auto status, bool supported) {
                    if (status == Status::OK) {
                        support = supported;
                    }
                });
            if (!ret.isOk()) {
                ALOGE("%s: Transaction error checking torch mode support '%s': %s",
                        __FUNCTION__, provider->mProviderName.c_str(), ret.description().c_str());
            }
            break;
        }
    }
    return support;