summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSatish kumar sugasi <ssugas@codeaurora.org>2016-11-08 14:24:33 -0800
committerSatish kumar sugasi <ssugas@codeaurora.org>2016-11-09 18:33:20 -0800
commitfaef7cd61012645916a15f0e0e73a3301eab0311 (patch)
tree312488bb8e82b034f9f241e7591c11e85227209f
parentb7f96c233f8e36e36b56fd891870f1fb674b8414 (diff)
downloadandroid_hardware_qcom_fm-faef7cd61012645916a15f0e0e73a3301eab0311.tar.gz
android_hardware_qcom_fm-faef7cd61012645916a15f0e0e73a3301eab0311.tar.bz2
android_hardware_qcom_fm-faef7cd61012645916a15f0e0e73a3301eab0311.zip
Add checks to listen for A2dp state changes
skip registering listener for BT a2dp connection state changes to avoid FM over A2DP specific to particular SOC type. Change-Id: I748d8432ffdc875e7efd0064018ac9d95b907600
-rw-r--r--fmapp2/src/com/caf/fmradio/FMRadioService.java5
-rw-r--r--helium/radio_helium_hal.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/fmapp2/src/com/caf/fmradio/FMRadioService.java b/fmapp2/src/com/caf/fmradio/FMRadioService.java
index 43e91a6..54654fa 100644
--- a/fmapp2/src/com/caf/fmradio/FMRadioService.java
+++ b/fmapp2/src/com/caf/fmradio/FMRadioService.java
@@ -608,6 +608,7 @@ public class FMRadioService extends Service
*/
public void registerHeadsetListener() {
if (mHeadsetReceiver == null) {
+ boolean fm_a2dp_disabled = SystemProperties.getBoolean("fm.a2dp.conc.disabled",true);
mHeadsetReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
@@ -682,7 +683,9 @@ public class FMRadioService extends Service
AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
IntentFilter iFilter = new IntentFilter();
iFilter.addAction(Intent.ACTION_HEADSET_PLUG);
- iFilter.addAction(mA2dpDeviceState.getActionSinkStateChangedString());
+ if (!fm_a2dp_disabled) {
+ iFilter.addAction(mA2dpDeviceState.getActionSinkStateChangedString());
+ }
iFilter.addAction("HDMI_CONNECTED");
iFilter.addAction(Intent.ACTION_SHUTDOWN);
iFilter.addCategory(Intent.CATEGORY_DEFAULT);
diff --git a/helium/radio_helium_hal.c b/helium/radio_helium_hal.c
index 3f68812..3fa4587 100644
--- a/helium/radio_helium_hal.c
+++ b/helium/radio_helium_hal.c
@@ -623,7 +623,7 @@ static inline void hci_ev_program_service(char *buff)
memcpy(data+RDS_OFFSET, &buff[RDS_PS_DATA_OFFSET], len-RDS_OFFSET);
- ALOGE("SSK call ps-callback");
+ ALOGV("call ps-callback");
hal->jni_cb->ps_update_cb(data);
free(data);