Bug 795850 - Final version: BluetoothHfpManager failed to be added as observer of mozsettings-changed, r=qdot
authorGina Yeh <gyeh@mozilla.com>
Tue, 02 Oct 2012 11:00:33 +0800
changeset 108965 d51aa340d3e20a9911fbdfb2981fdc81cfb8308e
parent 108964 1ca8706715d0814aec4fded5a9158e4f3a1e93f6
child 108966 c1ac587a1ccbdc793b5bcdbd7ae27ab80aa0298f
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
reviewersqdot
bugs795850
milestone18.0a1
Bug 795850 - Final version: BluetoothHfpManager failed to be added as observer of mozsettings-changed, r=qdot
dom/bluetooth/BluetoothHfpManager.cpp
--- a/dom/bluetooth/BluetoothHfpManager.cpp
+++ b/dom/bluetooth/BluetoothHfpManager.cpp
@@ -94,17 +94,17 @@ CloseScoSocket()
 
 BluetoothHfpManager::BluetoothHfpManager()
   : mCurrentVgs(-1)
   , mCurrentCallIndex(0)
   , mCurrentCallState(nsIRadioInterfaceLayer::CALL_STATE_DISCONNECTED)
 {
   nsCOMPtr<nsIObserverService> obs = services::GetObserverService();
 
-  if (obs && NS_FAILED(obs->AddObserver(sInstance, MOZSETTINGS_CHANGED_ID, false))) {
+  if (obs && NS_FAILED(obs->AddObserver(this, MOZSETTINGS_CHANGED_ID, false))) {
     NS_WARNING("Failed to add settings change observer!");
   }
 
   mListener = new BluetoothRilListener();
   if (!mListener->StartListening()) {
     NS_WARNING("Failed to start listening RIL");
   }