summaryrefslogtreecommitdiffstats
path: root/fmapp2/src/com/caf/fmradio
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2014-06-06 18:54:02 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2014-06-06 18:54:02 -0700
commit2508007211db457d0503f74dcb48d89a4db9b91d (patch)
treefbee83ad132352de1e3362e474138ae1cda0eae4 /fmapp2/src/com/caf/fmradio
parent35f173bf0f245741114947a31732f9c03e580265 (diff)
parent3dbd00582df49c4dd40656fffbf5903263108b5d (diff)
downloadandroid_hardware_qcom_fm-2508007211db457d0503f74dcb48d89a4db9b91d.tar.gz
android_hardware_qcom_fm-2508007211db457d0503f74dcb48d89a4db9b91d.tar.bz2
android_hardware_qcom_fm-2508007211db457d0503f74dcb48d89a4db9b91d.zip
Merge "FM: Fix an issue with device switch from BT to speaker."
Diffstat (limited to 'fmapp2/src/com/caf/fmradio')
-rw-r--r--fmapp2/src/com/caf/fmradio/FMRadioService.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/fmapp2/src/com/caf/fmradio/FMRadioService.java b/fmapp2/src/com/caf/fmradio/FMRadioService.java
index 41947da..2e391f4 100644
--- a/fmapp2/src/com/caf/fmradio/FMRadioService.java
+++ b/fmapp2/src/com/caf/fmradio/FMRadioService.java
@@ -817,8 +817,6 @@ 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;
Log.d(LOGTAG, "Audio source set it as speaker");
@@ -827,6 +825,8 @@ public class FMRadioService extends Service
Log.d(LOGTAG, "Audio source set it as headset");
AudioSystem.setForceUse(AudioSystem.FOR_MEDIA, AudioSystem.FORCE_NONE);
}
+ AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_FM,
+ AudioSystem.DEVICE_STATE_AVAILABLE, "");
}
sendRecordServiceIntent(RECORD_START);