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

Promotion of fm.lnx.1.0-00007.

CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
958512   I78521f425d7419f3a3d577cc573560d3601b1b1e   Reset notch filter only if it is set.

Change-Id: Ifb4eb821183fd6c8adc0dbe1c7729f5642558dbb
CRs-Fixed: 958512
parents ce982a1a 8d881500
Branches
Tags v2.5.294
No related merge requests found
......@@ -216,6 +216,8 @@ public class FMRadioService extends Service
private static final int FM_OFF_FROM_APPLICATION = 1;
private static final int FM_OFF_FROM_ANTENNA = 2;
private static Object mNotchFilterLock = new Object();
public FMRadioService() {
}
......@@ -1434,18 +1436,17 @@ public class FMRadioService extends Service
}
} else {
if (mReceiver != null) {
if( true == mNotchFilterSet )
{
synchronized (mNotchFilterLock) {
if (true == mNotchFilterSet) {
mDelayedStopHandler.removeMessages(RESET_NOTCH_FILTER);
}
else
{
} else {
mReceiver.setNotchFilter(true);
mNotchFilterSet = true;
}
}
}
}
}
};
private Handler mSpeakerDisableHandler = new Handler();
......@@ -1471,10 +1472,14 @@ public class FMRadioService extends Service
stopSelf(mServiceStartId);
break;
case RESET_NOTCH_FILTER:
synchronized (mNotchFilterLock) {
if (false == mNotchFilterSet)
break;
if (mReceiver != null) {
mReceiver.setNotchFilter(false);
mNotchFilterSet = false;
}
}
break;
case STOPSERVICE_ONSLEEP:
fmOff();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment