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

Commit e5a7ab53 authored by Mikhail Naganov's avatar Mikhail Naganov Committed by Android (Google) Code Review
Browse files

Merge "Minor APM dump improvements" into tm-dev

parents d97f80ee b3bcb4f4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -88,7 +88,8 @@ void RecordClientDescriptor::trackEffectEnabled(const sp<EffectDescriptor> &effe
void RecordClientDescriptor::dump(String8 *dst, int spaces) const
{
    ClientDescriptor::dump(dst, spaces);
    dst->appendFormat("%*sSource: %d; Flags: %08x\n", spaces, "", mSource, mFlags);
    dst->appendFormat("%*sSource: %d; Flags: %08x; is soundtrigger: %d\n",
            spaces, "", mSource, mFlags, mIsSoundTrigger);
    mEnabledEffects.dump(dst, spaces + 2 /*spaces*/, false /*verbose*/);
}

+1 −1
Original line number Diff line number Diff line
@@ -3706,7 +3706,7 @@ void AudioPolicyManager::dump(String8 *dst) const
    }
    dst->appendFormat(" TTS output %savailable\n", mTtsOutputAvailable ? "" : "not ");
    dst->appendFormat(" Master mono: %s\n", mMasterMono ? "on" : "off");
    dst->appendFormat(" Communnication Strategy: %d\n", mCommunnicationStrategy);
    dst->appendFormat(" Communication Strategy id: %d\n", mCommunnicationStrategy);
    dst->appendFormat(" Config source: %s\n", mConfig.getSource().c_str()); // getConfig not const

    dst->append("\n");
+15 −5
Original line number Diff line number Diff line
@@ -587,11 +587,21 @@ status_t AudioPolicyService::dumpInternals(int fd)

    snprintf(buffer, SIZE, "Supported System Usages:\n  ");
    result.append(buffer);
    for (std::vector<audio_usage_t>::iterator it = mSupportedSystemUsages.begin();
        it != mSupportedSystemUsages.end(); ++it) {
        snprintf(buffer, SIZE, "\t%d\n", *it);
        result.append(buffer);
    std::stringstream msg;
    size_t i = 0;
    for (auto usage : mSupportedSystemUsages) {
        if (i++ != 0) msg << ", ";
        if (const char* strUsage = audio_usage_to_string(usage); strUsage) {
            msg << strUsage;
        } else {
            msg << usage << " (unknown)";
        }
    }
    if (i == 0) {
        msg << "None";
    }
    msg << std::endl;
    result.append(msg.str().c_str());

    write(fd, result.string(), result.size());