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

Commit a9c322e3 authored by Eric Laurent's avatar Eric Laurent
Browse files

Fix issue 2045911: Camera Shutter tone does not play correctly while listening to music.

Add the possibility to delay routing and volume commands in AudioPolicyClientInterface. The delay is not blocking for the caller.
parent 0c891997
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -451,6 +451,7 @@ public:
    status_t get(const String8& key, String8& value);
    status_t getInt(const String8& key, int& value);
    status_t getFloat(const String8& key, float& value);
    status_t getAt(size_t index, String8& key, String8& value);

    size_t size() { return mParameters.size(); }

+10 −0
Original line number Diff line number Diff line
@@ -883,5 +883,15 @@ status_t AudioParameter::getFloat(const String8& key, float& value)
    return result;
}

status_t AudioParameter::getAt(size_t index, String8& key, String8& value)
{
    if (mParameters.size() > index) {
        key = mParameters.keyAt(index);
        value = mParameters.valueAt(index);
        return NO_ERROR;
    } else {
        return BAD_VALUE;
    }
}
}; // namespace android