AudioService: no forced usage for media when hearing aid is connected

Undo forced usage for NO BT config set by wired device
connection or any other usage for media when hearing aid
device is connected.

Bug: 148883172
Test: plug USB headset, play music, connect hearing aid, verify music plays on hearing aid
Change-Id: I1db1d40eaf351fc6189ee8f8bb75003be374768a
This commit is contained in:
Aniket Kumar Lata
2020-02-04 14:55:06 -08:00
committed by Jean-Michel Trivi
parent 6666041589
commit cb658590c5

View File

@@ -702,6 +702,10 @@ public class AudioDeviceInventory {
delay = 0;
}
mDeviceBroker.postSetHearingAidConnectionState(state, device, delay);
if (state == BluetoothHearingAid.STATE_CONNECTED) {
mDeviceBroker.setForceUse_Async(AudioSystem.FOR_MEDIA, AudioSystem.FORCE_NONE,
"HEARING_AID set to CONNECTED");
}
return delay;
}
}