Backed out changeset d77f989d6e7d (bug 938809) for bustage
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Wed, 30 Jul 2014 05:51:38 +0200
changeset 206356 72466b921d6b441fd102886fedea1af657c6a312
parent 206355 dea61ab5f8483933215e02b51e3ab1cdb7371416
child 206357 447fd3d98aa45aa48b3bc91a71a2b5e8f41e302a
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-esr52@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs938809
milestone34.0a1
backs outd77f989d6e7dbae1060a385269560766c775276a
Backed out changeset d77f989d6e7d (bug 938809) for bustage
hal/Hal.h
hal/gonk/GonkFMRadio.cpp
--- a/hal/Hal.h
+++ b/hal/Hal.h
@@ -521,31 +521,26 @@ void EnableFMRadio(const hal::FMRadioSet
 /**
  * Disable the FM radio.
  */
 void DisableFMRadio();
 
 /**
  * Seek to an available FM radio station.
  *
- * This can be called off main thread, but all calls must be completed
- * before calling DisableFMRadio.
  */
 void FMRadioSeek(const hal::FMRadioSeekDirection& aDirection);
 
 /**
  * Get the current FM radio settings.
  */
 void GetFMRadioSettings(hal::FMRadioSettings* aInfo);
 
 /**
  * Set the FM radio's frequency.
- *
- * This can be called off main thread, but all calls must be completed
- * before calling DisableFMRadio.
  */
 void SetFMRadioFrequency(const uint32_t frequency);
 
 /**
  * Get the FM radio's frequency.
  */
 uint32_t GetFMRadioFrequency();
 
--- a/hal/gonk/GonkFMRadio.cpp
+++ b/hal/gonk/GonkFMRadio.cpp
@@ -397,28 +397,30 @@ FMRadioSeek(const hal::FMRadioSeekDirect
 #else
   seek.spacing = sRadioSettings.spaceType() * 1000;
 #endif
 
   int rc = ioctl(sRadioFD, VIDIOC_S_HW_FREQ_SEEK, &seek);
   if (sMsmFMMode && rc >= 0)
     return;
 
-  NS_DispatchToMainThread(new RadioUpdate(FM_RADIO_OPERATION_SEEK,
-                                          rc < 0 ?
-                                          FM_RADIO_OPERATION_STATUS_FAIL :
-                                          FM_RADIO_OPERATION_STATUS_SUCCESS));
+  hal::FMRadioOperationInformation info;
+  info.operation() = hal::FM_RADIO_OPERATION_SEEK;
+  info.status() = rc < 0 ? hal::FM_RADIO_OPERATION_STATUS_FAIL :
+                           hal::FM_RADIO_OPERATION_STATUS_SUCCESS;
+  hal::NotifyFMRadioStatus(info);
 
   if (rc < 0) {
     HAL_LOG(("Could not initiate hardware seek"));
     return;
   }
 
-  NS_DispatchToMainThread(new RadioUpdate(FM_RADIO_OPERATION_TUNE,
-                                          FM_RADIO_OPERATION_STATUS_SUCCESS));
+  info.operation() = hal::FM_RADIO_OPERATION_TUNE;
+  info.status() = hal::FM_RADIO_OPERATION_STATUS_SUCCESS;
+  hal::NotifyFMRadioStatus(info);
 }
 
 void
 GetFMRadioSettings(hal::FMRadioSettings* aInfo)
 {
   if (!sRadioEnabled) {
     return;
   }
@@ -443,20 +445,21 @@ SetFMRadioFrequency(const uint32_t frequ
 
   int rc = ioctl(sRadioFD, VIDIOC_S_FREQUENCY, &freq);
   if (rc < 0)
     HAL_LOG(("Could not set radio frequency"));
 
   if (sMsmFMMode && rc >= 0)
     return;
 
-  NS_DispatchToMainThread(new RadioUpdate(FM_RADIO_OPERATION_TUNE,
-                                          rc < 0 ?
-                                          FM_RADIO_OPERATION_STATUS_FAIL :
-                                          FM_RADIO_OPERATION_STATUS_SUCCESS));
+  hal::FMRadioOperationInformation info;
+  info.operation() = hal::FM_RADIO_OPERATION_TUNE;
+  info.status() = rc < 0 ? hal::FM_RADIO_OPERATION_STATUS_FAIL :
+                           hal::FM_RADIO_OPERATION_STATUS_SUCCESS;
+  hal::NotifyFMRadioStatus(info);
 }
 
 uint32_t
 GetFMRadioFrequency()
 {
   if (!sRadioEnabled)
     return 0;