diff options
author | Venkateshwarlu Domakonda <Venkateshwarlu@codeaurora.org> | 2013-08-05 18:11:01 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2013-08-06 04:02:44 -0700 |
commit | 7e348afee7091989f7ba02dda1bd1999dfa91876 (patch) | |
tree | 345d6c410fca7e014bc1202bdcb5eee5ee6a8a82 /fmapp | |
parent | 1bb60704be9a23ad6ca11c9253a528290ca718f5 (diff) | |
download | android_hardware_qcom_fm-7e348afee7091989f7ba02dda1bd1999dfa91876.tar.gz android_hardware_qcom_fm-7e348afee7091989f7ba02dda1bd1999dfa91876.tar.bz2 android_hardware_qcom_fm-7e348afee7091989f7ba02dda1bd1999dfa91876.zip |
FM: Play FM in headset after turning ON
- FM does not resume in headset after it is force
stopped while in speaker mode.
- Enable FM in headset while starting FM.
Change-Id: I393c71b36dadfde51223d4162f3a72b9d6aace54
CRs-Fixed: 496815
Diffstat (limited to 'fmapp')
-rw-r--r-- | fmapp/src/com/codeaurora/fmradio/FMRadioService.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fmapp/src/com/codeaurora/fmradio/FMRadioService.java b/fmapp/src/com/codeaurora/fmradio/FMRadioService.java index b3a2b42..3ca96e9 100644 --- a/fmapp/src/com/codeaurora/fmradio/FMRadioService.java +++ b/fmapp/src/com/codeaurora/fmradio/FMRadioService.java @@ -744,8 +744,10 @@ public class FMRadioService extends Service //ACTION_FM=1 to AudioManager, the previous state of Speaker we set //need not be retained by the Audio Manager. if (isSpeakerEnabled()) { - mSpeakerPhoneOn = true; - AudioSystem.setForceUse(AudioSystem.FOR_MEDIA, AudioSystem.FORCE_SPEAKER); + mSpeakerPhoneOn = true; + AudioSystem.setForceUse(AudioSystem.FOR_MEDIA, AudioSystem.FORCE_SPEAKER); + } else { + AudioSystem.setForceUse(AudioSystem.FOR_MEDIA, AudioSystem.FORCE_NONE); } AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_FM, AudioSystem.DEVICE_STATE_AVAILABLE, ""); |