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

Commit ec69eba3 authored by Atneya Nair's avatar Atneya Nair Committed by Android (Google) Code Review
Browse files

Merge "[audio] cleanup: Remove dead flag code" into main

parents f2498667 32705b8f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ flag {
    bug: "367667349"
}

# unused
flag {
    name: "bluetooth_mac_address_anonymization"
    namespace: "media_audio"
+2 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@
package: "com.android.media.audioserver"
container: "system"

# shipped 24Q3
flag {
    name: "conditionally_ignore_preferred_input_device"
    namespace: "media_audio"
@@ -37,6 +38,7 @@ flag {
    bug: "364923030"
}

# shipped 24Q3
flag {
    name: "fdtostring_timeout_fix"
    namespace: "media_audio"
+4 −13
Original line number Diff line number Diff line
@@ -3802,20 +3802,11 @@ void AudioFlinger::dumpToThreadLog_l(const sp<IAfThreadBase> &thread)
{
    constexpr int THREAD_DUMP_TIMEOUT_MS = 2;
    constexpr auto PREFIX = "- ";
    if (com::android::media::audioserver::fdtostring_timeout_fix()) {
    using ::android::audio_utils::FdToString;

    auto writer = OR_RETURN(FdToString::createWriter(PREFIX));
    thread->dump(writer.borrowFdUnsafe(), {} /* args */);
    mThreadLog.logs(-1 /* time */, FdToString::closeWriterAndGetString(std::move(writer)));
    } else {
        audio_utils::FdToStringOldImpl fdToString("- ", THREAD_DUMP_TIMEOUT_MS);
        const int fd = fdToString.borrowFdUnsafe();
        if (fd >= 0) {
            thread->dump(fd, {} /* args */);
            mThreadLog.logs(-1 /* time */, fdToString.closeAndGetString());
        }
    }
}

// checkThread_l() must be called with AudioFlinger::mutex() held
+1 −5
Original line number Diff line number Diff line
@@ -1658,11 +1658,7 @@ status_t AudioPolicyManager::openDirectOutput(audio_stream_type_t stream,
    }

    if (!profile->canOpenNewIo()) {
        if (!com::android::media::audioserver::direct_track_reprioritization()) {
            ALOGW("%s profile %s can't open new output maxOpenCount reached", __func__,
                  profile->getName().c_str());
            return NAME_NOT_FOUND;
        } else if ((profile->getFlags() & AUDIO_OUTPUT_FLAG_MMAP_NOIRQ) != 0) {
        if ((profile->getFlags() & AUDIO_OUTPUT_FLAG_MMAP_NOIRQ) != 0) {
            // MMAP gracefully handles lack of an exclusive track resource by mixing
            // above the audio framework. For AAudio to know that the limit is reached,
            // return an error.