summaryrefslogtreecommitdiffstats
path: root/fmapp
diff options
context:
space:
mode:
authorAyaz Ahmad <aahmad@codeaurora.org>2013-07-23 12:04:52 +0530
committerAyaz Ahmad <aahmad@codeaurora.org>2013-07-23 12:04:52 +0530
commit18bbe15e1be6f944379a03d88118ff9d8e98ca94 (patch)
tree8fcfa74e84f3134213bcc5ba30a60bc14496a9bf /fmapp
parentc96f2d1c71281f9ec2294004f39dba671b5a77b0 (diff)
downloadandroid_hardware_qcom_fm-18bbe15e1be6f944379a03d88118ff9d8e98ca94.tar.gz
android_hardware_qcom_fm-18bbe15e1be6f944379a03d88118ff9d8e98ca94.tar.bz2
android_hardware_qcom_fm-18bbe15e1be6f944379a03d88118ff9d8e98ca94.zip
FM: Save Speaker on/off state
FM resumes on BT headset after MO call from BT headset is ended, even though FM was on speaker before starting MO call, save the speaker on/off state before turning off FM as part of focus loss, incomming/outgoing call notification Change-Id: I903da7614e06a8ae1279e99f62ec3eb0b715c2ba CRs-Fixed: 483329
Diffstat (limited to 'fmapp')
-rw-r--r--fmapp/src/com/codeaurora/fmradio/FMRadioService.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/fmapp/src/com/codeaurora/fmradio/FMRadioService.java b/fmapp/src/com/codeaurora/fmradio/FMRadioService.java
index 20f0262..fc791d1 100644
--- a/fmapp/src/com/codeaurora/fmradio/FMRadioService.java
+++ b/fmapp/src/com/codeaurora/fmradio/FMRadioService.java
@@ -1131,7 +1131,7 @@ public class FMRadioService extends Service
boolean bTempSpeaker = mSpeakerPhoneOn; //need to restore SpeakerPhone
boolean bTempMute = mMuted;// need to restore Mute status
int bTempCall = mCallStatus;//need to restore call status
- if (fmOff()) {
+ if (isFmOn() && fmOff()) {
if((mServiceInUse) && (mCallbacks != null)) {
try {
mCallbacks.onDisabled();
@@ -1266,9 +1266,8 @@ private Runnable mSpeakerDisableTask = new Runnable() {
stopFM();
}
if (mSpeakerPhoneOn) {
- mSpeakerPhoneOn = false;
if (isAnalogModeSupported())
- setAudioPath(true);
+ setAudioPath(false);
}
mStoppedOnFocusLoss = true;
break;