Closed
Bug 948337
Opened 11 years ago
Closed 11 years ago
[gonk-kk]Build breaks in dom/system/gonk/AudioManager.cpp if flag MOZ_B2G_BT and MOZ_B2G_BT_BLUEZ/MOZ_B2G_BT_BLUEDROID were removed
Categories
(Firefox OS Graveyard :: Bluetooth, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: shawnjohnjr, Assigned: ben.tian)
References
Details
Attachments
(2 files, 1 obsolete file)
All Bluetooth dependency required to use #ifdef MOZ_B2G_BT to block.
Reporter | ||
Updated•11 years ago
|
Assignee: nobody → shuang
Comment 1•11 years ago
|
||
Please check the attached file in B2G/gecko/configure.in. defined MOZ_B2G_BT = 0. The build went on fine for nexus-4. Kindly comment.
Flags: needinfo?(shuang)
Reporter | ||
Comment 2•11 years ago
|
||
This was reported when build non phone product.
Flags: needinfo?(shuang)
Reporter | ||
Comment 3•11 years ago
|
||
Hi Keven,
Would you mind to provide more detail (such as build configuration)?
Flags: needinfo?(kkuo)
Comment 4•11 years ago
|
||
Hi! Shawn,
The build break is caused by removing "MOZ_B2G_BT" define in gecko/configure.in at API version 17/18 (JB).
Error message is not able to find file "BluetoothHfpManager.h".
My temporary solution is as following.
diff --git a/dom/system/gonk/AudioManager.cpp b/dom/system/gonk/AudioManager.cpp
index cb3ab83..8a01091 100644
--- a/dom/system/gonk/AudioManager.cpp
+++ b/dom/system/gonk/AudioManager.cpp
@@ -32,7 +32,9 @@
#include "BluetoothCommon.h"
#include "BluetoothProfileManagerBase.h"
+#ifdef MOZ_B2G_BT
#include "BluetoothHfpManager.h"
+#endif
#include "nsJSUtils.h"
#include "nsCxPusher.h"
Flags: needinfo?(kkuo)
Reporter | ||
Comment 5•11 years ago
|
||
In dom/system/gonk/moz.build
# include different BluetoothHfpManager.h under dom/bluetooth/
if CONFIG['MOZ_B2G_BT_BLUEZ']:
LOCAL_INCLUDES += [
'/dom/bluetooth/bluez',
]
elif CONFIG['MOZ_B2G_BT_BLUEDROID']:
LOCAL_INCLUDES += [
'/dom/bluetooth/bluedroid',
]
I guess Comment 4 'by removing "MOZ_B2G_BT" define', MOZ_B2G_BT_BLUEDROID or MOZ_B2G_BT_BLUEZ flag was removed.
Keven, does our backend flag was been removed? Set MOZ_B2G_BT=0 shall build pass.
Any reason to remove bluetooth backend flag?
Reporter | ||
Updated•11 years ago
|
Flags: needinfo?(kkuo)
Comment 6•11 years ago
|
||
Hi! Shawn,
If I set MOZ_B2G_BT=0, MOZ_B2G_BT_BLUEDROID=0 or MOZ_B2G_BT_BLUEZ=0, the build break still occurs.
/home/ymkuo/github_keven/B2G/gecko/dom/bluetooth/bluedroid/BluetoothA2dpManager.cpp:13:28: fatal error: hardware/bt_rc.h: No such file or directory
--
Keven
Flags: needinfo?(kkuo)
Reporter | ||
Comment 7•11 years ago
|
||
This is because we moved AVRCP supportness to Bluedroid based on Android 4.3, so Bluetooth HAL is based on Android 4.3 instead of 4.2. I guess you're using 4.2 below. I will open another for AVRCP 1.3 if supporting Android 4.2 is necessary.
Reporter | ||
Updated•11 years ago
|
Summary: Build breaks in dom/system/gonk/AudioManager.cpp if flag MOZ_B2G_BT =0 → Build breaks in dom/system/gonk/AudioManager.cpp if flag MOZ_B2G_BT and MOZ_B2G_BT_BLUEZ/MOZ_B2G_BT_BLUEDROID were removed
Comment 8•11 years ago
|
||
yes, it is 4.2 based.
(In reply to Shawn Huang [:shuang] [:shawnjohnjr] from comment #7)
> This is because we moved AVRCP supportness to Bluedroid based on Android
> 4.3, so Bluetooth HAL is based on Android 4.3 instead of 4.2. I guess you're
> using 4.2 below. I will open another for AVRCP 1.3 if supporting Android 4.2
> is necessary.
Reporter | ||
Updated•11 years ago
|
Summary: Build breaks in dom/system/gonk/AudioManager.cpp if flag MOZ_B2G_BT and MOZ_B2G_BT_BLUEZ/MOZ_B2G_BT_BLUEDROID were removed → [gonk-kk]Build breaks in dom/system/gonk/AudioManager.cpp if flag MOZ_B2G_BT and MOZ_B2G_BT_BLUEZ/MOZ_B2G_BT_BLUEDROID were removed
Reporter | ||
Comment 9•11 years ago
|
||
Per discussion with mwu, we will add BluetoothHfpManager header file no matter what bluetooth backend is.
Reporter | ||
Updated•11 years ago
|
Component: General → Bluetooth
Reporter | ||
Updated•11 years ago
|
Assignee: shuang → nobody
Reporter | ||
Updated•11 years ago
|
Assignee: nobody → shuang
Assignee | ||
Comment 11•11 years ago
|
||
The patch creates BluetoothHfpManagerBase.h under dom/bluetooth/. AudioManager is able to look it up no matter which backend is used. Will verify further on bluez and bluedroid platforms.
Assignee: shuang → btian
Assignee | ||
Comment 12•11 years ago
|
||
Create BluetoothHfpManagerBase.h for AudioManager including no matter which backend is used.
Attachment #8358319 -
Attachment is obsolete: true
Attachment #8359078 -
Flags: review?(echou)
Attachment #8359078 -
Flags: feedback?(shuang)
Reporter | ||
Comment 13•11 years ago
|
||
Comment on attachment 8359078 [details] [diff] [review]
Patch 1 (v2): create BluetoothHfpManagerBase for AudioManager access
Review of attachment 8359078 [details] [diff] [review]:
-----------------------------------------------------------------
Overall, it looks good to me.
Attachment #8359078 -
Flags: feedback?(shuang) → feedback+
Comment 14•11 years ago
|
||
Comment on attachment 8359078 [details] [diff] [review]
Patch 1 (v2): create BluetoothHfpManagerBase for AudioManager access
Review of attachment 8359078 [details] [diff] [review]:
-----------------------------------------------------------------
In my opinion, we should unhook AudioManager and Bluetooth*Manager as much as possible. We can send the new status as an argument of the notification to achieve this goal. Accordingly we may need a ',' separated string as the argument of the notification because the handler can only take a PRUnichar*. Ben didn't like that solution and we couldn't come to a conclusion. I'm ok with landing this for now and we should keep in mind that there may be a better solution for this.
::: dom/bluetooth/BluetoothHfpManagerBase.h
@@ +21,5 @@
> +};
> +
> +#define BT_DECL_HFP_MGR_BASE \
> + BT_DECL_PROFILE_MGR_BASE \
> + virtual bool IsScoConnected() MOZ_OVERRIDE; \
The last '\' seems unnecessary.
::: dom/system/gonk/moz.build
@@ -108,5 @@
> -elif CONFIG['MOZ_B2G_BT_BLUEDROID']:
> - LOCAL_INCLUDES += [
> - '/dom/bluetooth/bluedroid',
> - ]
> -
Although this looks good to me, I don't think I have rights to review moz.build under dom/system/gonk. Please redirect the review to the module owner.
Attachment #8359078 -
Flags: review?(echou) → review+
Assignee | ||
Comment 15•11 years ago
|
||
Comment on attachment 8359078 [details] [diff] [review]
Patch 1 (v2): create BluetoothHfpManagerBase for AudioManager access
:mwu, can you review the system/gonk/moz.build change that removes BT build flags?
Attachment #8359078 -
Flags: review?(mwu)
Updated•11 years ago
|
Attachment #8359078 -
Flags: review?(mwu) → review+
Comment 16•11 years ago
|
||
Comment 17•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•