Commit Graph

1209 Commits

Author SHA1 Message Date
Bevis Tseng
b75f39a906 Bug 1114935 - Part 6.3: Migration in Bluetooth. r=btian
--HG--
extra : rebase_source : f3b03a7464ffe975248a25c64ca33cf3abe5e6f4
extra : histedit_source : b7252008b2a2e2a45db026ad873b4c065617be31
2015-01-15 18:22:08 +08:00
Carsten "Tomcat" Book
dff8d11a1e Merge mozilla-central to b2g-inbound 2015-03-17 11:59:24 +01:00
Ben Tian
4360afff5e Bug 1137330 - Set opcode as 'PutFinal' instead of 'Put' for file header packet if file size is 0, r=shuang 2015-03-17 09:44:10 +08:00
Ehsan Akhgari
97b5f363cc Bug 579517 follow-up: Remove NSPR types that crept in 2015-03-16 21:15:10 -04:00
Thomas Zimmermann
69e1d93253 Bug 1142132: Move helper classes of OPP manager into manager's namespace, r=shuang
Keeping helper classes in Bluetooth's C++ namespace creates collisions
between symbols of different managers' helpers. Moving OPP helpers into
the namespace of |BluetoothOPPManager| fixes this problem for OPP.
2015-03-12 13:07:32 +01:00
Thomas Zimmermann
41cc33c0c2 Bug 1142132: Move helper classes of A2DP manager into manager's namespace, r=shuang
Keeping helper classes in Bluetooth's C++ namespace creates collisions
between symbols of different managers' helpers. Moving A2DP helpers into
the namespace of |BluetoothA2dpManager| fixes this problem for A2DP.
2015-03-12 13:07:32 +01:00
Thomas Zimmermann
888dc86930 Bug 1142132: Move helper classes of HFP manager into manager's namespace, r=shuang
Keeping helper classes in Bluetooth's C++ namespace creates collisions
between symbols of different managers' helpers. Moving HFP helpers into
the namespace of |BluetoothHfpManager| fixes this problem for HFP.
2015-03-12 13:07:32 +01:00
Thomas Zimmermann
410d306d9b Bug 1134821: Detect default Bluetooth backend, r=shuang
This patch adds code to select the default Bluetooth backend from a
list of supported ones, by detecting the backend's availability. Some
devices are missing bluetoothd support. With the patch, bluetoothd
can be the default backend, but unsupportive devices fall back to in-
Gecko Bluedroid.
2015-03-11 10:11:48 +01:00
Thomas Zimmermann
ad90f39fdf Bug 1137151: Marked destructors of ref-counted Bluetooth classes as protected, r=shuang 2015-03-10 13:44:02 +01:00
Bruce Sun
c8d7bf500e Bug 1128386 - Handle |STATUS_FAIL| in |BondStateChangedNotification()|. r=tzimmermann 2015-03-09 17:04:02 +08:00
Jamin Liu
00ccab58ed Bug 1128441 - [BlueDroid] Set Bluetooth discoverable timeout properly in 'Convert' function of Bluetooth interface. r=shuang 2015-03-05 13:32:23 +08:00
Thomas Zimmermann
13ab04a400 Bug 1132229: Survive crashes of bluetoothd, r=shuang
With this patch, Gecko will handle crashes of bluetoothd by clearing its
internal state. Switching Bluetooth off and on restarts the daemon and
the Bluetooth sub-system.
2015-02-26 09:52:45 +01:00
Thomas Zimmermann
9f1dbfbb3b Bug 1132229: Handle I/O errors in Bluetooth's daemon backend, r=shuang
This patch adds error handling to all interface methods of Bluedroid's
daemon backend. If an error occures while sending a command to the daemon,
the methods dispatch an error.
2015-02-26 09:52:45 +01:00
Thomas Zimmermann
b0a5dba1a0 Bug 1132229: Return in Dispatch method if Bluetooth runnable is nullptr, r=shuang
With this patch, the dispatch method of Bluetooth runnables simply returns
if the supplied runnable is nullptr. This makes is easy to handle cases
where the caller of a Bluetooth interface method is not interested in the
result.
2015-02-26 09:52:45 +01:00
Will Wang
cef62818eb Bug 1118177 - Release file resources if users unexpectedly remove SD card. r=btian 2015-02-13 02:59:00 -05:00
Thomas Zimmermann
787ca9e0a2 Bug 1132388: Use Bludroid until update problem has been solved, r=shuang
It seems impossible right now to update Bluetooths daemon. This leaves
dogfooders without bluetooth support. This patch restores the old back-
end code for Bluetooth until bug 1130288 has been solved.
2015-02-13 09:35:11 +01:00
Bruce Sun
27f6e560fe Bug 1129846 - Handle all used type in PDU explicitly. r=tzimmermann 2015-02-05 15:35:57 +08:00
Bruce Sun
cbaff5efc5 Bug 1129257 - Use |int32_t| for |Channel| in Bluetooth Socket HAL. r=tzimmermann 2015-02-04 17:21:50 +08:00
Thomas Zimmermann
a01f7739b4 Bug 1123077: Protect PROPERTY_REMOTE_VERSION_INFO by ANDROID_VERSION, r=shuang 2015-02-03 12:26:56 +01:00
Bruce Sun
6aa6d0cb4a Bug 1125719 - Redial from bluetooth device cause bluetoothd and gecko crash. r=tzimmermann
There is |aPDU.Consume(1)| at the beginning, so |aPDU.GetSize()| becomes 1
less than the actual data length we want to parse. As a result, |memchr()|
will always fail by missing the final character by using |aPDU.GetSize()| as
its |num| parameter.
2015-01-26 19:07:23 +08:00
Tom Schuster
66ad9a2e49 Bug 1125356 - Use JS_NewPlainObject in the browser. r=bz 2015-01-24 16:38:08 +01:00
Thomas Zimmermann
f7a2e65a47 Bug 1124565: Fix position of const qualifiers for |sDefaultBackend|, r=shuang
This patch fixes the position of the second const qualifier for
|sDefaultBackend|. Both, pointer and memory, are now marked as
constant.
2015-01-22 10:52:18 +01:00
Carsten "Tomcat" Book
31479ad480 Merge mozilla-central to b2g-inbound 2015-01-20 13:23:50 +01:00
Carsten "Tomcat" Book
935a218dcb merge b2g-inbound to mozilla-central a=merge 2015-01-20 12:12:12 +01:00
Thomas Zimmermann
70fa9ef270 Bug 1065336: Implement Bluetooth backend selection; use daemon by default, r=shawnjohnjr
This patch adds proper selection of the Bluetooth backend. The backend
is configurable via environment property 'ro.moz.bluetooth.backend'. The
default value is bluetoothd.

