Merge ad56adf46fc36c2c647ddb7e9f6bc8d557baaee3 on remote branch
Change-Id: I87922ca4daeb387a4995caba04893224dac1a0d3
diff --git a/fmapp2/src/com/caf/fmradio/FMRadioService.java b/fmapp2/src/com/caf/fmradio/FMRadioService.java
index 98bad9e..8d261eb 100644
--- a/fmapp2/src/com/caf/fmradio/FMRadioService.java
+++ b/fmapp2/src/com/caf/fmradio/FMRadioService.java
@@ -2171,10 +2171,13 @@
private boolean enableSlimbus(int flag) {
Log.d(LOGTAG, "enableSlimbus");
boolean bStatus = false;
- // Send command to enable FM core
- mEventReceived = false;
- mReceiver.EnableSlimbus(flag);
- bStatus = waitForFWEvent();
+ if (mReceiver != null)
+ {
+ // Send command to enable/disable FM core
+ mEventReceived = false;
+ mReceiver.EnableSlimbus(flag);
+ bStatus = waitForFWEvent();
+ }
return bStatus;
}
@@ -2343,11 +2346,6 @@
* Reset (OFF) FM Operations: This resets all the current FM operations .
*/
private void fmOperationsReset() {
- if (isFmRecordingOn())
- {
- stopRecording();
- }
-
AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
if(audioManager != null)
{