Skip to content
Snippets Groups Projects
Commit 71f87731 authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Promotion of fm.lnx.1.0-00021.

CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
995528   I01d9a55f76e1c7d68abfad9d513ae6b3625c5c77   FM: Fix Static Analysis Issues

Change-Id: I8ddc46ce62a78ec0da07778e4997e0a9fc671e3c
CRs-Fixed: 995528
parents 4b29cc48 1aab93ff
No related branches found
No related tags found
No related merge requests found
...@@ -114,32 +114,18 @@ jboolean SetFreq(JNIEnv *env, jobject thiz, jfloat freq) ...@@ -114,32 +114,18 @@ jboolean SetFreq(JNIEnv *env, jobject thiz, jfloat freq)
jfloat Seek(JNIEnv *env, jobject thiz, jfloat freq, jboolean isUp) jfloat Seek(JNIEnv *env, jobject thiz, jfloat freq, jboolean isUp)
{ {
int ret = 0; int ret = JNI_FALSE;
int tmp_freq; float val = freq;
int ret_freq;
float val;
tmp_freq = (int)(freq * FREQ_MULT); //Eg, 87.55 * 100 --> 87550 if (pFMRadio) {
if (pFMRadio)
ret = pFMRadio->Set_mute(true); ret = pFMRadio->Set_mute(true);
else ALOGD("%s, [mute] [ret=%d]\n", __func__, ret);
ret = JNI_FALSE;
if (ret) {
ALOGE("%s, error, [ret=%d]\n", __func__, ret);
}
ALOGD("%s, [mute] [ret=%d]\n", __func__, ret);
if (pFMRadio)
ret = pFMRadio->Seek((int)isUp); ret = pFMRadio->Seek((int)isUp);
else ALOGD("%s, [freq=%f] [ret=%d]\n", __func__, freq, ret);
ret = JNI_FALSE; if (ret > 0)
if (ret < 0) { val = (float)ret/FREQ_MULT; //Eg, 8755 / 100 --> 87.55
ret_freq = tmp_freq; //seek error, so use original freq
} }
ALOGD("%s, [freq=%d] [ret=%d]\n", __func__, ret_freq, ret);
val = (float)ret/FREQ_MULT; //Eg, 8755 / 100 --> 87.55
return val; return val;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment