FM: Disable slimbus only if receiver is not null
Disable slimbus only if receiver is not null on
AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK.
Change-Id: I84de619e153656508da569ff7b426f5c6fa5b28b
CRs-fixed: 2108211
diff --git a/fmapp2/src/com/caf/fmradio/FMRadioService.java b/fmapp2/src/com/caf/fmradio/FMRadioService.java
index f605749..ab78098 100644
--- a/fmapp2/src/com/caf/fmradio/FMRadioService.java
+++ b/fmapp2/src/com/caf/fmradio/FMRadioService.java
@@ -1670,7 +1670,8 @@
if (true == mPlaybackInProgress) {
stopFM();
}
- mReceiver.EnableSlimbus(DISABLE_SLIMBUS_DATA_PORT);
+ if (mReceiver != null)
+ mReceiver.EnableSlimbus(DISABLE_SLIMBUS_DATA_PORT);
mStoppedOnFocusLoss = true;
break;
case AudioManager.AUDIOFOCUS_LOSS: