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

Commit 0fea444d authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Camera: remove flag check_session_support_before_session_char" into main

parents de0070ac eb961c72
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -104,16 +104,6 @@ flag {
    }
}

flag {
    namespace: "camera_platform"
    name: "check_session_support_before_session_char"
    description: "Validate that a SessionConfiguration is supported before fetching SessionCharacteristics."
    bug: "327008530"
    metadata {
        purpose: PURPOSE_BUGFIX
    }
}

flag {
    namespace: "camera_platform"
    name: "analytics_24q3"
+18 −18
Original line number Diff line number Diff line
@@ -1011,7 +1011,7 @@ Status CameraService::getSessionCharacteristics(const std::string& unresolvedCam

    bool overrideForPerfClass = SessionConfigurationUtils::targetPerfClassPrimaryCamera(
            mPerfClassPrimaryCameraIds, cameraId, targetSdkVersion);
    if (flags::check_session_support_before_session_char()) {

    bool sessionConfigSupported;
    Status res = isSessionConfigurationWithParametersSupportedUnsafe(
            cameraId, sessionConfiguration, overrideForPerfClass, &sessionConfigSupported);
@@ -1022,13 +1022,13 @@ Status CameraService::getSessionCharacteristics(const std::string& unresolvedCam
        outMetadata->clear();
        return res;
    }

    if (!sessionConfigSupported) {
            std::string msg = fmt::sprintf(
                    "Session configuration not supported for camera device %s.", cameraId.c_str());
        std::string msg = fmt::sprintf("Session configuration not supported for camera device %s.",
                                       cameraId.c_str());
        outMetadata->clear();
        return STATUS_ERROR(CameraService::ERROR_ILLEGAL_ARGUMENT, msg.c_str());
    }
    }

    status_t ret = mCameraProviderManager->getSessionCharacteristics(
            cameraId, sessionConfiguration, overrideForPerfClass, rotationOverride, outMetadata);
@@ -1069,7 +1069,7 @@ Status CameraService::getSessionCharacteristics(const std::string& unresolvedCam
            }
    }

    Status res = filterSensitiveMetadataIfNeeded(cameraId, outMetadata);
    res = filterSensitiveMetadataIfNeeded(cameraId, outMetadata);
    if (flags::analytics_24q3()) {
        mCameraServiceProxyWrapper->logSessionCharacteristicsQuery(cameraId,
                getCallingUid(), sessionConfiguration, res);