From 07459c708b2f1ad9f29b62404e7eb724f34a4d00 Mon Sep 17 00:00:00 2001 From: Brinly Taylor Date: Sat, 7 Feb 2015 15:29:00 +1030 Subject: 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 --- qcom/fmradio/FmTransceiver.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'qcom') 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)); } /*============================================================== -- cgit v1.2.3