On systems that are not Android 4.2 or later, the code does not return
a backend. These systems should use BlueZ instead.
2015-01-20 10:05:45 +01:00
Nicholas Nethercote
cc06604267 Bug 1123527 - Fix syntax error in BT_WARNING and BT_LOGD. r=btian.
cppcheck identified the extra ')' at the end of these macros. This code must
not be compiled in any of our standard configurations.

--HG--
extra : rebase_source : 4044d377e3a15ef725ac276ab54a192df63a8eb6
2015-01-19 19:12:43 -08:00
Thomas Zimmermann
2eed89da86 Bug 1119746: Support random postfix for Bluetooth daemon socket name, r=btian
This patch adds support for a random postfix for bluetoothd's socket
name. The postfix is re-generated for every instance of the daemon.
This prevents name collisions between mutliple sessions and malicious
programs from taking over the connection easily.
2015-01-20 10:17:45 +08:00
Thomas Zimmermann
b65367839d Bug 1119746: Listen for socket connections when starting Bluetooth, r=btian
Currently, Gecko connects to a running instance of bluetoothd when
it starts the daemon backend. This contains a race condition between
the startup of the daemon and the startup of Gecko.

This patch changes the initialization and cleanup of Bluetooth's
daemon backend so that the Bluetooth daemon connects to Gecko. The
daemon process is now started as part of the initialization and
quits during shutdown. The steps are strictly ordered, so no race
condition exists.

