audioservice: re send BT_SCO parameter to HAL when audioserver restarts
Fix omission in AudioDeviceBroker.onAudioServerDied() where parameter "BT_SCO=on|off" must be send to HAL according to current forced usage for communication. Bug: 135512789 Test: killaudio server during call over BT SCO Change-Id: I1039748db5591321869f70c3dc589fbc62d41c31
This commit is contained in:
@@ -123,6 +123,8 @@ import com.android.internal.annotations.GuardedBy;
|
|||||||
/*package*/ void onAudioServerDied() {
|
/*package*/ void onAudioServerDied() {
|
||||||
// Restore forced usage for communications and record
|
// Restore forced usage for communications and record
|
||||||
synchronized (mDeviceStateLock) {
|
synchronized (mDeviceStateLock) {
|
||||||
|
AudioSystem.setParameters(
|
||||||
|
"BT_SCO=" + (mForcedUseForComm == AudioSystem.FORCE_BT_SCO ? "on" : "off"));
|
||||||
onSetForceUse(AudioSystem.FOR_COMMUNICATION, mForcedUseForComm, "onAudioServerDied");
|
onSetForceUse(AudioSystem.FOR_COMMUNICATION, mForcedUseForComm, "onAudioServerDied");
|
||||||
onSetForceUse(AudioSystem.FOR_RECORD, mForcedUseForComm, "onAudioServerDied");
|
onSetForceUse(AudioSystem.FOR_RECORD, mForcedUseForComm, "onAudioServerDied");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user