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

Commit b4fa5e7a authored by Mikhail Naganov's avatar Mikhail Naganov
Browse files

APM dump: Indent the name of the USB device properly

Example output:

   2. Port ID: 30; "USB Headset Out"; {AUDIO_DEVICE_OUT_USB_...
      Encapsulation modes: 0, metadata types: 0
      "USB-Audio - HIFI DSD"

Bug: 231976949
Test: adb shell dumpsys media.audio_policy
Change-Id: I2cbcf0bba596d36227b38d60aedf3baa383b9404
parent 4b6803ec
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -126,7 +126,14 @@ void DeviceDescriptorBase::dump(std::string *dst, int spaces,
                    "%*sEncapsulation modes: %u, metadata types: %u\n", spaces, "",
                    mEncapsulationModes, mEncapsulationMetadataTypes));

    AudioPort::dump(dst, spaces, nullptr, verbose);
    std::string portStr;
    AudioPort::dump(&portStr, spaces, nullptr, verbose);
    if (!portStr.empty()) {
        if (!mName.empty()) {
            dst->append(base::StringPrintf("%*s", spaces, ""));
        }
        dst->append(portStr);
    }
}

std::string DeviceDescriptorBase::toString(bool includeSensitiveInfo) const