Commit Graph

300 Commits

Author SHA1 Message Date
Ben Tian
5da78bd2e7 Bug 1128383 - [bluetooth2] Add adapter.onpairingaborted event handler, f=jocelyn, f=jaliu, r=shuang, r=bz 2015-03-06 11:55:30 +08:00
Jocelyn Liu
b75b4537a5 Bug 1139298: Replace type int with BluetoothGattStatus enum for GATT client callbacks. r=btian 2015-03-06 17:21:00 +08:00
Jamin Liu
cc81a56c8e Bug 1128441 - [BlueDroid] Set Bluetooth discoverable timeout properly in 'Convert' function of Bluetooth interface. r=shuang 2015-03-05 13:32:23 +08:00
Jamin Liu
996b0d8487 Bug 1127665 - Fix the condition of if-statement of name updating when the Bluetoooth device paired. r=btian 2015-03-04 18:34:55 +08:00
Ben Tian
5fe3ca8090 Bug 1137103 - Simplify Bluetooth signal distribution function, r=shuang 2015-03-04 09:28:32 +08:00
Jamin Liu
06869fb1cd Bug 1127665 - Append name of paired device to 'DevicePaired' and 'PropertyChanged' BT signal. r=btian 2015-03-03 17:13:12 +08:00
Ben Tian
961d655e4f Bug 1133655 - Replace |DispatchBluetoothReply| with |DispatchReplySuccess| and |DispatchReplyError|, f=jocelyn, f=jaliu, r=shuang 2015-03-03 13:24:49 +08:00
Ben Tian
260b3cf671 Bug 1137601 - Fire onadapterremoved before onattributechanged in BluetoothManager, f=jocelyn, r=shuang 2015-02-27 15:32:30 +08:00
Ben Tian
1a747e8c9a Bug 1137579 - [bluetooth2] Replace constant with |sizeof| in |StringToUuid| function, r=shuang 2015-03-02 12:05:15 +08:00
Jocelyn Liu
49add0c522 Bug 1127670 - Replace device property of BluetoothPairingEvent with device name. r=btian, r=bz 2015-02-24 22:33:00 +01:00
Jocelyn Liu
0e3d4a257a Bug 1132330 - Reject pair/unpair promise if operation failed. r=btian 2015-02-16 22:38:00 -05:00
Jocelyn Liu
3699cd017e Bug 1063449 - Add and implement GATT client connection related bluetooth Web APIs. r=btian, r=bz
This patch mainly covers:
  1) Implement register/unregister client, connect/disconnect methods in BluetoothGatt object.
  2) Add/Modify related webidls for 1).
  3) Implement result handlers, notifications in BluetoothGattManager.
2015-02-13 17:13:00 +01:00
Thomas Zimmermann
0794d15765 Bug 1126720: Implement Bluetooth backend selection; use Bluedroid by default (under bluetooth2/), r=btian
This patch adds proper selection of the Bluetooth backend. The backend
is configurable via environment property 'ro.moz.bluetooth.backend'. The
default value is still Bluedroid.

On systems that are not Android 4.2 or later, the code does not return
a backend. These systems should use BlueZ instead.

This patch is based on bug 1065336, patch [01] and bug 1124565,
patch [01]. It also contains an extra fix in 'moz.build' to set
the pre-processor constant 'MOZ_B2G_BT_DAEMON'.
2015-02-12 10:12:07 +01:00
Thomas Zimmermann
7e3ef88592 Bug 1126720: Support random postfix for Bluetooth daemon socket name (under bluetooth2/), 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.

This patch is based on bug 1119746, patch [05].
2015-02-12 10:12:07 +01:00
Thomas Zimmermann
4e8313a1a9 Bug 1126720: Listen for socket connections when starting Bluetooth (under bluetooth2/), 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.

This patch is based on bug 1119746, patch [04].
2015-02-12 10:12:07 +01:00
Thomas Zimmermann
53a7df99fb Bug 1126720: Fix ref-counting of bluetoothd channels (under bluetooth2/), r=btian
The class |BluetoothDaemonChannel| for the bluetoothd channels
supports reference counting. This patch fixes the respective
variable to use |nsRefPtr| instead of |nsAutoPtr|.

