Bug 1082454 - [bluetooth] Set audio device type if class of device value has a rendering bit, r=echou, a=2.0m+
authorShawn Huang <shuang@mozilla.com>
Tue, 14 Oct 2014 23:43:01 +0800
changeset 204141 7e7e958def53f45972dc5a4f1bae54ce79df013a
parent 204140 7a3581beaa07fa433865f2679703bf757d4ba90d
child 204150 adc9654465d686e5cda3f8f811bd511f606df57b
push id47
push userkli@mozilla.com
push dateTue, 14 Oct 2014 15:43:34 +0000
treeherdermozilla-b2g32_v2_0m@7e7e958def53 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersechou, 2.0m
bugs1082454
milestone32.0
Bug 1082454 - [bluetooth] Set audio device type if class of device value has a rendering bit, r=echou, a=2.0m+
dom/bluetooth/bluedroid/BluetoothServiceBluedroid.cpp
--- a/dom/bluetooth/bluedroid/BluetoothServiceBluedroid.cpp
+++ b/dom/bluetooth/bluedroid/BluetoothServiceBluedroid.cpp
@@ -240,16 +240,22 @@ ClassToIcon(uint32_t aClass, nsAString& 
       }
       if (aClass & 0x20) {
         aRetIcon.AssignLiteral("camera-photo");
         break;
       }
       break;
   }
 
+  // Bug 1082454, in case multiple major services classes, force to support A2DP
+  // SNK device if rendering bit presented. See also: Bug 1075321
+  if (HAS_RENDERING(aClass)) {
+    aRetIcon.AssignLiteral("audio-card");
+  }
+
   if (aRetIcon.IsEmpty()) {
     if (HAS_AUDIO(aClass)) {
       /**
        * Property 'Icon' may be missed due to CoD of major class is TOY(0x08).
        * But we need to assign Icon as audio-card if service class is 'Audio'.
        * This is for PTS test case TC_AG_COD_BV_02_I. As HFP specification
        * defines that service class is 'Audio' can be considered as HFP HF.
        */