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

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

Snap for 12319997 from ac10f323 to 24Q4-release

Change-Id: Ia175ea7c37b59f36ae7481ff14a2d2f80f3640e8
parents 7d8c6b8c ac10f323
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -163,6 +163,16 @@ flag {
    }
}

flag {
    namespace: "camera_platform"
    name: "single_thread_executor_naming"
    description: "Set the device executor thread name."
    bug: "359709863"
    metadata {
        purpose: PURPOSE_BUGFIX
    }
}

flag {
    namespace: "camera_platform"
    name: "surface_leak_fix"
+15 −5
Original line number Diff line number Diff line
@@ -646,9 +646,14 @@ typedef enum acamera_metadata_tag {
     * be made, and for firing pre-capture flash pulses to estimate
     * scene brightness and required final capture flash power, when
     * the flash is enabled.</p>
     * <p>Normally, this entry should be set to START for only a
     * single request, and the application should wait until the
     * sequence completes before starting a new one.</p>
     * <p>Flash is enabled during precapture sequence when:</p>
     * <ul>
     * <li>AE mode is ON_ALWAYS_FLASH</li>
     * <li>AE mode is ON_AUTO_FLASH and the scene is deemed too dark without flash, or</li>
     * <li>AE mode is ON and flash mode is TORCH or SINGLE</li>
     * </ul>
     * <p>Normally, this entry should be set to START for only single request, and the
     * application should wait until the sequence completes before starting a new one.</p>
     * <p>When a precapture metering sequence is finished, the camera device
     * may lock the auto-exposure routine internally to be able to accurately expose the
     * subsequent still capture image (<code>ACAMERA_CONTROL_CAPTURE_INTENT == STILL_CAPTURE</code>).
@@ -2289,8 +2294,6 @@ typedef enum acamera_metadata_tag {
     * boost when the light level threshold is exceeded.</p>
     * <p>This state indicates when low light boost is 'ACTIVE' and applied. Similarly, it can
     * indicate when it is not being applied by returning 'INACTIVE'.</p>
     * <p>This key will be absent from the CaptureResult if AE mode is not set to
     * 'ON_LOW_LIGHT_BOOST_BRIGHTNESS_PRIORITY.</p>
     * <p>The default value will always be 'INACTIVE'.</p>
     */
    ACAMERA_CONTROL_LOW_LIGHT_BOOST_STATE =                     // byte (acamera_metadata_enum_android_control_low_light_boost_state_t)
@@ -2448,6 +2451,13 @@ typedef enum acamera_metadata_tag {
     * in ACAMERA_FLASH_SINGLE_STRENGTH_DEFAULT_LEVEL.
     * If ACAMERA_CONTROL_AE_MODE is set to any of <code>ON_AUTO_FLASH</code>, <code>ON_ALWAYS_FLASH</code>,
     * <code>ON_AUTO_FLASH_REDEYE</code>, <code>ON_EXTERNAL_FLASH</code> values, then the strengthLevel will be ignored.</p>
     * <p>When AE mode is ON and flash mode is TORCH or SINGLE, the application should make sure
     * the AE mode, flash mode, and flash strength level remain the same between precapture
     * trigger request and final capture request. The flash strength level being set during
     * precapture sequence is used by the camera device as a reference. The actual strength
     * may be less, and the auto-exposure routine makes sure proper conversions of sensor
     * exposure time and sensitivities between precapture and final capture for the specified
     * strength level.</p>
     *
     * @see ACAMERA_CONTROL_AE_MODE
     * @see ACAMERA_FLASH_MODE
+0 −3
Original line number Diff line number Diff line
@@ -36,9 +36,6 @@ ndk_library {
    symbol_file: "src/libaaudio.map.txt",
    first_version: "26",
    unversioned_until: "current",
    export_header_libs: [
        "libAAudio_headers",
    ],
}

cc_library_headers {
+1 −0
Original line number Diff line number Diff line
@@ -602,6 +602,7 @@ AAUDIO_API aaudio_policy_t AAudio_getMMapPolicy() {
}

AAUDIO_API aaudio_result_t AAudio_setMMapPolicy(aaudio_policy_t policy) {
    ALOGD("%s(%d)", __func__, policy);
    return AudioGlobal_setMMapPolicy(policy);
}

+12 −4
Original line number Diff line number Diff line
@@ -109,10 +109,12 @@ aaudio_result_t AudioStreamBuilder::build(AudioStream** streamPtr) {

    std::vector<AudioMMapPolicyInfo> policyInfos;
    aaudio_policy_t mmapPolicy = AudioGlobal_getMMapPolicy();
    if (android::AudioSystem::getMmapPolicyInfo(
            AudioMMapPolicyType::DEFAULT, &policyInfos) == NO_ERROR) {
    ALOGD("%s, global mmap policy is %d", __func__, mmapPolicy);
    if (status_t status = android::AudioSystem::getMmapPolicyInfo(
            AudioMMapPolicyType::DEFAULT, &policyInfos); status == NO_ERROR) {
        aaudio_policy_t systemMmapPolicy = AAudio_getAAudioPolicy(
                policyInfos, AAUDIO_MMAP_POLICY_DEFAULT_AIDL);
        ALOGD("%s, system mmap policy is %d", __func__, systemMmapPolicy);
        if (mmapPolicy == AAUDIO_POLICY_ALWAYS && systemMmapPolicy == AAUDIO_POLICY_NEVER) {
            // No need to try as AAudioService is not created and the client only wants MMAP path.
            return AAUDIO_ERROR_NO_SERVICE;
@@ -125,6 +127,7 @@ aaudio_result_t AudioStreamBuilder::build(AudioStream** streamPtr) {
            mmapPolicy = systemMmapPolicy;
        }
    } else {
        ALOGD("%s, failed to query system mmap policy, error=%d", __func__, status);
        // If it fails querying mmap policy info, it is highly possible that the AAudioService is
        // not created. In this case, we don't try mmap path.
        if (mmapPolicy == AAUDIO_POLICY_ALWAYS) {
@@ -136,17 +139,22 @@ aaudio_result_t AudioStreamBuilder::build(AudioStream** streamPtr) {
    if (mmapPolicy == AAUDIO_UNSPECIFIED) {
        mmapPolicy = AAUDIO_MMAP_POLICY_DEFAULT;
    }
    ALOGD("%s, final mmap policy is %d", __func__, mmapPolicy);

    policyInfos.clear();
    aaudio_policy_t mmapExclusivePolicy = AAUDIO_UNSPECIFIED;
    if (android::AudioSystem::getMmapPolicyInfo(
            AudioMMapPolicyType::EXCLUSIVE, &policyInfos) == NO_ERROR) {
    if (status_t status = android::AudioSystem::getMmapPolicyInfo(
            AudioMMapPolicyType::EXCLUSIVE, &policyInfos); status == NO_ERROR) {
        mmapExclusivePolicy = AAudio_getAAudioPolicy(
                policyInfos, AAUDIO_MMAP_EXCLUSIVE_POLICY_DEFAULT_AIDL);
        ALOGD("%s, system mmap exclusive policy is %d", __func__, mmapExclusivePolicy);
    } else {
        ALOGD("%s, failed to query mmap exclusive policy, error=%d", __func__, status);
    }
    if (mmapExclusivePolicy == AAUDIO_UNSPECIFIED) {
        mmapExclusivePolicy = AAUDIO_MMAP_EXCLUSIVE_POLICY_DEFAULT;
    }
    ALOGD("%s, final mmap exclusive policy is %d", __func__, mmapExclusivePolicy);

    aaudio_sharing_mode_t sharingMode = getSharingMode();
    if ((sharingMode == AAUDIO_SHARING_MODE_EXCLUSIVE)
Loading