This patch is based on bug 1119746, patch [03]
2015-02-12 10:12:07 +01:00
Thomas Zimmermann
06f8c062df Bug 1126720: Use |int32_t| for |Channel| in Bluetooth Socket HAL (under bluetooth2/), r=btian
This patch is based on bug 1129257.
2015-02-04 17:21:50 +08:00
Thomas Zimmermann
4618900c42 Bug 1126720: Handle all used type in PDU explicitly (under bluetooth2/), r=btian
This patch is based on bug 1129846.
2015-02-05 15:35:57 +08:00
Thomas Zimmermann
cf43ba6043 Bug 1131653: Move GATT helper classes to BluetoothGattManager namespace, r=btian
Another patch to fix conflicting symbol names in the Bluetooth namespace.
2015-02-11 10:24:10 +01:00
Thomas Zimmermann
bf8befcfda Bug 1131653: Move OPP helper classes into BluetoothOppManager namespace, r=btian
This will resolve possible naming collisions between equally named
classes in the Bluetooth namespace.
2015-02-11 10:24:09 +01:00
Thomas Zimmermann
eb6f111302 Bug 1131653: Move A2DP/AVRCP helper classes into BluetoothA2dpManager namespace, r=btian
As for Handsfree helpers, A2DP and AVRCP helpers might create naming
conflicts with other classes. Moving them into |BluetoothA2dpManager|'s
namespace resolves this problem.
2015-02-11 10:24:09 +01:00
Thomas Zimmermann
08013e1685 Bug 1131653: Move Handsfree helper classes into BluetoothHandsfreeManager namespace, r=btian
There are several equal-named, but different, classes in the Bluetooth
namespace. The linker will pick only one of them, which leads to crashes
in the compiled program.
2015-02-11 10:24:09 +01:00
Thomas Zimmermann
598e816dac Bug 1123077: Protect PROPERTY_REMOTE_VERSION_INFO by ANDROID_VERSION, r=shuang 2015-02-03 12:26:56 +01:00
Ben Tian
cbfa0680c1 Bug 1128797 - [bluetooth2] Fix build break on emulators, r=shuang 2015-02-03 12:02:07 +08:00
Ben Tian
735ff698ae Bug 1106017 - Patch 2/2: Merge BluetoothUtils.{cpp,h}, r=tzimmermann
--HG--
rename : dom/bluetooth2/bluedroid/BluetoothUtils.cpp => dom/bluetooth2/BluetoothUtils.cpp
rename : dom/bluetooth2/bluedroid/BluetoothUtils.h => dom/bluetooth2/BluetoothUtils.h
2015-02-03 10:06:53 +08:00
Ben Tian
916c6d6082 Bug 1106017 - Patch 1/2: Cleanup non-shared functions in BlueZ' BluetoothUtils.{cpp,h}, r=tzimmermann 2015-02-02 12:03:11 +08:00
Thomas Zimmermann
9bc5a09785 Bug 1118693: Added AVRCP support for Bluetooth daemon backend (bluetooth2/), r=btian 2015-01-30 10:05:48 +01:00
Thomas Zimmermann
955eee0258 Bug 1118693: Added Bluetooth AVRCP interface (under bluetooth2/), r=btian 2015-01-30 10:05:48 +01:00
Thomas Zimmermann
73313a3e5b Bug 1118693: Add Bluetooth AVRCP module (under bluetooth2/), r=btian 2015-01-30 10:05:48 +01:00
Thomas Zimmermann
85c2a5f09c Bug 1118693: Add Bluetooth AVRCP helpers (under bluetooth2/), r=btian 2015-01-30 10:05:48 +01:00
Jamin Liu
b3d473ae6c Bug 1121404 - Cache addresses of bonded devices and notify adapter properly. r=btian 2015-01-29 15:49:53 +08:00
Jocelyn Liu
21b482a25c Bug 1126151 - Fix build break resulting from bug 1125356. r=shuang 2015-01-26 22:28:00 -05:00
Thomas Zimmermann
d6470b014d Bug 1110049: Add Blueooth A2DP support when using daemon backend (under bluetooth2/), r=btian 2015-01-26 18:39:09 +01:00
Thomas Zimmermann
3f5a55d240 Bug 1110049: Added Blueooth A2DP interface for daemon backend (under bluetooth2/), r=btian 2015-01-26 18:39:09 +01:00
Thomas Zimmermann
0982422915 Bug 1110049: Added Bluetooth A2DP module for daemon backend (under bluetooth2/), r=btian 2015-01-26 18:39:08 +01:00
Thomas Zimmermann
7d536f9852 Bug 1110049: Add Bluetooth A2DP helpers (under bluetooth2/), r=btian 2015-01-26 18:39:08 +01:00
Tom Schuster
8875fc0ed6 Bug 1125356 - Use JS_NewPlainObject in the browser. r=bz 2015-01-24 16:38:08 +01:00
Carsten "Tomcat" Book
4eedb12bdb merge b2g-inbound to mozilla-central a=merge 2015-01-20 12:12:12 +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
Jamin Liu
1f883b28e2 Bug 1119734 - Delay registering Bluetooth signal handler if pairing event handlers haven't been attached. r=btian 2015-01-20 09:52:41 +08:00
Ben Tian
fc207ea543 Bug 1121334 - [bluetooth2] Append device name to BluetoothDevice in BluetoothPairingEvent, r=shuang, f=jaliu 2015-01-16 10:53:55 +08:00
Ms2ger
230617c722 Bug 914067 - Remove JSVAL_VOID from dom/; r=jst 2015-01-14 08:59:06 +01:00
Jamin Liu
cedf015916 Bug 1120774 - Include a header file for nsITelephonyCallInfo in bluetooth2/BluetoothRilListener.h. r=btian 2015-01-13 15:05:32 +08:00
Masatoshi Kimura
f70d08c5aa Bug 1120062 - Part 1: Remove most Nullptr.h includes. r=waldo 2015-01-11 11:34:52 +09: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
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
Giovanny Andres Gongora Granada
4488413a43 Bug 1116371 - Correct #endif comment in BluetoothMessageUtils.h, r=btian 2015-01-08 14:43:10 +08: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
Edgar Chen
3e0b27eed9 Bug 1087847 - Make sure the Icc status in MobileConnection and IccManager are synced. r=hsinyi,smaug 2014-11-13 19:12:11 +08:00