Make dispatchAudioRoutesChanged be called when BT A2DP status changed
Bug: 28517884, Bug: 31398128 Change-Id: Ic1e2f5e828a772c667caf1408ebfc9b0d7c3f7d4
This commit is contained in:
@@ -220,8 +220,7 @@ public class MediaRouter {
|
|||||||
|
|
||||||
if (mBluetoothA2dpRoute != null) {
|
if (mBluetoothA2dpRoute != null) {
|
||||||
final boolean a2dpEnabled = isBluetoothA2dpOn();
|
final boolean a2dpEnabled = isBluetoothA2dpOn();
|
||||||
if (mainType != AudioRoutesInfo.MAIN_SPEAKER &&
|
if (mSelectedRoute == mBluetoothA2dpRoute && !a2dpEnabled) {
|
||||||
mSelectedRoute == mBluetoothA2dpRoute && !a2dpEnabled) {
|
|
||||||
selectRouteStatic(ROUTE_TYPE_LIVE_AUDIO, mDefaultAudioVideo, false);
|
selectRouteStatic(ROUTE_TYPE_LIVE_AUDIO, mDefaultAudioVideo, false);
|
||||||
} else if ((mSelectedRoute == mDefaultAudioVideo || mSelectedRoute == null) &&
|
} else if ((mSelectedRoute == mDefaultAudioVideo || mSelectedRoute == null) &&
|
||||||
a2dpEnabled) {
|
a2dpEnabled) {
|
||||||
|
|||||||
@@ -5609,6 +5609,8 @@ public class AudioService extends IAudioService.Stub {
|
|||||||
} else { // config == AudioSystem.FORCE_NONE
|
} else { // config == AudioSystem.FORCE_NONE
|
||||||
mBecomingNoisyIntentDevices |= AudioSystem.DEVICE_OUT_ALL_A2DP;
|
mBecomingNoisyIntentDevices |= AudioSystem.DEVICE_OUT_ALL_A2DP;
|
||||||
}
|
}
|
||||||
|
sendMsg(mAudioHandler, MSG_REPORT_NEW_ROUTES,
|
||||||
|
SENDMSG_NOOP, 0, 0, null, 0);
|
||||||
break;
|
break;
|
||||||
case AudioSystem.FOR_DOCK:
|
case AudioSystem.FOR_DOCK:
|
||||||
if (config == AudioSystem.FORCE_ANALOG_DOCK) {
|
if (config == AudioSystem.FORCE_ANALOG_DOCK) {
|
||||||
|
|||||||
Reference in New Issue
Block a user