FM: do not enable audio path when play back in progress.
do not enable audio path when play back in progress.
CRs-Fixed: 2672576
Change-Id: I0a6f9b381d2da96821b694e5d28432e78087909a
diff --git a/fmapp2/src/com/caf/fmradio/FMRadioService.java b/fmapp2/src/com/caf/fmradio/FMRadioService.java
index 3d48f4f..98bad9e 100644
--- a/fmapp2/src/com/caf/fmradio/FMRadioService.java
+++ b/fmapp2/src/com/caf/fmradio/FMRadioService.java
@@ -832,9 +832,11 @@
/* Application/UI is attached, so get out of lower power mode */
if (isFmOn()) {
setLowPowerMode(false);
- startFM();
- enableSlimbus(ENABLE_SLIMBUS_DATA_PORT);
- }
+ if(false == mPlaybackInProgress) {
+ startFM();
+ enableSlimbus(ENABLE_SLIMBUS_DATA_PORT);
+ }
+ }
}
@Override
@@ -3844,8 +3846,10 @@
// adding code for audio focus gain.
AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
audioManager.requestAudioFocus(mGainFocusReq);
- startFM();
- enableSlimbus(ENABLE_SLIMBUS_DATA_PORT);
+ if(false == mPlaybackInProgress) {
+ startFM();
+ enableSlimbus(ENABLE_SLIMBUS_DATA_PORT);
+ }
mStoppedOnFocusLoss = false;
}
}