Commit Graph

1198 Commits

Author SHA1 Message Date
Thomas Zimmermann
c573acfdb6 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
1c3015e7f7 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
33620bd78f 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
1c5be347b9 Bug 1118177 - Release file resources if users unexpectedly remove SD card. r=btian 2015-02-13 02:59:00 -05:00
Thomas Zimmermann
27230811db 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
14fc23fc4c Bug 1129846 - Handle all used type in PDU explicitly. r=tzimmermann 2015-02-05 15:35:57 +08:00
Bruce Sun
7095bb1908 Bug 1129257 - Use |int32_t| for |Channel| in Bluetooth Socket HAL. r=tzimmermann 2015-02-04 17:21:50 +08:00
Thomas Zimmermann
598e816dac Bug 1123077: Protect PROPERTY_REMOTE_VERSION_INFO by ANDROID_VERSION, r=shuang 2015-02-03 12:26:56 +01:00
Bruce Sun
f6c59b58e0 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
8875fc0ed6 Bug 1125356 - Use JS_NewPlainObject in the browser. r=bz 2015-01-24 16:38:08 +01:00
Thomas Zimmermann
4a00715925 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
35ab7fc33b Merge mozilla-central to b2g-inbound 2015-01-20 13:23:50 +01:00
Carsten "Tomcat" Book
4eedb12bdb merge b2g-inbound to mozilla-central a=merge 2015-01-20 12:12:12 +01:00
Thomas Zimmermann
78fac53b18 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
b03aa682f8 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
ee862b25f8 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
e9656fbfb0 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
fcc2137c6d 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
f57b3e7929 Bug 1121930: Sync Bluetooth daemon protocol with BlueZ 5.27, r=shuang 2015-01-15 19:44:02 +08:00
Ms2ger
230617c722 Bug 914067 - Remove JSVAL_VOID from dom/; r=jst 2015-01-14 08:59:06 +01:00
Masatoshi Kimura
f70d08c5aa Bug 1120062 - Part 1: Remove most Nullptr.h includes. r=waldo 2015-01-11 11:34:52 +09:00
Carsten "Tomcat" Book
6e440d02fe Merge mozilla-central to mozilla-inbound 2015-01-09 15:26:58 +01:00
Ben Tian
a035b9d1d1 Bug 1118163 - Restore received file for small size (1-packet) file, r=shuang 2015-01-08 18:11:37 +08:00
Ryan VanderMeulen
c200388252 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
7ef81a6baa Bug 1102703 - Porting bluetooth interface of bluez 5.26 (handsfree). r=btian, f=tzimmermann 2015-01-08 11:50:21 +08:00
Bruce Sun
556b70a0b3 Bug 1102703 - Porting bluetooth interface of bluez 5.26 (a2dp). r=btian, f=tzimmermann 2015-01-08 11:49:49 +08:00
Bruce Sun
50e8d1f50d Bug 1102703 - Porting bluetooth interface of bluez 5.26 (core). r=btian, f=tzimmermann 2015-01-08 11:49:17 +08:00
Bruce Sun
b5d7cc651d 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
d5ac971d56 Bug 1102703 - Porting bluetooth interface of android lollipop (a2dp). r=shawnjohnjr 2015-01-08 11:47:42 +08:00
Bruce Sun
88cbb3859c 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
0386176808 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
e44f886222 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
11a23df117 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]
e1fb36b3ca Bug 1115603 - Part 4: Use nsITelephonyCallInfo for call data (bluetooth). r=btian 2015-01-08 16:33:51 +08:00
Bruce Sun
9682d53074 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
0b8236445d 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
8a6305822c 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
f3c50557d9 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
b29ab61868 Bug 1102703: (5/10) Porting bluetooth interface of android lollipop (a2dp) r=shawnjohnjr 2015-01-09 13:37:05 +08:00
Bruce Sun
77bd5a12ba Bug 1102703: (4/10) Porting bluetooth interface of android lollipop (core) r=btian, r=tzimmermann, r=shawnjohnjr 2015-01-09 13:36:32 +08:00
Bruce Sun
ef3297f96e Bug 1102703: (3/10) Extend internal interfaces to sync with android lollipop and bluez 5.26 (handsfree) r=btian, r=tzimmermann 2015-01-09 13:35:01 +08:00
Bruce Sun
2790c513b6 Bug 1102703: (2/10) Extend internal interfaces to sync with android lollipop and bluez 5.26 (a2dp) r=shawnjohnjr 2015-01-09 13:34:28 +08:00
Bruce Sun
93e542d46b Bug 1102703: (1/10) Extend internal interfaces to sync with android lollipop and bluez 5.26 (core) r=btian, f=tzimmermann 2015-01-09 13:33:53 +08:00
Giovanny Andres Gongora Granada
4488413a43 Bug 1116371 - Correct #endif comment in BluetoothMessageUtils.h, r=btian 2015-01-08 14:43:10 +08:00
Thomas Zimmermann
124ef763fd Bug 1095488: Added AVRCP support for Bluetooth daemon backend, r=shuang 2015-01-07 11:32:06 +01:00
Thomas Zimmermann
a8732066cf Bug 1095488: Added Bluetooth AVRCP interface, r=shuang 2015-01-07 11:32:05 +01:00
Thomas Zimmermann
e15bcd35ac Bug 1095488: Add Bluetooth AVRCP module, r=shuang 2015-01-07 11:32:05 +01:00
Thomas Zimmermann
3b4945b7f8 Bug 1095488: Add Bluetooth AVRCP helpers, r=shuang 2015-01-07 11:32:05 +01:00
Dave Huseby
92bef33f19 Bug 1107681 - fix up the dom uses of WrapptedJSToDictionary to use the cx-less interface. r=bholley 2014-12-29 11:56:00 +01:00
Jamin Liu
37980cbb30 Bug 1088527 - Modify BluetoothOppManager.IsConnected to indicate whether profile is connected or not. r=btian
BluetoothOppManager.IsConnected() couldn't represent the connection status
of Opp profile since it only return true if there is an ongoing
file-transfer session.

This function was used to named |IsTransferring()| in Bug 827267, however,
it was renamed to |IsConnected()| when Bug 842948 landed.
2014-12-26 16:58:11 +08:00