FM: Set MediaSession active to false while fm off
-set setActive session of media to false
even though same FM Service is used for next fm session,
so that other app can receive MediaSession events.
Change-Id: I7432594d70ac20c205a0dc31fcc756be5db24fea
diff --git a/fmapp2/src/com/caf/fmradio/FMRadioService.java b/fmapp2/src/com/caf/fmradio/FMRadioService.java
index f5b0cb0..6c35b80 100644
--- a/fmapp2/src/com/caf/fmradio/FMRadioService.java
+++ b/fmapp2/src/com/caf/fmradio/FMRadioService.java
@@ -1661,10 +1661,10 @@
ComponentName fmRadio = new ComponentName(this.getPackageName(),
FMMediaButtonIntentReceiver.class.getName());
mAudioManager.unregisterMediaButtonEventReceiver(fmRadio);
- if (mSession.isActive()) {
- Log.d(LOGTAG,"mSession is not active");
- mSession.setActive(false);
- }
+ }
+ if (mSession.isActive()) {
+ mSession.setActive(false);
+ Log.d(LOGTAG,"mSession is not active");
}
gotoIdleState();
mFMOn = false;