summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrinly Taylor <uberlaggydarwin@gmail.com>2015-02-07 15:29:00 +1030
committerMichael Bestas <mikeioannina@gmail.com>2017-01-04 20:00:34 +0200
commitf402fad25edaf5d7e1189c9908a3f2c8ddc35724 (patch)
treedccbe5ab3272af81054eca4bed2ff32632f6991e
parent84c9751b484eb5e4365d75aefa2a033f3f31be99 (diff)
downloadandroid_hardware_qcom_fm-f402fad25edaf5d7e1189c9908a3f2c8ddc35724.tar.gz
android_hardware_qcom_fm-f402fad25edaf5d7e1189c9908a3f2c8ddc35724.tar.bz2
android_hardware_qcom_fm-f402fad25edaf5d7e1189c9908a3f2c8ddc35724.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
-rw-r--r--qcom/fmradio/FmTransceiver.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/qcom/fmradio/FmTransceiver.java b/qcom/fmradio/FmTransceiver.java
index b90f033..5256060 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;
@@ -571,13 +572,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));
}
/*==============================================================