The initialization and cleanup procedures should now be compatible
with BlueZ 5.
2015-01-20 10:17:40 +08:00
Thomas Zimmermann
dd06eecb9d Bug 1119746: Fix ref-counting of bluetoothd channels, r=btian
The class |BluetoothDaemonChannel| for the bluetoothd channels
supports reference counting. This patch fixes the respective
variable to use |nsRefPtr| instead of |nsAutoPtr|.
2015-01-20 10:17:31 +08:00
Bruce Sun
899a86f835 Bug 1121930: Sync Bluetooth daemon protocol with BlueZ 5.27, r=shuang 2015-01-15 19:44:02 +08:00
Ms2ger
b83d21c58c Bug 914067 - Remove JSVAL_VOID from dom/; r=jst 2015-01-14 08:59:06 +01:00
Masatoshi Kimura
bf312ad056 Bug 1120062 - Part 1: Remove most Nullptr.h includes. r=waldo 2015-01-11 11:34:52 +09:00
Carsten "Tomcat" Book
94b83cc9a3 Merge mozilla-central to mozilla-inbound 2015-01-09 15:26:58 +01:00
Ben Tian
a2cbd8e9e6 Bug 1118163 - Restore received file for small size (1-packet) file, r=shuang 2015-01-08 18:11:37 +08:00
Ryan VanderMeulen
0adb188a2b Backed out 10 changesets (bug 1102703) for B2G JB bustage.
Backed out changeset fae7478f55e5 (bug 1102703)
Backed out changeset d9d1879fc90f (bug 1102703)
Backed out changeset b61bf281e991 (bug 1102703)
Backed out changeset f62155e4fb9c (bug 1102703)
Backed out changeset ff47d1b9e86c (bug 1102703)
Backed out changeset ece26b235282 (bug 1102703)
Backed out changeset 9f067e4973eb (bug 1102703)
Backed out changeset db035be5bc6c (bug 1102703)
Backed out changeset 411ab2917e49 (bug 1102703)
Backed out changeset 50eed0f4edc7 (bug 1102703)
2015-01-08 10:22:18 -05:00
Bruce Sun
0003a363ad Bug 1102703 - Porting bluetooth interface of bluez 5.26 (handsfree). r=btian, f=tzimmermann 2015-01-08 11:50:21 +08:00
Bruce Sun
057addefc5 Bug 1102703 - Porting bluetooth interface of bluez 5.26 (a2dp). r=btian, f=tzimmermann 2015-01-08 11:49:49 +08:00
Bruce Sun
068ab4fe55 Bug 1102703 - Porting bluetooth interface of bluez 5.26 (core). r=btian, f=tzimmermann 2015-01-08 11:49:17 +08:00
Bruce Sun
ee6dcf6c1d Bug 1102703 - Porting bluetooth interface of android lollipop (handsfree). r=shawnjohnjr, r=btian, r=tzimmermann 2015-01-08 11:48:21 +08:00
Bruce Sun
07061fec3c Bug 1102703 - Porting bluetooth interface of android lollipop (a2dp). r=shawnjohnjr 2015-01-08 11:47:42 +08:00
Bruce Sun
29b4ba484c Bug 1102703 - Porting bluetooth interface of android lollipop (core). r=btian, r=tzimmermann, r=shawnjohnjr 2015-01-08 11:47:12 +08:00
Bruce Sun
08507e26e0 Bug 1102703 - Extend internal interfaces to sync with android lollipop and bluez 5.26 (handsfree). r=btian, r=tzimmermann 2015-01-08 11:46:43 +08:00
Bruce Sun
08634bb129 Bug 1102703 - Extend internal interfaces to sync with android lollipop and bluez 5.26 (a2dp). r=shawnjohnjr 2015-01-08 11:46:10 +08:00
Bruce Sun
4ae7d4780a Bug 1102703 - Extend internal interfaces to sync with android lollipop and bluez 5.26 (core). r=btian, f=tzimmermann 2015-01-08 11:44:49 +08:00
Szu-Yu Chen [:aknow]
741ad71bdd Bug 1115603 - Part 4: Use nsITelephonyCallInfo for call data (bluetooth). r=btian 2015-01-08 16:33:51 +08:00
Bruce Sun
6d031a026a Bug 1102703: (9/10) Porting bluetooth interface of bluez 5.26 (handsfree) r=btian, f=tzimmermann 2015-01-09 13:39:27 +08:00
Bruce Sun
c50c4aedc4 Bug 1102703: (8/10) Porting bluetooth interface of bluez 5.26 (a2dp) r=btian, f=tzimmermann 2015-01-09 13:38:53 +08:00
Bruce Sun
04614aebb8 Bug 1102703: (7/10) Porting bluetooth interface of bluez 5.26 (core) r=btian, f=tzimmermann 2015-01-09 13:38:15 +08:00
Bruce Sun
050b6a1922 Bug 1102703: (6/10) Porting bluetooth interface of android lollipop (handsfree) r=shawnjohnjr, r=btian, r=tzimmermann 2015-01-09 13:37:40 +08:00
Bruce Sun
bc9200ec52 Bug 1102703: (5/10) Porting bluetooth interface of android lollipop (a2dp) r=shawnjohnjr 2015-01-09 13:37:05 +08:00