Make dispatchAudioRoutesChanged be called when BT A2DP status changed

am: 71f3563c39

Change-Id: I1ed4f2bfe61feb150091b16817547538539c3285
This commit is contained in:
Sungsoo
2016-09-29 11:04:56 +00:00
committed by android-build-merger
2 changed files with 3 additions and 2 deletions

View File

@@ -220,8 +220,7 @@ public class MediaRouter {
if (mBluetoothA2dpRoute != null) {
final boolean a2dpEnabled = isBluetoothA2dpOn();
if (mainType != AudioRoutesInfo.MAIN_SPEAKER &&
mSelectedRoute == mBluetoothA2dpRoute && !a2dpEnabled) {
if (mSelectedRoute == mBluetoothA2dpRoute && !a2dpEnabled) {
selectRouteStatic(ROUTE_TYPE_LIVE_AUDIO, mDefaultAudioVideo, false);
} else if ((mSelectedRoute == mDefaultAudioVideo || mSelectedRoute == null) &&
a2dpEnabled) {

View File

@@ -5609,6 +5609,8 @@ public class AudioService extends IAudioService.Stub {
} else { // config == AudioSystem.FORCE_NONE
mBecomingNoisyIntentDevices |= AudioSystem.DEVICE_OUT_ALL_A2DP;
}
sendMsg(mAudioHandler, MSG_REPORT_NEW_ROUTES,
SENDMSG_NOOP, 0, 0, null, 0);
break;
case AudioSystem.FOR_DOCK:
if (config == AudioSystem.FORCE_ANALOG_DOCK) {