summaryrefslogtreecommitdiffstats
path: root/fmapp2/src/com/caf/fmradio/FMRadioService.java
diff options
context:
space:
mode:
authorAyaz Ahmad <aahmad@codeaurora.org>2013-09-04 19:07:05 +0530
committerAyaz Ahmad <aahmad@codeaurora.org>2013-09-05 19:06:19 +0530
commit5dfffc0706617d4f59491de2aedabb9ce6696f7e (patch)
treef134ef7317c0abd64ca6a0babc42606343f452b9 /fmapp2/src/com/caf/fmradio/FMRadioService.java
parentb0880e7472611a74c9f5df1a9e8176d2b76f984c (diff)
downloadandroid_hardware_qcom_fm-5dfffc0706617d4f59491de2aedabb9ce6696f7e.tar.gz
android_hardware_qcom_fm-5dfffc0706617d4f59491de2aedabb9ce6696f7e.tar.bz2
android_hardware_qcom_fm-5dfffc0706617d4f59491de2aedabb9ce6696f7e.zip
fmapp2: Fix the issue FM app crash
FM crashes when user long presses hook key and taps back key twice in google voice search app. Change-Id: I30a61c012477f01446cd36016a9cb3ad4bb956ed CRs-Fixed: 534027
Diffstat (limited to 'fmapp2/src/com/caf/fmradio/FMRadioService.java')
-rw-r--r--fmapp2/src/com/caf/fmradio/FMRadioService.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/fmapp2/src/com/caf/fmradio/FMRadioService.java b/fmapp2/src/com/caf/fmradio/FMRadioService.java
index fb36a9c..9a414a3 100644
--- a/fmapp2/src/com/caf/fmradio/FMRadioService.java
+++ b/fmapp2/src/com/caf/fmradio/FMRadioService.java
@@ -740,14 +740,15 @@ public class FMRadioService extends Service
//reason for resending the Speaker option is we are sending
//ACTION_FM=1 to AudioManager, the previous state of Speaker we set
//need not be retained by the Audio Manager.
+ AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_FM,
+ AudioSystem.DEVICE_STATE_AVAILABLE, "");
if (isSpeakerEnabled()) {
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, "");
+
sendRecordServiceIntent(RECORD_START);
}
mPlaybackInProgress = true;