summaryrefslogtreecommitdiffstats
path: root/fmapp
diff options
context:
space:
mode:
Diffstat (limited to 'fmapp')
-rw-r--r--fmapp/src/com/codeaurora/fmradio/FMRadioService.java12
1 files changed, 2 insertions, 10 deletions
diff --git a/fmapp/src/com/codeaurora/fmradio/FMRadioService.java b/fmapp/src/com/codeaurora/fmradio/FMRadioService.java
index d0270ca..4505e9f 100644
--- a/fmapp/src/com/codeaurora/fmradio/FMRadioService.java
+++ b/fmapp/src/com/codeaurora/fmradio/FMRadioService.java
@@ -473,7 +473,7 @@ public class FMRadioService extends Service
}
break;
case KeyEvent.KEYCODE_MEDIA_PLAY:
- if (mServiceInUse ) {
+ if (isAntennaAvailable() && mServiceInUse ) {
fmOn();
if (isOrderedBroadcast()) {
abortBroadcast();
@@ -656,8 +656,6 @@ public class FMRadioService extends Service
mServiceInUse = true;
/* Application/UI is attached, so get out of lower power mode */
setLowPowerMode(false);
- if((mPlaybackInProgress == false) && isWiredHeadsetAvailable())
- startFM();
Log.d(LOGTAG, "onRebind");
}
@@ -1046,13 +1044,7 @@ private Runnable mSpeakerDisableTask = new Runnable() {
mSpeakerDisableHandler.postDelayed(mSpeakerDisableTask, 0);
}
if (true == mPlaybackInProgress) {
- if (mMuted)
- unMute();
- stopFM();
- }
- if (mSpeakerPhoneOn) {
- if (isAnalogModeSupported())
- setAudioPath(false);
+ fmOff();
}
mStoppedOnFocusLoss = true;
break;