diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2013-08-06 10:56:54 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2013-08-06 10:56:54 -0700 |
commit | 4001342393f9c000830f4533d3bd6ed9c3ce4d97 (patch) | |
tree | b5f7a1492b63ff1b4c14da98d9f3cc2c992f64cf | |
parent | 28adf97f31d6de1e94fdeec7b776eb13ad6db83c (diff) | |
parent | 7e348afee7091989f7ba02dda1bd1999dfa91876 (diff) | |
download | android_hardware_qcom_fm-4001342393f9c000830f4533d3bd6ed9c3ce4d97.tar.gz android_hardware_qcom_fm-4001342393f9c000830f4533d3bd6ed9c3ce4d97.tar.bz2 android_hardware_qcom_fm-4001342393f9c000830f4533d3bd6ed9c3ce4d97.zip |
Merge "FM: Play FM in headset after turning ON"
-rw-r--r-- | fmapp/src/com/codeaurora/fmradio/FMRadioService.java | 6 | ||||
-rw-r--r-- | fmapp2/src/com/caf/fmradio/FMRadioService.java | 6 |
2 files changed, 8 insertions, 4 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, ""); diff --git a/fmapp2/src/com/caf/fmradio/FMRadioService.java b/fmapp2/src/com/caf/fmradio/FMRadioService.java index df52734..a0df1ef 100644 --- a/fmapp2/src/com/caf/fmradio/FMRadioService.java +++ b/fmapp2/src/com/caf/fmradio/FMRadioService.java @@ -731,8 +731,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, ""); |