Bug 835740 - Modified BRSF value in hands-free profile, r=echou
authorGina Yeh <gyeh@mozilla.com>
Wed, 30 Jan 2013 12:33:23 +0800
changeset 130204 8c1d7f3cc0365ff2d5284b8bc874dd2c7136811c
parent 130203 d4a6570ca6b0a26070a6287875e53cc7c2f12141
child 130205 f8cdfa25ad9ff0b3f117c37e5d63ac282893495e
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersechou
bugs835740
milestone21.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 835740 - Modified BRSF value in hands-free profile, r=echou
dom/bluetooth/BluetoothHfpManager.cpp
dom/bluetooth/BluetoothUtils.cpp
--- a/dom/bluetooth/BluetoothHfpManager.cpp
+++ b/dom/bluetooth/BluetoothHfpManager.cpp
@@ -674,17 +674,17 @@ BluetoothHfpManager::ReceiveSocketData(U
   nsAutoCString msg((const char*)aMessage->mData.get());
   msg.StripWhitespace();
 
   nsTArray<nsCString> atCommandValues;
 
   // For more information, please refer to 4.34.1 "Bluetooth Defined AT
   // Capabilities" in Bluetooth hands-free profile 1.6
   if (msg.Find("AT+BRSF=") != -1) {
-    SendCommand("+BRSF: ", 33);
+    SendCommand("+BRSF: ", 97);
   } else if (msg.Find("AT+CIND=?") != -1) {
     // Asking for CIND range
     SendCommand("+CIND: ", 0);
   } else if (msg.Find("AT+CIND?") != -1) {
     // Asking for CIND value
     SendCommand("+CIND: ", 1);
   } else if (msg.Find("AT+CMER=") != -1) {
     /**
--- a/dom/bluetooth/BluetoothUtils.cpp
+++ b/dom/bluetooth/BluetoothUtils.cpp
@@ -43,17 +43,17 @@ SetJsObject(JSContext* aContext,
       JSString* JsData;
 
       switch(v.type()) {
         case BluetoothValue::TnsString:
           JsData =
             JS_NewStringCopyN(aContext,
                               NS_ConvertUTF16toUTF8(v.get_nsString()).get(),
                               v.get_nsString().Length());
-          NS_ENSURE_TRUE(JsData, NS_ERROR_FAILURE);
+          NS_ENSURE_TRUE(JsData, false);
           val = STRING_TO_JSVAL(JsData);
           break;
         case BluetoothValue::Tuint32_t:
           val = INT_TO_JSVAL(v.get_uint32_t());
           break;
         case BluetoothValue::Tbool:
           val = BOOLEAN_TO_JSVAL(v.get_bool());
           break;
@@ -61,17 +61,17 @@ SetJsObject(JSContext* aContext,
           NS_WARNING("SetJsObject: Parameter is not handled");
           break;
       }
 
       if (!JS_SetProperty(aContext, aObj,
                           NS_ConvertUTF16toUTF8(arr[i].name()).get(),
                           &val)) {
         NS_WARNING("Failed to set property");
-        return NS_ERROR_FAILURE;
+        return false;
       }
     }
   } else {
     NS_WARNING("Not handle the type of BluetoothValue!");
     return false;
   }
 
   return true;