diff options
author | Venkateshwarlu Domakonda <vdomak@codeaurora.org> | 2015-10-06 11:43:38 +0530 |
---|---|---|
committer | Venkateshwarlu Domakonda <vdomak@codeaurora.org> | 2015-10-06 11:54:00 +0530 |
commit | e4643d19aff6978f05b0050758ec38b3b9c53f3e (patch) | |
tree | 21c6cd7792bc320827836342b9d00bdc86fb23c5 /fmapp2/src/com | |
parent | f184c6cbcbc8acd10c94cbf62b6744fea1d76acd (diff) | |
download | android_hardware_qcom_fm-e4643d19aff6978f05b0050758ec38b3b9c53f3e.tar.gz android_hardware_qcom_fm-e4643d19aff6978f05b0050758ec38b3b9c53f3e.tar.bz2 android_hardware_qcom_fm-e4643d19aff6978f05b0050758ec38b3b9c53f3e.zip |
FM: Add headset check
FM is turning ON even without WHS for AVRCP commands.
Added headset check before turning ON FM.
Change-Id: I0c0f1c0976ab19a89232a1de6ec4d999a3226fd1
CRs-Fixed: 918891
Diffstat (limited to 'fmapp2/src/com')
-rw-r--r-- | fmapp2/src/com/caf/fmradio/FMRadioService.java | 4 |
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 02dd4ad..35e7e24 100644 --- a/fmapp2/src/com/caf/fmradio/FMRadioService.java +++ b/fmapp2/src/com/caf/fmradio/FMRadioService.java @@ -932,7 +932,7 @@ public class FMRadioService extends Service } catch (RemoteException e) { e.printStackTrace(); } - } else if( mServiceInUse ) { + } else if(isAntennaAvailable() && mServiceInUse ) { fmOn(); try { if (mCallbacks != null ) { @@ -974,7 +974,7 @@ public class FMRadioService extends Service } else if((event != null) && (event.getKeyCode() == KeyEvent.KEYCODE_MEDIA_PLAY) && (key_action == KeyEvent.ACTION_DOWN)) { Log.d(LOGTAG, "SessionCallback: MEDIA_PLAY"); - if (mServiceInUse ) { + if (isAntennaAvailable() && mServiceInUse) { fmOn(); try { if (mCallbacks != null ) { |