Revert "Fm: Use btconfigstore interface to fetch vendor features"
This reverts commit ef95cc62841a7fac77f5e258a59f7b59ab480d8d.
diff --git a/fmapp2/src/com/caf/fmradio/FMRadio.java b/fmapp2/src/com/caf/fmradio/FMRadio.java
index 4c9ac20..3865b60 100644
--- a/fmapp2/src/com/caf/fmradio/FMRadio.java
+++ b/fmapp2/src/com/caf/fmradio/FMRadio.java
@@ -280,6 +280,9 @@
private LoadedDataAndState SavedDataAndState = null;
private static String mBTsoc;
+ /** fm stats property string */
+ public static final String FM_STATS_PROP = "persist.fm.stats";
+
private BroadcastReceiver mFmSettingReceiver = null;
private static String[] RECORD_PERMISSIONS = {
Manifest.permission.RECORD_AUDIO,
@@ -712,17 +715,7 @@
if (item != null) {
item.setVisible(sleepActive && radioOn);
}
-
- if (mService != null) {
- try {
- mFMStats = mService.getFmStatsProp();
- Log.d(LOGTAG, "mFMStats: " + mFMStats);
- } catch (RemoteException e) {
- e.printStackTrace();
- return false;
- }
- }
-
+ mFMStats = SystemProperties.getBoolean(FM_STATS_PROP, false);
if(mFMStats) {
item = menu.add(0, MENU_STAT_TEST, 0,R.string.menu_stats).
setIcon(android.R.drawable.ic_menu_info_details);
diff --git a/fmapp2/src/com/caf/fmradio/FMRadioService.java b/fmapp2/src/com/caf/fmradio/FMRadioService.java
index 9930514..df6ae73 100644
--- a/fmapp2/src/com/caf/fmradio/FMRadioService.java
+++ b/fmapp2/src/com/caf/fmradio/FMRadioService.java
@@ -2123,11 +2123,6 @@
return(mService.get().getExtenCountryCode());
}
- public boolean getFmStatsProp()
- {
- return (mService.get().getFmStatsProp());
- }
-
public void restoreDefaults()
{
mService.get().restoreDefaults();
@@ -3905,14 +3900,6 @@
else
return null;
}
-
- boolean getFmStatsProp() {
- if(mReceiver != null)
- return mReceiver.getFmStatsProp();
- else
- return false;
- }
-
private void setAlarmSleepExpired (long duration) {
Intent i = new Intent(SLEEP_EXPIRED_ACTION);
AlarmManager am = (AlarmManager)getSystemService(Context.ALARM_SERVICE);
diff --git a/fmapp2/src/com/caf/fmradio/IFMRadioService.aidl b/fmapp2/src/com/caf/fmradio/IFMRadioService.aidl
index 9766093..0d79755 100644
--- a/fmapp2/src/com/caf/fmradio/IFMRadioService.aidl
+++ b/fmapp2/src/com/caf/fmradio/IFMRadioService.aidl
@@ -79,7 +79,6 @@
boolean getIntfDetLowTh();
boolean getIntfDetHighTh();
boolean getRxRepeatCount();
- boolean getFmStatsProp();
void restoreDefaults();
}
diff --git a/jni/android_hardware_fm.cpp b/jni/android_hardware_fm.cpp
index bf0b1a5..d434f25 100644
--- a/jni/android_hardware_fm.cpp
+++ b/jni/android_hardware_fm.cpp
@@ -1232,21 +1232,6 @@
return err;
}
-static jboolean android_hardware_fmradio_FmReceiverJNI_getFmStatsPropNative
- (JNIEnv* env)
-{
- jboolean ret;
- char value[PROPERTY_VALUE_MAX] = {'\0'};
- get_property(FM_STATS_PROP, value);
- if (!strncasecmp(value, "true", sizeof("true"))) {
- ret = true;
- } else {
- ret = false;
- }
-
- return ret;
-}
-
static jint android_hardware_fmradio_FmReceiverJNI_enableSoftMuteNative
(JNIEnv * env, jobject thiz, jint fd, jint val)
{
@@ -1414,8 +1399,6 @@
(void*)android_hardware_fmradio_FmReceiverJNI_enableSoftMuteNative},
{"getSocNameNative", "()Ljava/lang/String;",
(void*) android_hardware_fmradio_FmReceiverJNI_getSocNameNative},
- {"getFmStatsPropNative", "()Z",
- (void*) android_hardware_fmradio_FmReceiverJNI_getFmStatsPropNative},
};
int register_android_hardware_fm_fmradio(JNIEnv* env)
diff --git a/qcom/fmradio/FmReceiver.java b/qcom/fmradio/FmReceiver.java
index 39974d6..3702aac 100644
--- a/qcom/fmradio/FmReceiver.java
+++ b/qcom/fmradio/FmReceiver.java
@@ -3092,8 +3092,4 @@
public String getSocName() {
return FmReceiverJNI.getSocNameNative();
}
-
- public boolean getFmStatsProp() {
- return FmReceiverJNI.getFmStatsPropNative();
- }
}
diff --git a/qcom/fmradio/FmReceiverJNI.java b/qcom/fmradio/FmReceiverJNI.java
index 937027e..4d2a8b4 100644
--- a/qcom/fmradio/FmReceiverJNI.java
+++ b/qcom/fmradio/FmReceiverJNI.java
@@ -493,5 +493,4 @@
static native int enableSlimbus(int fd, int val);
static native int enableSoftMute(int fd, int val);
static native String getSocNameNative();
- static native boolean getFmStatsPropNative();
}