Fix: Can't control Alarm/Ring volume after plugout headset and a2dp
1) wired headset is plugin, a2dp is connected, fm is on =>
2) plugout wired headset, then disconnect a2dp =>
3) will not control alarm/ring volume via +/- button
reason: after plugout wired headset, then disconnect a2dp at last,
configureAudioDataPath(true) will be called and AudioSystem.DEVICE_OUT_FM
will be set to DEVICE_STATE_AVAILABLE. Then we can only control
media volume via +/- button.
Change-Id: Ic9b0bad141a8d5d88e6b9b93350a5b02961b91db
CRs-Fixed: 1047328
diff --git a/fmapp2/src/com/caf/fmradio/FMRadioService.java b/fmapp2/src/com/caf/fmradio/FMRadioService.java
index 9546cd3..2b9fb83 100644
--- a/fmapp2/src/com/caf/fmradio/FMRadioService.java
+++ b/fmapp2/src/com/caf/fmradio/FMRadioService.java
@@ -652,7 +652,8 @@
mA2dpDisconnected = false;
mA2dpConnected = true;
}
- configureAudioDataPath(true);
+ if (isFmOn())
+ configureAudioDataPath(true);
} else if (action.equals("HDMI_CONNECTED")) {
//FM should be off when HDMI is connected.
fmOff();