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

Commit a5f71f2a authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 11175020 from f6529a3b to 24Q1-release

Change-Id: I9b9af0068183f5b46baa164129aea86d6836c246
parents a297f43b f6529a3b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ aconfig_declarations {
cc_aconfig_library {
    name: "camera_platform_flags_c_lib",
    aconfig_declarations: "camera_platform_flags",
    host_supported: true,
}

java_aconfig_library {
+14 −1
Original line number Diff line number Diff line
@@ -7,6 +7,12 @@ flag {
     bug: "273539631"
}

flag {
     namespace: "camera_platform"
     name: "concert_mode"
     description: "Introduces a new concert mode camera extension type"
     bug: "297083874"
}
flag {
     namespace: "camera_platform"
     name: "log_ultrawide_usage"
@@ -41,3 +47,10 @@ flag {
     description: "Enable or disable HAL buffer manager as requested by the camera HAL"
     bug: "311263114"
}

flag {
    namespace: "camera_platform"
    name: "inject_session_params"
    description: "Enable session parameter injection via reconfiguration"
    bug: "308984721"
}
+82 −0
Original line number Diff line number Diff line
@@ -6494,6 +6494,40 @@ typedef enum acamera_metadata_tag {
     */
    ACAMERA_STATISTICS_OIS_Y_SHIFTS =                           // float[n]
            ACAMERA_STATISTICS_START + 20,
    /**
     * <p>An array of timestamps of lens intrinsics samples, in nanoseconds.</p>
     *
     * <p>Type: int64[n]</p>
     *
     * <p>This tag may appear in:
     * <ul>
     *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
     * </ul></p>
     *
     * <p>The array contains the timestamps of lens intrinsics samples. The timestamps are in the
     * same timebase as and comparable to ACAMERA_SENSOR_TIMESTAMP.</p>
     *
     * @see ACAMERA_SENSOR_TIMESTAMP
     */
    ACAMERA_STATISTICS_LENS_INTRINSIC_TIMESTAMPS =              // int64[n]
            ACAMERA_STATISTICS_START + 21,
    /**
     * <p>An array of intra-frame lens intrinsics.</p>
     *
     * <p>Type: float[5*n]</p>
     *
     * <p>This tag may appear in:
     * <ul>
     *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
     * </ul></p>
     *
     * <p>The data layout and contents of individual array entries matches with
     * ACAMERA_LENS_INTRINSIC_CALIBRATION.</p>
     *
     * @see ACAMERA_LENS_INTRINSIC_CALIBRATION
     */
    ACAMERA_STATISTICS_LENS_INTRINSIC_SAMPLES =                 // float[5*n]
            ACAMERA_STATISTICS_START + 22,
    ACAMERA_STATISTICS_END,
    /**
@@ -7468,6 +7502,54 @@ typedef enum acamera_metadata_tag {
     */
    ACAMERA_LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID =           // byte
            ACAMERA_LOGICAL_MULTI_CAMERA_START + 2,
    /**
     * <p>The current region of the active physical sensor that will be read out for this
     * capture.</p>
     *
     * <p>Type: int32[4]</p>
     *
     * <p>This tag may appear in:
     * <ul>
     *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
     * </ul></p>
     *
     * <p>This capture result matches with ACAMERA_SCALER_CROP_REGION on non-logical single
     * camera sensor devices. In case of logical cameras that can switch between several
     * physical devices in response to ACAMERA_CONTROL_ZOOM_RATIO, this capture result will
     * not behave like ACAMERA_SCALER_CROP_REGION and ACAMERA_CONTROL_ZOOM_RATIO, where the
     * combination of both reflects the effective zoom and crop of the logical camera output.
     * Instead, this capture result value will describe the zoom and crop of the active physical
     * device. Some examples of when the value of this capture result will change include
     * switches between different physical lenses, switches between regular and maximum
     * resolution pixel mode and going through the device digital or optical range.
     * This capture result is similar to ACAMERA_SCALER_CROP_REGION with respect to distortion
     * correction. When the distortion correction mode is OFF, the coordinate system follows
     * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, with (0, 0) being the top-left pixel
     * of the pre-correction active array. When the distortion correction mode is not OFF,
     * the coordinate system follows ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with (0, 0) being
     * the top-left pixel of the active array.</p>
     * <p>For camera devices with the
     * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR</a>
     * capability or devices where <a href="https://developer.android.com/reference/CameraCharacteristics.html#getAvailableCaptureRequestKeys">CameraCharacteristics#getAvailableCaptureRequestKeys</a>
     * lists <a href="https://developer.android.com/reference/CaptureRequest.html#SENSOR_PIXEL_MODE">ACAMERA_SENSOR_PIXEL_MODE</a>
     * , the current active physical device
     * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION /
     * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION must be used as the
     * coordinate system for requests where ACAMERA_SENSOR_PIXEL_MODE is set to
     * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
     * <p>The data representation is int[4], which maps to (left, top, width, height).</p>
     *
     * @see ACAMERA_CONTROL_ZOOM_RATIO
     * @see ACAMERA_SCALER_CROP_REGION
     * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
     * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION
     * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
     * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION
     * @see ACAMERA_SENSOR_PIXEL_MODE
     */
    ACAMERA_LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_SENSOR_CROP_REGION = 
                                                                // int32[4]
            ACAMERA_LOGICAL_MULTI_CAMERA_START + 3,
    ACAMERA_LOGICAL_MULTI_CAMERA_END,
    /**
+2 −2
Original line number Diff line number Diff line
@@ -366,14 +366,15 @@ status_t AudioEffect::command(uint32_t cmdCode,
        return mStatus;
    }

    std::unique_lock ul(mLock, std::defer_lock);
    if (cmdCode == EFFECT_CMD_ENABLE || cmdCode == EFFECT_CMD_DISABLE) {
        ul.lock();
        if (mEnabled == (cmdCode == EFFECT_CMD_ENABLE)) {
            return NO_ERROR;
        }
        if (replySize == nullptr || *replySize != sizeof(status_t) || replyData == nullptr) {
            return BAD_VALUE;
        }
        mLock.lock();
    }

    std::vector<uint8_t> data;
@@ -398,7 +399,6 @@ status_t AudioEffect::command(uint32_t cmdCode,
        if (status == NO_ERROR) {
            mEnabled = (cmdCode == EFFECT_CMD_ENABLE);
        }
        mLock.unlock();
    }

    return status;
+39 −0
Original line number Diff line number Diff line
@@ -267,6 +267,9 @@ status_t DeviceHalAidl::getParameters(const String8& keys, String8 *values) {
    if (status_t status = filterAndRetrieveBtA2dpParameters(parameterKeys, &result); status != OK) {
        ALOGW("%s: filtering or retrieving BT A2DP parameters failed: %d", __func__, status);
    }
    if (status_t status = filterAndRetrieveBtLeParameters(parameterKeys, &result); status != OK) {
        ALOGW("%s: filtering or retrieving BT LE parameters failed: %d", __func__, status);
    }
    *values = result.toString();
    return parseAndGetVendorParameters(mVendorExt, mModule, parameterKeys, values);
}
@@ -988,6 +991,23 @@ status_t DeviceHalAidl::filterAndRetrieveBtA2dpParameters(
    return OK;
}

status_t DeviceHalAidl::filterAndRetrieveBtLeParameters(
        AudioParameter &keys, AudioParameter *result) {
    if (String8 key = String8(AudioParameter::keyReconfigLeSupported); keys.containsKey(key)) {
        keys.remove(key);
        if (mBluetoothLe != nullptr) {
            bool supports;
            RETURN_STATUS_IF_ERROR(statusTFromBinderStatus(
                            mBluetoothLe->supportsOffloadReconfiguration(&supports)));
            result->addInt(key, supports ? 1 : 0);
        } else {
            ALOGI("%s: no mBluetoothLe on %s", __func__, mInstance.c_str());
            result->addInt(key, 0);
        }
    }
    return OK;
}

status_t DeviceHalAidl::filterAndUpdateBtA2dpParameters(AudioParameter &parameters) {
    std::optional<bool> a2dpEnabled;
    std::optional<std::vector<VendorParameter>> reconfigureOffload;
@@ -1069,6 +1089,7 @@ status_t DeviceHalAidl::filterAndUpdateBtHfpParameters(AudioParameter &parameter

status_t DeviceHalAidl::filterAndUpdateBtLeParameters(AudioParameter &parameters) {
    std::optional<bool> leEnabled;
    std::optional<std::vector<VendorParameter>> reconfigureOffload;
    (void)VALUE_OR_RETURN_STATUS(filterOutAndProcessParameter<String8>(
                    parameters, String8(AudioParameter::keyBtLeSuspended),
                    [&leEnabled](const String8& trueOrFalse) {
@@ -1083,9 +1104,27 @@ status_t DeviceHalAidl::filterAndUpdateBtLeParameters(AudioParameter &parameters
                                AudioParameter::keyBtLeSuspended, trueOrFalse.c_str());
                        return BAD_VALUE;
                    }));
    (void)VALUE_OR_RETURN_STATUS(filterOutAndProcessParameter<String8>(
                    parameters, String8(AudioParameter::keyReconfigLe),
                    [&](const String8& value) -> status_t {
                        if (mVendorExt != nullptr) {
                            std::vector<VendorParameter> result;
                            RETURN_STATUS_IF_ERROR(statusTFromBinderStatus(
                                    mVendorExt->parseBluetoothLeReconfigureOffload(
                                            std::string(value.c_str()), &result)));
                            reconfigureOffload = std::move(result);
                        } else {
                            reconfigureOffload = std::vector<VendorParameter>();
                        }
                        return OK;
                    }));
    if (mBluetoothLe != nullptr && leEnabled.has_value()) {
        return statusTFromBinderStatus(mBluetoothLe->setEnabled(leEnabled.value()));
    }
    if (mBluetoothLe != nullptr && reconfigureOffload.has_value()) {
        return statusTFromBinderStatus(mBluetoothLe->reconfigureOffload(
                        reconfigureOffload.value()));
    }
    return OK;
}

Loading