diff options
author | Satish Kodishala <skodisha@codeaurora.org> | 2014-05-16 15:50:25 +0530 |
---|---|---|
committer | Satish Kodishala <skodisha@codeaurora.org> | 2014-05-16 15:51:22 +0530 |
commit | 15907e14b1fd1114884b83476fa0190fe21896b7 (patch) | |
tree | 8c3cdc88d67e4a04100583e019a47168866a705b /fmapp2/src/com/caf/fmradio/FMRadio.java | |
parent | ae201f7971040635dea7b28d8703953be3d72ae4 (diff) | |
download | android_hardware_qcom_fm-15907e14b1fd1114884b83476fa0190fe21896b7.tar.gz android_hardware_qcom_fm-15907e14b1fd1114884b83476fa0190fe21896b7.tar.bz2 android_hardware_qcom_fm-15907e14b1fd1114884b83476fa0190fe21896b7.zip |
FM: Remove checking for hdmi presence.
Removed checking for hdmi presence.
CRs-fixed: 660378
Change-Id: I2bade3a9b78a8c6967ffca6954a7991ef39cc3cd
Diffstat (limited to 'fmapp2/src/com/caf/fmradio/FMRadio.java')
-rw-r--r-- | fmapp2/src/com/caf/fmradio/FMRadio.java | 71 |
1 files changed, 26 insertions, 45 deletions
diff --git a/fmapp2/src/com/caf/fmradio/FMRadio.java b/fmapp2/src/com/caf/fmradio/FMRadio.java index d8cdab3..ffa6367 100644 --- a/fmapp2/src/com/caf/fmradio/FMRadio.java +++ b/fmapp2/src/com/caf/fmradio/FMRadio.java @@ -458,17 +458,12 @@ public class FMRadio extends Activity public void onStart() { super.onStart(); Log.d(LOGTAG, "FMRadio: onStart"); - if (isHdmiOn()) { - showDialog(DIALOG_CMD_FAILED_HDMI_ON); - } - else { - if ((mService == null ) && (false == bindToService(this, osc))) { - Log.d(LOGTAG, "onStart: Failed to Start Service"); - } else { - Log.d(LOGTAG, "onStart: Start Service completed successfully"); - } - registerFMSettingListner(); + if ((mService == null ) && (false == bindToService(this, osc))) { + Log.d(LOGTAG, "onStart: Failed to Start Service"); + } else { + Log.d(LOGTAG, "onStart: Start Service completed successfully"); } + registerFMSettingListner(); mPrefs.Load(); if (mPicker != null) { setDisplayvalue(); @@ -736,16 +731,6 @@ public class FMRadio extends Activity return super.onOptionsItemSelected(item); } - private boolean isHdmiOn() { - //HDMI and FM concurrecny is not supported. - try { - String hdmiUserOption = android.provider.Settings.System.getString( - getContentResolver(), "HDMI_USEROPTION"); - }catch (Exception ex) { - } - return false; - } - private void enableSpeaker() { //This method with toggle Speaker phone based on existing state . boolean bSpeakerPhoneOn = isSpeakerEnabled(); @@ -1625,33 +1610,29 @@ public class FMRadio extends Activity mIsSeeking = false; mIsSearching = false; boolean bStatus = false; - if (isHdmiOn()) { - showDialog(DIALOG_CMD_FAILED_HDMI_ON); - }else { - if (mService != null) { - try { - if((false == mService.isFmOn()) && isAntennaAvailable()) { - bStatus = mService.fmOn(); - if(bStatus) { - tuneRadio(FmSharedPreferences.getTunedFrequency()); - enableRadioOnOffUI(); - }else { - Log.e(LOGTAG, "mService.fmOn failed"); - mCommandFailed = CMD_FMON; - if(isCallActive()) { - enableRadioOnOffUI(); - showDialog(DIALOG_CMD_FAILED_CALL_ON); - }else { - showDialog(DIALOG_CMD_FAILED); - } - } + if (mService != null) { + try { + if((false == mService.isFmOn()) && isAntennaAvailable()) { + bStatus = mService.fmOn(); + if(bStatus) { + tuneRadio(FmSharedPreferences.getTunedFrequency()); + enableRadioOnOffUI(); }else { - enableRadioOnOffUI(); + Log.e(LOGTAG, "mService.fmOn failed"); + mCommandFailed = CMD_FMON; + if(isCallActive()) { + enableRadioOnOffUI(); + showDialog(DIALOG_CMD_FAILED_CALL_ON); + }else { + showDialog(DIALOG_CMD_FAILED); + } } - }catch (RemoteException e) { - e.printStackTrace(); - } - } + }else { + enableRadioOnOffUI(); + } + }catch (RemoteException e) { + e.printStackTrace(); + } } } |