diff options
author | Brinly Taylor <uberlaggydarwin@gmail.com> | 2015-02-07 15:29:00 +1030 |
---|---|---|
committer | Matt Wagantall <mwagantall@cyngn.com> | 2016-02-19 14:07:43 -0800 |
commit | 07459c708b2f1ad9f29b62404e7eb724f34a4d00 (patch) | |
tree | f2af2f704c197c47342fa262c806ac43f852326b /qcom | |
parent | 2218e46485b5feeece9438e75772ace5b154351e (diff) | |
download | android_hardware_qcom_fm-07459c708b2f1ad9f29b62404e7eb724f34a4d00.tar.gz android_hardware_qcom_fm-07459c708b2f1ad9f29b62404e7eb724f34a4d00.tar.bz2 android_hardware_qcom_fm-07459c708b2f1ad9f29b62404e7eb724f34a4d00.zip |
FM: Add property to force use internal antenna
Allow devices to force the FM radio to use the internal antenna setup by
setting hw.fm.internal_antenna property to true in system.prop.
Device tree example here: I7c9a67371c775a343345b035c196152bd9b2e13d
Change-Id: I1a055070bb4b7e49b7a03c75632d4b95c59f02da
Diffstat (limited to 'qcom')
-rw-r--r-- | qcom/fmradio/FmTransceiver.java | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/qcom/fmradio/FmTransceiver.java b/qcom/fmradio/FmTransceiver.java index b39fd7a..686b505 100644 --- a/qcom/fmradio/FmTransceiver.java +++ b/qcom/fmradio/FmTransceiver.java @@ -28,6 +28,7 @@ package qcom.fmradio; +import android.os.SystemProperties; import android.util.Log; import java.io.File; @@ -568,13 +569,9 @@ public class FmTransceiver */ public boolean getInternalAntenna() { - - int re = FmReceiverJNI.getControlNative (sFd, V4L2_CID_PRIVATE_TAVARUA_ANTENNA); - - if (re == 1) - return true; - - return false; + return ((FmReceiverJNI.getControlNative(sFd, + V4L2_CID_PRIVATE_TAVARUA_ANTENNA) == 1) || + SystemProperties.getBoolean("hw.fm.internal_antenna", false)); } /*============================================================== |