Bug 899769 - Fix build of AudioManager.cpp when bluetooth is disabled, r=rlin
authorMichael Wu <mwu@mozilla.com>
Tue, 30 Jul 2013 22:44:48 -0400
changeset 140714 065af7f400f861d937a7409e179d8b44e78fa23c
parent 140645 c2b375f3a909fed4dd66947b88bd63e414c8d97e
child 140715 9f0d6de45be804fd085e505ce0e63a64b4820c6f
push id25035
push useremorley@mozilla.com
push dateWed, 31 Jul 2013 11:42:50 +0000
treeherdermozilla-central@0ecb8e64dc08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrlin
bugs899769
milestone25.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 899769 - Fix build of AudioManager.cpp when bluetooth is disabled, r=rlin
dom/system/gonk/AudioManager.cpp
--- a/dom/system/gonk/AudioManager.cpp
+++ b/dom/system/gonk/AudioManager.cpp
@@ -169,16 +169,17 @@ InternalSetAudioRoutes(SwitchState aStat
   }
 }
 
 void
 AudioManager::HandleBluetoothStatusChanged(nsISupports* aSubject,
                                            const char* aTopic,
                                            const nsCString aAddress)
 {
+#ifdef MOZ_B2G_BT
   bool status;
   if (!strcmp(aTopic, BLUETOOTH_SCO_STATUS_CHANGED_ID)) {
     BluetoothHfpManager* hfp =
       static_cast<BluetoothHfpManager*>(aSubject);
     status = hfp->IsScoConnected();
   } else {
     BluetoothProfileManagerBase* profile =
       static_cast<BluetoothProfileManagerBase*>(aSubject);
@@ -216,16 +217,17 @@ AudioManager::HandleBluetoothStatusChang
       AudioSystem::setParameters(0, cmd);
     }
   } else if (!strcmp(aTopic, BLUETOOTH_HFP_STATUS_CHANGED_ID)) {
     AudioSystem::setDeviceConnectionState(AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET,
                                           audioState, aAddress.get());
     AudioSystem::setDeviceConnectionState(AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET,
                                           audioState, aAddress.get());
   }
+#endif
 }
 
 nsresult
 AudioManager::Observe(nsISupports* aSubject,
                       const char* aTopic,
                       const PRUnichar* aData)
 {
   if ((strcmp(aTopic, BLUETOOTH_SCO_STATUS_CHANGED_ID) == 0) ||