Bug 880162 - Do not callback FM_RADIO_OPERATION_ENABLE when disabling FM radio. r=jlebar

This commit is contained in:
Steven Lee 2013-06-11 08:21:25 -04:00
parent a74163f5c9
commit 2852502e28

View File

@ -223,8 +223,12 @@ runTavaruaRadio(void *)
for (unsigned int i = 0; i < buffer.bytesused; i++) {
switch (buf[i]) {
case TAVARUA_EVT_RADIO_READY:
NS_DispatchToMainThread(new RadioUpdate(hal::FM_RADIO_OPERATION_ENABLE,
hal::FM_RADIO_OPERATION_STATUS_SUCCESS));
// The driver sends RADIO_READY both when we turn the radio on and when we turn
// the radio off.
if (sRadioEnabled) {
NS_DispatchToMainThread(new RadioUpdate(hal::FM_RADIO_OPERATION_ENABLE,
hal::FM_RADIO_OPERATION_STATUS_SUCCESS));
}
break;
case TAVARUA_EVT_SEEK_COMPLETE:
NS_DispatchToMainThread(new RadioUpdate(hal::FM_RADIO_OPERATION_SEEK,