Add last connected device concept
When connecting multiple audio devices,
Media and Sonification sounds comes out of the last connected device,
not a high-priority device.
Test: play music
Test: connect wired earphone // sound : wired earphone
Test: connect usb earphone // sound : usb earphone, not the wired earphone(high-priority)
Test: connect bluetooth headset // sound : bluetooth headset
Test: disconnect bluetooth headset // sound : usb earphone, not the wired earphone(high-priority)
Bug: 135749685
Change-Id: I579a04a04c97cc846b88e54fa83cdf3dad0b5cee
Signed-off-by: Baekgyeong Kim <baek.kim@samsung.com>
diff --git a/services/audiopolicy/engine/common/Android.bp b/services/audiopolicy/engine/common/Android.bp
old mode 100644
new mode 100755
index b87c71d..a1c69f2
--- a/services/audiopolicy/engine/common/Android.bp
+++ b/services/audiopolicy/engine/common/Android.bp
@@ -25,6 +25,7 @@
"src/ProductStrategy.cpp",
"src/VolumeCurve.cpp",
"src/VolumeGroup.cpp",
+ "src/LastRemovableMediaDevices.cpp",
],
cflags: [
"-Wall",