APM: forward mute state in APM to AF
With ring_my_car we pass the mute state together with the actual index
to AudioFlinger
Flag: com.android.media.audio.ring_my_car
Test: dumpsys + logs
Bug: 319515324
Change-Id: I7b219f9c4917b58a84fd51c0431098a77896887a
diff --git a/services/audioflinger/MmapTracks.h b/services/audioflinger/MmapTracks.h
index 442dd80..30bbd5d 100644
--- a/services/audioflinger/MmapTracks.h
+++ b/services/audioflinger/MmapTracks.h
@@ -36,7 +36,8 @@
const android::content::AttributionSourceState& attributionSource,
pid_t creatorPid,
audio_port_handle_t portId = AUDIO_PORT_HANDLE_NONE,
- float volume = 0.0f);
+ float volume = 0.0f,
+ bool muted = false);
~MmapTrack() override;
status_t initCheck() const final;
@@ -71,7 +72,11 @@
void setPortVolume(float volume) override {
mVolume = volume;
}
+ void setPortMute(bool muted) override {
+ mMuteState.muteFromPortVolume = muted;
+ }
float getPortVolume() const override { return mVolume; }
+ bool getPortMute() const override { return mMuteState.muteFromPortVolume; }
private:
DISALLOW_COPY_AND_ASSIGN(MmapTrack);