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

Commit 630b1366 authored by François Gaffie's avatar François Gaffie Committed by Eric Laurent
Browse files

fixup '[BUG] audio: misalignement of native/java AudioAttributes'



Bug: 237409207
Test: atest AudioManagerTest#testAdjustVolumeGroupVolume

Change-Id: I92b5919999ba25d39ec4e16d7601d9f4dcb2b7fe
Signed-off-by: default avatarFrançois Gaffie <francois.gaffie@renault.com>
parent 91c813a9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ public:
    VolumeCurves *getVolumeCurves() { return &mGroupVolumeCurves; }

    void addSupportedAttributes(const audio_attributes_t &attr);
    AttributesVector getSupportedAttributes() const { return mGroupVolumeCurves.getAttributes(); }
    AttributesVector getSupportedAttributes() const;

    void addSupportedStream(audio_stream_type_t stream);
    StreamTypeVector getStreamTypes() const { return mGroupVolumeCurves.getStreamTypes(); }
+11 −0
Original line number Diff line number Diff line
@@ -37,6 +37,17 @@ VolumeGroup::VolumeGroup(const std::string &name, int indexMin, int indexMax) :
{
}

// Used for introspection, e.g. JAVA
AttributesVector VolumeGroup::getSupportedAttributes() const
{
    AttributesVector supportedAttributes = {};
    for (auto &aa : mGroupVolumeCurves.getAttributes()) {
        aa.source = AUDIO_SOURCE_INVALID;
        supportedAttributes.push_back(aa);
    }
    return supportedAttributes;
}

void VolumeGroup::dump(String8 *dst, int spaces) const
{
    dst->appendFormat("\n%*s-%s (id: %d)\n", spaces, "", mName.c_str(), mId);