Commit Graph

1403 Commits

Author SHA1 Message Date
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
Andrea Marchesini
eed309c59a Bug 1156632 - Remove unused forward class declarations - patch 3 - dom/{events,xbl,xslt,xul} and others, r=ehsan 2015-04-22 08:29:18 +02:00
Andrea Marchesini
b212600c95 Bug 1148527 - Indentation fix after bug 1145631, r=ehsan 2015-03-27 18:52:19 +00: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
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
Ben Hsu
ac73adeb79 Bug 1070831 - Part 6: Clean up BluetoothRilListener. r=btian 2014-12-21 17:37:00 +01:00
Botond Ballo
b08ca88b2a Bug 1073081 - Fix -Wsign-compare and -Wsign-conversion warnings. r=ehsan
--HG--
extra : source : 88c58a8cc276a4691ed23fd8b8f2f6c0713b50fd
2014-11-24 19:54:33 -05:00
Botond Ballo
d13f39481d Bug 1073081 - Fix -Wdelete-non-virtual-dtor warnings by marking some classes as MOZ_FINAL. r=ehsan
--HG--
extra : source : 7a909c534cf723b252ea5b0a225a6656399b5b2e
2014-11-24 18:38:23 -05:00
Thomas Zimmermann
e4253f6262 Bug 1095487: Add Blueooth A2DP support when using daemon backend, r=shuang 2014-12-11 10:53:14 +01:00
Thomas Zimmermann
62ce5d9ed8 Bug 1095487: Added Blueooth A2DP interface for daemon backend, r=shuang 2014-12-11 10:53:14 +01:00
Thomas Zimmermann
3976193d63 Bug 1095487: Added Bluetooth A2DP module for daemon backend, r=shuang 2014-12-11 10:53:14 +01:00
Thomas Zimmermann
eac431fc55 Bug 1095487: Add Bluetooth A2DP helpers, r=shuang 2014-12-11 10:53:14 +01:00
Wes Kocher
c659ea6bce Backed out changeset bf25101e66cf (bug 1095098) for build bustage 2014-12-08 16:27:12 -08:00
Denis Volk
c3639f1324 Bug 1095098: move do_QueryObject templates into their own header r=froydnj 2014-11-20 12:20:10 +01:00
Thomas Zimmermann
dd11d3edf8 Bug 1105308: Merge BluetoothUtils.{cpp,h}, r=btian
This patch merges BluetoothUtils.{cpp,h} from BlueZ and Bluedroid
backends. The resulting files of the same name are located in the
generic code's directory.

This change requires a rebuild of dependency information, so the
patch touches CLOBBER as well.

--HG--
rename : dom/bluetooth/bluedroid/BluetoothUtils.cpp => dom/bluetooth/BluetoothUtils.cpp
rename : dom/bluetooth/bluedroid/BluetoothUtils.h => dom/bluetooth/BluetoothUtils.h
2014-11-28 11:49:40 +01:00
Thomas Zimmermann
ef1c3c8ad7 Bug 1105308: Cleanup non-shared functions in Bluedroid's BluetoothUtils.{cpp,h}, r=btian
This patch moves functions out of Bluedroid's BluetoothUtils.{cpp,h}
that are specific to this backend.
2014-11-28 11:49:40 +01:00
Thomas Zimmermann
ecb1ee7b47 Bug 1105308: Cleanup non-shared functions in BlueZ' BluetoothUtils.{cpp,h}, r=btian
This patch moves functions out of BlueZ' BluetoothUtils.{cpp,h} that
are specific to this backend.
2014-11-28 11:49:40 +01:00
Thomas Zimmermann
9a0155a3e6 Bug 1091588: Support Handsfree profile when using Bluetooth daemon, r=shuang 2014-11-24 09:02:52 +01:00
Thomas Zimmermann
1678f35431 Bug 1091588: Add Handsfree interface for Bluetooth daemon, r=shuang 2014-11-24 09:02:42 +01:00
Thomas Zimmermann
da63722899 Bug 1091588: Add Handsfree module for Bluetooth daemon, r=shuang 2014-11-24 09:02:31 +01:00
Thomas Zimmermann
8cca4e6d6b Bug 1091588: Add helpers for Bluetooth daemon Handsfree support, r=shuang
This patch adds helpers for packing, unpacking and converting
Handsfree values to and from Bluetooth PDUs.
2014-11-24 09:02:03 +01:00
Thomas Zimmermann
9e649d1454 Bug 1100883: Cleanup |BluetoothServiceBluedroid::AdapterStateChangedNotification|, r=btian
This patch replaces |ToggleBtAck| with |AcknowledgeToggleBt| in
|BluetoothServiceBluedroid::AdapterStateChangedNotification| and
cleans up the remaining runnables used by this method.

All runnables need to be handled in the same patch, because the
order of operation must not be changed.
2014-11-20 11:06:01 +01:00
Thomas Zimmermann
06597ca4e6 Bug 1100883: Replace most instances of |ToggleBtAck| with calls to |AcknowledgeToggleBt|, r=btian
|AcknowledgeToggleBt| completes a Bluetooth start or stop operation
in the context of |BluetoothService|; That was done by |ToggleBtAck|
before.

This patch replaces |ToggleBtAck| with calls to |AcknowledgeToggleBt|
in |BluetoothServiceBluedroid| for all the trivial cases.
2014-11-20 11:06:01 +01:00
Thomas Zimmermann
8503ec5fb1 Bug 1100883: Move |ToggleBtAck| into |BluetoothService|, r=btian
|ToggleBtAck| completes a start of stop operation on the main thread.

This patch moves the runnable's functionality into |BluetoothService|
and makes it available for methods running on the main thread.
2014-11-20 11:06:00 +01:00
Thomas Zimmermann
7a0b40d119 Bug 1100883: Move helpers of |BluetoothServiceBluedroid| into its namespace, r=btian 2014-11-20 11:06:00 +01:00
Wes Kocher
6fd66905f8 Backed out 2 changesets (bug 1159401) for b2g build bustage
Backed out changeset adfee1efb1e1 (bug 1159401)
Backed out changeset 70c63c8546e3 (bug 1159401)
2015-05-11 14:54:02 -07:00
Shawn Huang
9bce597139 Bug 1096194 - Responding Enhanced call control with ERROR if enhanced call control is not supported, r=btian 2014-11-12 11:15:21 +08:00
Bruce Sun
ddaada31b2 Bug 1079649: Use a temporary (.part) file to store incoming file. (bluetooth/bluedroid) r=btian 2014-11-10 18:53:21 +08:00
Bruce Sun
37790ff4d6 Bug 1079649: Use a temporary (.part) file to store incoming file. (bluetooth/bluez) r=btian 2014-11-10 18:55:11 +08:00
Thomas Zimmermann
b9631a0fc1 Bug 1091577: Remove unused helpers from daemon backend, r=shawnjohnjr
This patch removes unused unpack functions, notification and
interface runnables from Bluetooth's daemon backend.
2014-11-05 15:43:07 +01:00
Thomas Zimmermann
56c5acdcbe Bug 1091577: Use general-purpose result runnable in Bluetooth daemon backend, r=shawnjohnjr
This patch converts all interface runnables in Bluetooth's daemon
backend by generic result runnables. Init operator classes replace
unpack functions. Init operator classes will warn about unused data
at the end of a PDU.
2014-11-05 15:43:07 +01:00
Thomas Zimmermann
13bf77b754 Bug 1091577: Use general-purpose notification runnable in Bluetooth daemon backend, r=shawnjohnjr
This patch converts all notification runnables in Bluetooth's daemon
backend to use the generic implementation. Unpack functions are replaced
by init operator classes. The init operator classes also validate the
complete unpacking of a PDU and warn about unused trailing data.
2014-11-05 15:43:07 +01:00
Thomas Zimmermann
9ff9ad0858 Bug 1091577: Added general-purpose notification runnables for Bluetooth, r=shawnjohnjr
A backend notification runnable in Bluetooth is used to transfer
a notification from the I/O thread to the main thread; an interface
runnable transfers and executes a result handler. Both are currently
implemented by the Bluetooth backends.

This patch adds new runnables that are independend from any backend
code or data structures.
2014-11-05 15:43:06 +01:00
Thomas Zimmermann
6468899871 Bug 1073548: Add support for Bluetooth daemon backend, r=shawnjohnjr 2014-11-03 13:03:49 +01:00
Thomas Zimmermann
ec0366c800 Bug 1073548: Implement Socket module for Bluetooth daemon, r=shawnjohnjr
This patch adds support for the Bluetooth daemon's Socket module,
which provides OPP functionality.
2014-11-03 13:03:49 +01:00
Thomas Zimmermann
95225c6e54 Bug 1073548: Implement Bluetooth Core module for Bluetooth daemon, r=shawnjohnjr
This patch adds support for the Bluetooth daemon's Core module. It
provides the basic Bluetooth functionality, such as searching and
pairing with devices, and accessing device properties.
2014-11-03 13:03:49 +01:00
Thomas Zimmermann
7e6e19a81c Bug 1073548: Add core interfaces and Setup module for Bluetooth daemon, r=shawnjohnjr
This patch adds the core interfaces and the Setup module for
the Bluetooth Daemon. The Setup module implements commands
for enabling and disabling Bluetooth profiles in the daemon.
2014-11-03 13:03:49 +01:00
Thomas Zimmermann
2a5770563c Bug 1073548: Support Bluetooth daemon in build system, r=mh+mozilla 2014-11-03 13:03:48 +01:00
Thomas Zimmermann
fc93a4217f Bug 1084342: Copy received ancillary data into |SocketMessageWatcher|, r=shawnjohnjr
The cast-and-assign pattern for retrieving file descriptors is prone to
SIGBUS signals on platforms that don't support unaligned memory access.
This patch fixes the problem by copying the received data directly.
2014-10-28 10:34:29 +01:00
Thomas Zimmermann
63ed471690 Bug 1084342: Fix receive buffer size in |SocketMessageWatcher|, r=shawnjohnjr
|SocketMessageWatcher| currently allocates a large amount of memory
for holding ancillary data. The only actually transfered value is a
file descriptor. This patch fixes the buffer size accordingly.
2014-10-28 10:34:18 +01:00
Thomas Zimmermann
889bfc527b Bug 1084342: Move |SocketMessageWatcher| to separate file, r=shawnjohnjr
This patch moves |SocketMessageWatcher| into a separate file. The new
Bluetooth daemon will require it's functionality for OPP profiles.
2014-10-28 10:34:09 +01:00
Edgar Chen
a5d4452b52 Bug 1083843 - [MobileConnection] Deprecate CFStateChangeEvent.success. r=hsinyi,smaug,btian 2014-10-23 22:13:35 +08:00
Ryan VanderMeulen
a8384fd2d1 Merge b2g-inbound to m-c. a=merge 2014-10-22 16:03:57 -04:00
Jamin Liu
5b97ce2989 Bug 1069868 - Set Bluetooth property |discoverable| to |false| after Bluetooth enabled. r=shuang
Bluetooth scan mode is BT_SCAN_MODE_CONNECTABLE by default, it means it
should be connectable and non-discoverable.
2014-10-21 01:27:00 -04:00
Thomas Zimmermann
7bf2af4097 Bug 1083092: Data parameter for |mozilla::ipc::SocketIOSendTask| template, r=shawnjohnjr
The data class in |SocketIOSendTask| is now a template parameter, instead
of being hard-coded to |UnixSocketRawData|. The patch also adds soem minor
cleanups to the file.
2014-10-21 10:52:12 +02:00
Thomas Zimmermann
e86ec92e48 Bug 1083092: Introduce |mozilla::ipc::SocketBase|, r=shawnjohnjr
The new class |SocketBase| contains the notification mechanism of
|SocketConsumerBase|. The latter still contains I/O methods.
2014-10-21 10:52:11 +02:00
Jessica Jong
9c3f930c69 Bug 1052842 - Part 4: Use enums for NetworkSelectionMode in nsIMobileConnectionService.idl (bt). r=btian 2014-10-21 14:31:48 +08:00
Wes Kocher
bd38db8ecd Merge inbound to m-c a=merge 2014-10-20 18:56:56 -07:00
Thomas Zimmermann
91f913f386 Bug 1074419: Close received socket file descriptors on errors, r=shawnjohnjr 2014-10-01 10:50:33 +02:00
Thomas Zimmermann
2f93b9ab01 Bug 1083708: Handle non-existant Bluetooth profile interfaces correctly, r=shawnjohnjr
Bluetooth profile managers just return an error if a profile interface is
not available. Doing so breaks the initialization and cleanup routines. This
patch changes the profile managers to still report an error, but signal
progress to the given result runnable.
2014-10-16 16:40:49 +02:00
Thomas Zimmermann
98dcec15d2 Bug 1081981: Fix Out-of-bounds read when decoding BT properties, r=shawnjohnjr
Bluetooth's RSSI property is encoded as pointer to a signed 8-bit
value. Gecko currently interprets this as pointer to a 32-bit
value; so the result of dereferencing the pointer is undefined.

This patch fixes the bug by interpreting the RSSI property correctly.
2014-10-15 11:38:06 +02:00
Ehsan Akhgari
6f121f0e2d Bug 1084389 - Do not wrap the DOMRequest in a promise in Bluetooth tests; r=echou
DOMRequest now has a .then() method compatible with Promise.
2014-10-20 09:08:33 -04:00
Boris Zbarsky
d4b3d66986 Bug 1019191 part 15. Remove now-dead DOMCI_DATA bits. r=peterv 2014-10-22 11:40:49 -04:00
Jamin Liu
792cc3241e Bug 1052304 - Notify OPP manager when Bluetooth socket message error occurs. r=btian 2014-10-09 17:54:38 +08:00
Andrea Marchesini
2f672ff2db Bug 1047483 - patch 3 - Renaming DOMFile to File, r=ehsan
--HG--
rename : content/base/public/nsDOMFile.h => content/base/public/File.h
rename : content/base/src/nsDOMFile.cpp => content/base/src/File.cpp
2014-10-08 17:15:23 +01:00
Andrea Marchesini
2ca496756f Bug 1047483 - patch 1 - Porting DOMFile/DOMBlob to WebIDL, r=bz, r=bkelly, r=bholley 2014-10-08 17:15:22 +01:00
Ryan VanderMeulen
e1c00f7ca3 Merge inbound to m-c. a=merge 2014-10-07 16:00:48 -04:00
Ryan VanderMeulen
671d1a817e Backed out 7 changesets (bug 1047483, bug 1079301, bug 1079335) for webplatform test failures.
Backed out changeset 7d06b68c44d0 (bug 1079335)
Backed out changeset 92030169528e (bug 1079301)
Backed out changeset c09d7f95554a (bug 1047483)
Backed out changeset c199f1057d7e (bug 1047483)
Backed out changeset 18830d07884c (bug 1047483)
Backed out changeset e087289ccfbb (bug 1047483)
Backed out changeset 6238ff5d3ed0 (bug 1047483)

CLOSED TREE

--HG--
rename : content/base/public/File.h => content/base/public/nsDOMFile.h
rename : content/base/src/MultipartFileImpl.cpp => content/base/src/nsDOMBlobBuilder.cpp
rename : content/base/src/MultipartFileImpl.h => content/base/src/nsDOMBlobBuilder.h
rename : content/base/src/File.cpp => content/base/src/nsDOMFile.cpp
2014-10-07 13:16:11 -04:00
Andrea Marchesini
e4f682ba94 Bug 1047483 - patch 3 - Renaming DOMFile to File, r=ehsan
--HG--
rename : content/base/public/nsDOMFile.h => content/base/public/File.h
rename : content/base/src/nsDOMFile.cpp => content/base/src/File.cpp
2014-10-07 15:20:55 +01:00
Andrea Marchesini
0e29ce2ea6 Bug 1047483 - patch 1 - Porting DOMFile/DOMBlob to WebIDL, r=bz, r=bkelly, r=bholley 2014-10-07 15:20:52 +01:00
Thomas Zimmermann
9a53faf52f Bug 1065999: Ignore unknown Bluetooth properties, r=shuang
This patch is a workaround for unknown Bluetooth properties. Instead of
failing completely, we simply ignore them.
2014-09-29 11:41:02 +02:00
Jocelyn Liu
fdbd85cff6 Bug 1072802: Use nsRefPtr to avoid ReplyRunnable being released during IPC process. r=tzimmermann 2014-10-07 16:46:05 +08:00
Edgar Chen
352b86961b Bug 994461 - Part 3: BT changes for IccInfo WebIDL. r=echou 2014-09-15 23:14:49 +08:00
Bobby Holley
06a2906a38 Bug 1065185 - Stop using Promise.jsm over SpecialPowers in marionette tests. r=bz 2014-10-03 10:05:50 +02:00
Peter Van der Beken
bd58cd5aea Bug 1078744 - Replace SetIsDOMBinding with SetIsNonDOMBinding, remove some IsDOMBinding asserts. r=bz.
--HG--
extra : rebase_source : 74569bd08dbc0d6755ac45999cfe99725ef6bc0a
2014-10-07 11:44:49 +02:00
Ben Turner
141df104d6 Bug 994190 - 'Modify main-thread IndexedDB to use PBackground', r=khuey. 2014-09-26 16:21:57 -07:00
Ryan VanderMeulen
4cf7455ce4 Merge inbound to m-c. a=merge 2014-09-25 16:46:51 -04:00
Ben Tian
515bb0d108 Bug 1063066 - [Flame][KK] Bluetooth transfer does not work in Gallery App. r=tzimmermann 2014-09-25 18:35:54 +08:00
Shawn Huang
dd9710fd73 Bug 1062697 - Initialize avrcp play status using the proper value, disable AvRCP 1.5. r=btian 2014-09-24 03:36:00 -04:00
Mike Habicher
03a030b03e Bug 1053966 - move mozsettings-changed Observer info from aSubject to aData, r=bz,qDot 2014-09-16 13:15:16 -04:00
Kyle Machulis
d96f78bec4 Bug 1069115 - Make bluetooth webapi marionette tests wait for transaction success when changing settings; r=echou
--HG--
extra : rebase_source : c4fdc80f904987c848bca4b839d8b3f36fefd667
2014-09-22 16:15:07 -07:00
Kartikaya Gupta
97022d597d Bug 1068872 - Fix nullptr dereferencing. r=echou 2014-09-18 07:00:00 -04:00
Vicamo Yang
8596a24d53 Bug 1063304 - 3.c/3: accommodate other components. r=echen 2014-09-21 15:24:43 +08:00
Ben Turner
26edfb8667 Backout bug 994190 and merge over some stuff that landed afterwards on a CLOSED TREE. 2014-09-17 19:36:01 -04:00
Carsten "Tomcat" Book
f39f940858 Backed out changeset 9ff2889f236a (bug 1063304) 2014-09-17 13:13:08 +02:00
Ryan VanderMeulen
4ddd261546 Backed out changeset ed586ca080c0 (bug 1053966) for the same Mnw permafails it was backed out for previously. 2014-09-16 16:54:25 -04:00
Kyle Machulis
a0b65dd166 Bug 1068077 - Remove explicit navigation to system app from bluetooth marionette webapi tests. r=mdas 2014-09-16 09:15:31 -07:00
Mike Habicher
a4981f12d6 Bug 1053966 - move mozsettings-changed Observer info from aSubject to aData, r=bz,qDot 2014-09-16 13:15:16 -04:00
Vicamo Yang
13e05f3696 Bug 1063304 - 3.c/3: accommodate other components. r=echen 2014-09-16 21:20:18 +08:00
Eric Chou
b469c54445 Bug 1067206 - Fire DOM request even when Bluetooth pairing failed, f=jaliu, r=shuang 2014-09-16 13:14:01 +08:00
Ben Turner
b3c31c0c49 Bug 994190 - 'Modify main-thread IndexedDB to use PBackground', r=khuey.
--HG--
rename : dom/indexedDB/ipc/SerializationHelpers.h => dom/indexedDB/SerializationHelpers.h
rename : dom/indexedDB/ipc/unit/head.js => dom/indexedDB/test/unit/xpcshell-head-child-process.js
rename : dom/indexedDB/test/unit/head.js => dom/indexedDB/test/unit/xpcshell-head-parent-process.js
rename : dom/ipc/Blob.h => dom/ipc/BlobParent.h
rename : dom/ipc/FileDescriptorSetChild.cpp => ipc/glue/FileDescriptorSetChild.cpp
rename : dom/ipc/FileDescriptorSetChild.h => ipc/glue/FileDescriptorSetChild.h
rename : dom/ipc/FileDescriptorSetParent.cpp => ipc/glue/FileDescriptorSetParent.cpp
rename : dom/ipc/FileDescriptorSetParent.h => ipc/glue/FileDescriptorSetParent.h
rename : dom/ipc/PFileDescriptorSet.ipdl => ipc/glue/PFileDescriptorSet.ipdl
2014-09-13 12:12:19 -04:00
Thomas Zimmermann
310e55865c Bug 1061489: Distribute Bluetooth HAL implementation among multiple files, r=shuang
The files BluetoothHALInterface.{cpp,h} are getting too large. This patch
moves helper functions and profile implementations into separate files.
2014-09-11 12:23:02 +02:00
Thomas Zimmermann
b5559181fd Bug 1061489: Move Bluedroid code out of BluetoothInterface.{cpp,h}, r=shuang
This patch moves BluetoothInterface.{cpp,h} to the generic section
of Gecko's Bluetooth code, and the Bluedroid implementation into
the new files BluetoothHalImplementation.{cpp,h}.

BluetoothHalImplementation.{cpp,h} contains all Bluedroid-specific
code. The classes in BluetoothInterface.{cpp,h} are now interfaces
for Gecko.

--HG--
rename : dom/bluetooth/bluedroid/BluetoothInterface.cpp => dom/bluetooth/bluedroid/BluetoothHALInterface.cpp
2014-09-11 12:23:01 +02:00
Carsten "Tomcat" Book
a8756aec4e Backed out changeset 8644a9c4b993 (bug 1061489) for bustage on a CLOSED TREE
--HG--
rename : dom/bluetooth/bluedroid/BluetoothHALInterface.cpp => dom/bluetooth/bluedroid/BluetoothInterface.cpp
2014-09-11 11:11:06 +02:00
Carsten "Tomcat" Book
b75127879c Backed out changeset e2e2e6397253 (bug 1061489) 2014-09-11 11:10:32 +02:00
Thomas Zimmermann
d4daf1d4ea Bug 1061489: Distribute Bluetooth HAL implementation among multiple files, r=shuang
The files BluetoothHALInterface.{cpp,h} are getting too large. This patch
moves helper functions and profile implementations into separate files.
2014-09-11 09:38:13 +02:00
Thomas Zimmermann
42817258a3 Bug 1061489: Move Bluedroid code out of BluetoothInterface.{cpp,h}, r=shuang
This patch moves BluetoothInterface.{cpp,h} to the generic section
of Gecko's Bluetooth code, and the Bluedroid implementation into
the new files BluetoothHalImplementation.{cpp,h}.

BluetoothHalImplementation.{cpp,h} contains all Bluedroid-specific
code. The classes in BluetoothInterface.{cpp,h} are now interfaces
for Gecko.

--HG--
rename : dom/bluetooth/bluedroid/BluetoothInterface.cpp => dom/bluetooth/bluedroid/BluetoothHALInterface.cpp
2014-09-11 09:38:10 +02:00
Ryan VanderMeulen
e63bf097f6 Backed out changeset 661f503ea524 (bug 1053966) for Mnw perma-fail. 2014-09-10 12:36:12 -04:00
Mike Habicher
82f45e99bf Bug 1053966 - pass settings change notices to Observers as aSubject instead of aData, r=bz,qdot 2014-08-25 18:06:31 -04:00
Thomas Zimmermann
05a417c7dc Bug 1059813: Use getter/setter methods of |UnixSocketRawData| in Bluetooth, r=btian 2014-09-08 11:44:02 +02:00
Thomas Zimmermann
cfe17e277b Bug 1062754: Support peer shutdown and EOF in |SocketIOBase|, r=qdot, btian
Calling read on a socket that has been closed for reading by the
peer, read returns 0. The socket is still readable however, so
polling and reading will return constant results of 0 received
bytes.

With this patch, if a socket's peer shuts down reading or if
we reached the EOF, we stop watching the file descriptor for
readability. |SocketIOBase| will detect this case exactly once
and initiate the socket's shutdown.
2014-09-05 10:16:24 +02:00
Ryan VanderMeulen
afa65517bc Backed out 6 changesets (bug 1059813) by request.
Backed out changeset cffeecd46cad (bug 1059813)
Backed out changeset f991f546dbcd (bug 1059813)
Backed out changeset ab4056a1aa06 (bug 1059813)
Backed out changeset d08a91fee65a (bug 1059813)
Backed out changeset 7bd0ecf96e59 (bug 1059813)
Backed out changeset 0b7a62175398 (bug 1059813)
2014-09-03 11:29:16 -04:00
Thomas Zimmermann
d9153472b0 Bug 1059813: Use getter/setter methods of |UnixSocketRawData| in Bluetooth, r=btian 2014-09-03 16:43:14 +02:00
Edgar Chen
61a3c7e57c Bug 843452 - Part 2-2: Bluetooth changes for MobileConnectionService interface. r=echou 2014-07-02 17:14:08 +08:00
Thomas Zimmermann
0ce9195195 Bug 1061126: Cleanup ANDROID_VERSION from BluetoothA2DPManager, r=shuang
All interfaces for Bluetooth profiles are now always available, so we
don't have to check for specific versions of Bluedroid. Instead, we
try to call the methods, and check their results.
2014-09-02 12:46:08 +02:00
Thomas Zimmermann
80cfcd8000 Bug 1061126: Make Bluetooth AVRCP interface generally available, r=shuang
The methods of |BluetoothAVRCPInterface| are now always available. On
Android versions before 18, which don't support AVRCP, they always
fail with STATUS_UNSUPPORTED.
2014-09-02 12:46:07 +02:00
Thomas Zimmermann
eb87169279 Bug 1061126: Fix constants in Bluedroid HFP manager, r=shuang
This patch replaces the remaining Bluedroid constants from Bluedroid's
|BluetoothHfpManager| with Gecko constants.
2014-09-02 12:46:07 +02:00
Thomas Zimmermann
223b3c8c51 Bug 1061126: Add AVRCP_UID_SIZE to Bluetooth, r=shuang
This constant AVRCP_UID_SIZE replaces the corresponding Bluedroid
constant BTRC_UID_SIZE.
2014-09-02 12:46:07 +02:00
Thomas Zimmermann
d905860919 Bug 1061219: Don't protect |ConvertAttributeString| by ANDROID_VERSION, r=shuang
The function |ConvertAttributeString| doesn't depend on the Android
version is is used by generic code in Gecko. Don't protect it by
ANDROID_VERSION.
2014-09-02 12:33:05 +02:00
Thomas Zimmermann
a8c8d063d7 Bug 1061219: Fix string conversion for A2DP connection states, r=shuang
The C++ compiler for Flatfish lacks support for initialized arrays of
C-string pointers. This patch fixes the problem by using a switch
statement for the string conversion of A2DP connection states.
2014-09-02 12:33:05 +02:00
Thomas Zimmermann
6d9eb8bfda Bug 1057337: Cleanup BluetoothA2DPManager and related code, r=shuang
The patch removes unused callbacks and helper runnables from the
Bluedroid implementation of BluetoothA2DPManager. It also removes
the last Bluedroid-specific code from BluetoothUtils.{cpp,h}.
2014-09-01 10:11:54 +02:00
Thomas Zimmermann
e94c49cdb6 Bug 1057337: Integrate helper runnables into A2DP and AVRCP notifications, r=shuang
The helper runnables where necessary to perform certain operations on
the main thread after having received a callback from Bluedroid. The
new notification methods already run on the main thread, so the helper
runnables can be replaced by direct calls.
2014-09-01 10:11:54 +02:00
Thomas Zimmermann
c047d2359d Bug 1057337: Use Bluetooth A2DP and AVRCP notifications, r=shuang
This patch converts Bluetooth's A2DP manager and Bluedroid interface
to use notifications instead of callbacks.
2014-09-01 10:11:54 +02:00
Thomas Zimmermann
9500b07c38 Bug 1057337: Implement Bluetooth A2DP notifications, r=shuang
This patch adds Bluetooth A2DP and AVRCP notifications to Gecko's
A2DP manager. The code has been taken from taken from the callback
implementations, and adapted to run on the main thread. No further
cleanups have been applied.
2014-09-01 10:11:53 +02:00
Thomas Zimmermann
445b23b5e2 Bug 1057337: Add Bluetooth A2DP and AVRCP notifications, r=shuang
This patch adds A2DP and AVRCP notifications and callbacks to
Gecko's Bluedroid interface. Support for AVRCP depends on the
version of the Android base system and is only available on
versions 18, 19 or later.
2014-09-01 10:11:53 +02:00
Birunthan Mohanathas
882fe73908 Bug 1058101 - Flatten dom/network/src/ into parent directory. r=mccr8
--HG--
rename : dom/network/src/Connection.cpp => dom/network/Connection.cpp
rename : dom/network/src/Connection.h => dom/network/Connection.h
rename : dom/network/src/Constants.h => dom/network/Constants.h
rename : dom/network/src/NetUtils.cpp => dom/network/NetUtils.cpp
rename : dom/network/src/NetUtils.h => dom/network/NetUtils.h
rename : dom/network/src/NetworkStatsDB.jsm => dom/network/NetworkStatsDB.jsm
rename : dom/network/src/NetworkStatsManager.js => dom/network/NetworkStatsManager.js
rename : dom/network/src/NetworkStatsManager.manifest => dom/network/NetworkStatsManager.manifest
rename : dom/network/src/NetworkStatsService.jsm => dom/network/NetworkStatsService.jsm
rename : dom/network/src/NetworkStatsServiceProxy.js => dom/network/NetworkStatsServiceProxy.js
rename : dom/network/src/NetworkStatsServiceProxy.manifest => dom/network/NetworkStatsServiceProxy.manifest
rename : dom/network/src/PTCPServerSocket.ipdl => dom/network/PTCPServerSocket.ipdl
rename : dom/network/src/PTCPSocket.ipdl => dom/network/PTCPSocket.ipdl
rename : dom/network/src/PUDPSocket.ipdl => dom/network/PUDPSocket.ipdl
rename : dom/network/src/TCPServerSocket.js => dom/network/TCPServerSocket.js
rename : dom/network/src/TCPServerSocketChild.cpp => dom/network/TCPServerSocketChild.cpp
rename : dom/network/src/TCPServerSocketChild.h => dom/network/TCPServerSocketChild.h
rename : dom/network/src/TCPServerSocketParent.cpp => dom/network/TCPServerSocketParent.cpp
rename : dom/network/src/TCPServerSocketParent.h => dom/network/TCPServerSocketParent.h
rename : dom/network/src/TCPSocket.js => dom/network/TCPSocket.js
rename : dom/network/src/TCPSocket.manifest => dom/network/TCPSocket.manifest
rename : dom/network/src/TCPSocketChild.cpp => dom/network/TCPSocketChild.cpp
rename : dom/network/src/TCPSocketChild.h => dom/network/TCPSocketChild.h
rename : dom/network/src/TCPSocketParent.cpp => dom/network/TCPSocketParent.cpp
rename : dom/network/src/TCPSocketParent.h => dom/network/TCPSocketParent.h
rename : dom/network/src/TCPSocketParentIntermediary.js => dom/network/TCPSocketParentIntermediary.js
rename : dom/network/src/Types.h => dom/network/Types.h
rename : dom/network/src/UDPSocket.cpp => dom/network/UDPSocket.cpp
rename : dom/network/src/UDPSocket.h => dom/network/UDPSocket.h
rename : dom/network/src/UDPSocketChild.cpp => dom/network/UDPSocketChild.cpp
rename : dom/network/src/UDPSocketChild.h => dom/network/UDPSocketChild.h
rename : dom/network/src/UDPSocketParent.cpp => dom/network/UDPSocketParent.cpp
rename : dom/network/src/UDPSocketParent.h => dom/network/UDPSocketParent.h
2014-08-27 10:13:39 -07:00
Ryan VanderMeulen
a3c8179253 Merge b2g-inbound to m-c. a=merge 2014-08-29 15:26:40 -04:00
Jamin Liu
7c1c4f8f76 Bug 1060216 - [Bluedroid] Distribute "PropertyChanged" signal to notify BluetoothAdapter when discovery state changed. r=shuang 2014-08-29 02:10:00 -04:00
Kyle Machulis
d83f17e7d0 Bug 846200 - Update Marionette JS WebAPI Tests to use new settings-api permissions; r=echou r=echen
--HG--
extra : rebase_source : 36a9f3e055a2ff7bcf624e9ef7f8f1e4619de6da
2014-08-27 21:01:29 -07:00
Jamin Liu
19124cadfa Bug 1056413 - Broadcast system message to notify Gaia when Bluetooth authentication failure occurs. r=shuang 2014-08-29 09:58:52 +08:00
Wes Kocher
2c9ce1520b Backed out 17 changesets (bug 843452)
Backed out changeset e72a0297d488 (bug 843452)
Backed out changeset 73f62ce4190f (bug 843452)
Backed out changeset 6d4a49ebd9fc (bug 843452)
Backed out changeset ac93e396669f (bug 843452)
Backed out changeset cf4fc721821e (bug 843452)
Backed out changeset 9a94ea71d232 (bug 843452)
Backed out changeset b95ff097374d (bug 843452)
Backed out changeset 8d6428a93500 (bug 843452)
Backed out changeset e31b86ef0e80 (bug 843452)
Backed out changeset bd4efde535cd (bug 843452)
Backed out changeset 02bbcd8ac571 (bug 843452)
Backed out changeset f7f41bf82b22 (bug 843452)
Backed out changeset 20f42764cd38 (bug 843452)
Backed out changeset 82f8670f5c17 (bug 843452)
Backed out changeset 52f25f1278e3 (bug 843452)
Backed out changeset 181337820a7c (bug 843452)
Backed out changeset 9bd12641af03 (bug 843452)

--HG--
rename : dom/mobileconnection/interfaces/nsIMobileConnectionService.idl => dom/mobileconnection/interfaces/nsIMobileConnectionProvider.idl
2014-08-28 16:51:41 -07:00
Jamin Liu
65d64d181f Bug 929376 - Part 2: Move 'IsConnected' from BluetoothManager to BluetoothAdapter and allow it to be used on content process. r=shawnjohnjr 2014-08-26 18:50:35 +08:00
Ryan VanderMeulen
468fb8552d Backed out changesets d9cbdfbed1f5 and a38ad201299f (bug 929376) for bustage. 2014-08-25 10:46:22 -04:00
dannyliang
319a156073 Bug 1057309 - Fix BT build break in flatfish. r=tzimmermann 2014-08-25 00:00:00 -04:00
Jamin Liu
0bb7727ee9 Bug 929376 - Part 2: Move 'IsConnected' from BluetoothManager to BluetoothAdapter and allow it to be used on content process. r=shawnjohnjr 2014-08-25 03:53:00 -04:00
Eric Chou
bf4cc29d32 Bug 1013748 - Use StaticRefPtr to hold BluetoothService objects, f=shuang, r=tzimmermann, r=khuey 2014-08-25 17:53:37 +08:00
Thomas Zimmermann
15fbfb1a8a Bug 1053804: Replace |MainThreadTask| by |CloseScoRunnable|, r=shuang
|MainThreadTask| performs different operations on the main thread,
depending on a given command flag. There is only one command, CLOSE_SCO,
in use.

This patch removes the command infrastructure and replaces |MainThreadTask|
by |CloseScoRunnable|, which implements only this single operation.
2014-08-21 10:10:39 +02:00
Thomas Zimmermann
1360f1b2dd Bug 1053804: Cleanup Bluetooth Handsfree manager, r=shuang
This patch removes the unusued callback code from Bluetooth's
Handsfree manager.
2014-08-21 10:10:39 +02:00
Thomas Zimmermann
5e5bc1cd09 Bug 1053804: Integrate runnables into Handsfree notifications, r=shuang
A number of notifications dispatch runnables to the main thread for
invoking actions. This is not requireed, as notifications already
run on the main thread. This patch merges the runnable's code into
the respective notifications.
2014-08-21 10:10:39 +02:00
Thomas Zimmermann
43e680c63c Bug 1053804: Use Bluetooth Handsfree notifications, r=shuang
This patch replaces Handsfree callbacks by notifications. One
important change is that the first call to |BluetoothHandsfreeManager::Get|
now happens during initialization. Hence the Handsfree manager is now setup
immediately, instead of later at use.
2014-08-21 10:10:38 +02:00
Thomas Zimmermann
2bed41e8de Bug 1053804: Implement Bluetooth Handsfree notifications, r=shuang
The patch adds notifications support to the Handsfree manager. Each
notification's method is taken from the respective callback code, with
changes to the arguments' data types.
2014-08-21 10:10:38 +02:00
Thomas Zimmermann
71cdd30826 Bug 1053804: Add Bluetooth Handsfree notifications, r=shuang
The notification interface consists of virtual methods that are
invoked form the Bluetooth backend on certain events. The Handsfree
manager can implement the methods to handle these events.
2014-08-21 10:10:37 +02:00
Juan Gomez
a97c9bdb71 Bug 1054791 - [Flatfish][Build] Build failed in BluetoothInterface.cpp: 'bt_remote_version_t' does not name a type. r=tdz 2014-08-17 16:21:00 -04:00
Edgar Chen
a8ba048e6e Bug 843452 - Part 2-2: Bluetooth changes for MobileConnectionService interface. r=echou 2014-07-02 17:14:08 +08:00
Ryan VanderMeulen
b392753c94 Backed out 11 changesets (bug 1059079, bug 1015518, bug 900551, bug 846200) for Gaia UI test failures on a CLOSED TREE.
Backed out changeset d85b4e48b3b4 (bug 1015518)
Backed out changeset 663b73ba69ec (bug 1015518)
Backed out changeset 5cf1cb5fa022 (bug 900551)
Backed out changeset b953dd5bfdaa (bug 900551)
Backed out changeset a2b6d7c84100 (bug 900551)
Backed out changeset ceb79fe83d15 (bug 900551)
Backed out changeset f6acf344fbf0 (bug 900551)
Backed out changeset fa269ea53937 (bug 846200)
Backed out changeset b89c84a850f9 (bug 846200)
Backed out changeset b7a7dfbe4e3f (bug 846200)
Backed out changeset c6f54d821c11 (bug 1059079)
2014-08-28 12:49:49 -04:00
Kyle Machulis
4f2e5c5002 Bug 900551 - Disable bluetooth push and tethering tests until Bug 1058158 is fixed; r=jaliu 2014-08-27 21:01:30 -07:00
Kyle Machulis
d511ae9336 Bug 846200 - Update Marionette JS WebAPI Tests to use new settings-api permissions; r=echou r=echen 2014-08-27 21:01:29 -07:00
Bobby Holley
7c7704aa07 Bug 1052052 - Hoist Auto*JSContext into nsContentUtils and kill nsCxPusher.{cpp,h}. r=gabor 2014-08-14 18:47:15 -07:00
Thomas Zimmermann
fae10bf968 Bug 1048915: Cleanup |BluetoothServiceBluedroid| and related functions, r=shuang
This patch removes unsued code from |BluetoothServiceBluedroid|, related
functions, and cleans up the file. It

 * removes callbacks,
 * removes callback helper tasks,
 * removes helper functions, and
 * cleans up global variables.
2014-08-14 18:12:52 +02:00
Thomas Zimmermann
8547aeba35 Bug 1048915: Integrate helper runnables into notification methods, r=shuang
Bluedroid callbacks were usually called on a separate thread that
was specific to this task. So Gecko's Bluetooth Core contained a
number of runnables for executing callback operations on the main
thread.

Since all notifications always run on the main thread, the extra
runnables are not required any longer. This patch integrates them
into the notification methods where possible.
2014-08-14 18:12:52 +02:00
Thomas Zimmermann
6131bf3961 Bug 1048915: Use Bluetooth Core notifications, r=shuang
This patch connects backend and Gecko side of the notification
code. Gecko will now receive notifications instead of Bluedroid
callbacks.
2014-08-14 18:12:52 +02:00
Thomas Zimmermann
4c463fc757 Bug 1048915: Implement Bluetooth Core notifications, r=shuang
This patch adds the Gecko-side of the Core notifications. The current
implementation of the notification methods has been copied from the
repsective Bluedroid callback methods, with only minor changes to adapt
them to Gecko data types.
2014-08-14 18:12:51 +02:00
Thomas Zimmermann
77156aef84 Bug 1048915: Add Bluetooth Core notifications, r=shuang
A notification is a callback from the Bluetooth backend to inform
Gecko about a event. Bluedroid uses function pointers for this, but
in Gecko we use method calls instead.

Gecko implements notification handlers for the Bluetooth backend. The
backend converts incomming events to Gecko types and forwards them to
the registered notification handler.
2014-08-14 18:12:51 +02:00
Thomas Zimmermann
3a1603152f Bug 1048915: Add infrastructure for Bluetooth notifications, r=shuang
This patch adds some runnable classes for running class methods on
the main thread. This is the base of the upcomming notification
mechanism for Bluetooth.
2014-08-14 18:12:51 +02:00
Vicamo Yang
d154baf8a2 Bug 1048098: remove redundant flushPermissions, flushPrefEnv from tearing down procedure. r=btian, r=echen 2014-08-08 18:28:58 +08:00
Jocelyn Liu
c8da47a765 Bug 1050494: Clear sBluetoothThread in BluetoothDBusService on shutdown to fix memory leak. r=shuang 2014-08-08 16:22:32 +08:00
Thomas Zimmermann
7a7fa414f1 Bug 1050299: Wrap BlutoothInterface array initializaton in preprocessor macro, r=shuang
This patch fixes array initialization in the |Convert| functions of
|BluetoothInterface|. Designated initializers are not supported by
all compilers, so we wrap them into a macro and only used them when
possible.
2014-08-07 16:51:14 +02:00
Thomas Zimmermann
5af38c1d79 Bug 992206: Cleanup interface of |BluetoothSocket|, r=shuang
This patch cleans up the interface of Bluedroid's |BluetoothScoket|
to look more similar the interface of |UnixSocketConsumer|, from
which it descends.
2014-08-07 11:37:50 +02:00
Thomas Zimmermann
c61a5628ae Bug 992206: Use |SocketIOShutdownTask| for Bluetooth sockets, r=shuang 2014-08-07 11:37:50 +02:00
Thomas Zimmermann
d4ab8f302f Bug 992206: Use |SocketIOSendTask| for Bluetooth sockets, r=shuang 2014-08-07 11:37:49 +02:00
Thomas Zimmermann
2a84992441 Bug 992206: Use |SocketIOTask| for Bluetooth sockets, r=shuang 2014-08-07 11:37:49 +02:00
Thomas Zimmermann
731665fb89 Bug 992206: Use |SocketIOBase| for Bluetooth sockets, r=shuang 2014-08-07 11:37:49 +02:00
Thomas Zimmermann
83d04e76a6 Bug 992206: Use |SocketIODeleteInstanceRunnable| for Bluetooth sockets, r=shuang 2014-08-07 11:37:49 +02:00
Thomas Zimmermann
9388876f6f Bug 992206: Use |SocketIORequestClosingRunnable| for Bluetooth sockets, r=shuang 2014-08-07 11:37:48 +02:00
Thomas Zimmermann
16d792817c Bug 992206: Use |SocketIOReceiveRunnable| for Bluetooth sockets, r=shuang 2014-08-07 11:37:48 +02:00
Thomas Zimmermann
a166e379f7 Bug 992206: Use |SocketIOEventRunnable| for Bluetooth sockets, r=shuang 2014-08-07 11:37:48 +02:00
Thomas Zimmermann
d2708be094 Bug 992206: Use |SocketIORunnable| for Bluetooth sockets, r=shuang 2014-08-07 11:37:47 +02:00
Thomas Zimmermann
b8651b1768 Bug 992206: Use |SocketConsumerBase| for Bluetooth sockets, r=shuang 2014-08-07 11:37:47 +02:00
Thomas Zimmermann
9268476e14 Bug 992206: Cleanup fields in |DroidSocketImpl|, r=shuang
|DroidSocketImpl| contains several unused fields that are removed
by this patch.
2014-08-07 11:37:47 +02:00
Jocelyn Liu
ea23543f04 Bug 1047757: Call ClearOnShutdown(sBluetoothService) to fix memory leak. r=shuang 2014-08-07 14:01:24 +08:00
Thomas Zimmermann
4c49c527b7 Bug 1038591: Convert Bluedroid status codes and error handlers, r=shuang
This patch converts Bluedroid status codes in Gecko to the
backend-neutral data type |BluetoothStatus|. All error handlers
have been adapted. The Bluedroid type |bt_status_t| only remains
in |BluetoothInterface|.
2014-08-06 11:45:32 +02:00
Thomas Zimmermann
c0139dd296 Bug 1038591: Convert Bluetooth AVRCP data types in |BluetoothAvrcpInterface|, r=shuang
With this patch |BluetoothAvrcpInterface| is responsible for converting all
Bluetooth data types to Bluedroid types. All callers have been adapted.
2014-08-06 11:45:22 +02:00
Thomas Zimmermann
2537fcb8d5 Bug 1038591: Convert Bluetooth A2DP data types in |BluetoothA2dpInterface|, r=shuang
With this patch |BluetoothA2dpInterface| is responsible for converting all
Bluetooth data types to Bluedroid types. All callers have been adapted.
2014-08-06 11:45:14 +02:00
Thomas Zimmermann
f15dfc8ccd Bug 1038591: Convert Bluetooth Handsfree data types in |BluetoothHandsfreeInterface|, r=shuang
With this patch |BluetoothHandsfreeInterface| is responsible for converting all
Bluetooth data types to Bluedroid types. All callers have been adapted.
2014-08-06 11:45:05 +02:00
Thomas Zimmermann
8feb4fd363 Bug 1038591: Convert Bluetooth Socket data types in |BluetoothSocketInterface|, r=shuang
With this patch |BluetoothSocketInterface| is responsible for converting all
Bluetooth data types to Bluedroid types. All callers have been adapted.
2014-08-06 11:44:56 +02:00
Thomas Zimmermann
18c28adada Bug 1038591: Convert Bluetooth data types in |BluetoothInterface|, r=shuang
With this patch, |BluetoothInterface| is responsible for converting
all Bluetooth data types to Bluedroid types. All callers have been
adapted.
2014-08-06 11:44:47 +02:00
Ed Morley
4f96f64e62 Backed out changeset 9281f9896ce0 (bug 1048098) for webapi test failures 2014-08-05 12:22:00 +01:00
Vicamo Yang
d84ab8839a Bug 1048098: remove redundant flushPermissions, flushPrefEnv from tearing down procedure. r=btian, r=echen 2014-08-05 16:19:06 +08:00
Thomas Zimmermann
54561d6b2a Bug 1045486: Rename |ConnectResultHandler| to |ConnectSocketResultHandler|, r=shuang
The linker mixes up |ConnectResultHandler| from BluetoothSocket.cpp
and BluetoothHfpManager.cpp. Consequently one of them gets removed
when linking libxul.so.

This patch works around the problem by renaming |ConnectResultHandler|
in BluetoothSocket.cpp to |ConnectSocketResultHandler|.
2014-08-05 09:29:14 +02:00
Thomas Zimmermann
d2afb9b180 Bug 1045486: Fix member types of |BluetoothInterfaceRunnable{1,3}<>|, r=shuang
When sending a |BluetoothInterfaceRunnable3<>| to the main thread,
in the case of BluetoothSocketResultHandler, the connect and accept
operations transfer string objects by reference from the I/O thread.
When the reference is accessed, the actual string might be removed
already.

The patch fixes the problem by storing the strings as value in the
runnable object.
2014-08-05 09:28:35 +02:00
Thomas Zimmermann
5499fdacaa Bug 1046737: Use value to maintain Bluetooth bonding arrays, r=shuang
The Bluedroid code uses indices into global arrays while pairing
with devices. These arrays might get changed in between and the
indices become incorrect. The result is undefined.

The patch fixes the problem by using the value, a reply runnable,
directly for array lookups. No indices are required.

This bug was fixed in bluetooth2/ already, but not yet backported.
2014-08-01 10:26:20 +02:00
Nathan Froyd
9ea6c585f8 Bug 1042878 - part 2 - move MOZ_CAIRO_CFLAGS et al additions to C*FLAGS into moz.build; r=glandium 2014-07-24 11:55:33 -04:00
Thomas Zimmermann
ce5e0ada46 Bug 1045461: Fix HFP fallback code to work with latest Bluetooth changes, r=shuang
Recent patches to Bluetooth introduced asynchronous initialization of
profile manager. The code in hfp-fallback was not adapted then. This
patch updates the broken code.
2014-07-29 10:47:09 +02:00
Carsten "Tomcat" Book
f2360c7833 merge mozilla-inbound to mozilla-central a=merge 2014-07-23 15:50:58 +02:00
Thomas Zimmermann
084da9d46d Bug 1029390: Asynchronous |BluetoothAvrcpInterface::SetVolume|, r=shuang 2014-07-23 07:56:23 +02:00
Thomas Zimmermann
8bb55f9ddb Bug 1029390: Asynchronous AVRCP response interfaces, r=shuang 2014-07-23 07:56:23 +02:00
Thomas Zimmermann
71465dd71d Bug 1029390: Asynchronous A2DP connect/disconnect, r=shuang 2014-07-23 07:56:23 +02:00
Thomas Zimmermann
dfdaa9d2ae Bug 1029390: Asynchronous init and cleanup of A2DP/AVRCP, r=shuang 2014-07-23 07:56:22 +02:00
Thomas Zimmermann
04c84350f9 Bug 1029390: Add A2DP/AVRCP result-handler infrastructure, r=shuang 2014-07-23 07:56:18 +02:00
Mike Hommey
d10b15b035 Bug 1041860 - Avoid setting FINAL_LIBRARY to libraries that further use a FINAL_LIBRARY. r=mshal 2014-07-23 08:37:51 +09:00
Thomas Zimmermann
965d247528 Bug 1029389: Asynchronous |BluetoothHandsfreeInterface::PhoneStateChange|, r=shuang 2014-07-15 10:56:55 +02:00
Thomas Zimmermann
34007b0d25 Bug 1029389: Asynchronous Bluetooth Handsfree response methods, r=shuang 2014-07-15 10:56:55 +02:00
Thomas Zimmermann
019f96bad0 Bug 1029389: Asynchronous |BluetoothHandsfreeInterface::DeviceStatusNotification|, r=shuang 2014-07-15 10:56:55 +02:00
Thomas Zimmermann
afc9651841 Bug 1029389: Asynchronous |BluetoothHandsfreeInterface::VolumeControl|, r=shuang 2014-07-15 10:56:54 +02:00
Thomas Zimmermann
5e870632d3 Bug 1029389: Asynchronous Bluetooth Handsfree voice-recognition functions, r=shuang 2014-07-15 10:56:54 +02:00
Thomas Zimmermann
cda269a96c Bug 1029389: Asynchronous Bluetooth Handsfree connection handling, r=shuang 2014-07-15 10:56:54 +02:00
Thomas Zimmermann
7d7d46a15d Bug 1029389: Asynchronous Bluetooth Handsfree init and cleanup methods, r=shuang 2014-07-15 10:56:53 +02:00
Thomas Zimmermann
145befb0cb Bug 1029389: Add result-handler class for Bluetooth Handsfree profile, r=shuang 2014-07-15 10:56:53 +02:00
Thomas Zimmermann
e8b46a74c6 Bug 1029389: Asynchronous starting and stopping of profile managers, r=shuang
Profile managers use the new class |BluetoothProfileResultHandler|
to signal the result of initializing of cleaning up operations to
|BluetoothServiceBluedroid|. |BluetoothServiceBluedroid| proceeds
once all profile handlers have finished.

Future patches will build upon this patch to create completely
asynchronous profile managers.
2014-07-15 10:56:53 +02:00
Thomas Zimmermann
ff33c3ae09 Bug 1038097: Include <errno.h> in BluetoothInterface.cpp, r=shuang
This patch adds a missing include statement for <errno.h> to
BluetoothInterface.cpp. This fixes the build for flatfish
devices. For safety, the patch also adds an include statement
for <unistd.h>, which might be necessary for several functions.
2014-07-14 13:43:11 +02:00
Thomas Zimmermann
9aa352eaf0 Bug 1035240: Close file descriptor in BluetoothSocket, r=shuang
Currently, BluetoothSocket leaks its file descriptor on close
operations. With this patch when Gecko closes an instance of
BluetoothSocket, the file descriptor is now closed as well.
2014-07-11 09:22:51 +02:00
Thomas Zimmermann
c8a8d0d59c Bug 1029387: Remove socket setup from BluetoothSocket, r=shuang
This patch removes all code related to socket setup from Bluedroid's
BluetoothSocket. The socket setup is handled by BluetoothInterface;
transparantly to its users.

Since most of the socket setup is now hidden, a comment was added to
DroidSocketImpl that explains the connection phases in server and
client.
2014-07-10 15:11:09 +02:00
Thomas Zimmermann
8751f4be58 Bug 1029387: Handle socket setup for |Accept| in BluetoothInterface, r=shuang
This patch moves the accept phase of Bluedroid's |Listen| to the
implementation of BluetoothInterface. |BluetoothInterface::Accept|
handles Bluedroid's socket-setup messages and executes the result
handler with the received file descriptor and data.
2014-07-10 15:10:54 +02:00
Thomas Zimmermann
913b8c1e5f Bug 1029387: Handle socket setup for |Connect| in BluetoothInterface, r=shuang
Bluedroid's internal socket setup transfers 2 messages and possibly
a file descriptor as the first data of a socket connection.

This patch moves the socket-setup code for the |Connect| call to
the implementation of BluetoothInterface. BluetoothSocket only
handles the socket setup of |Listen|, and general socket state.
2014-07-10 15:10:45 +02:00
Thomas Zimmermann
0d00e23db3 Bug 1029387: Introduce connection status for Bluedroid sockets, r=shuang
In preparaton of moving the Bluedroid socket setup to BluetoothInterface,
this patch introduces connection states for Bluetooth sockets. There are
4 states,

  - Disconnected,
  - Listening,
  - Connecting, and
  - Connected.

All sockets start in Disconnected and transition to Connected via one
of the other states. Server socket transition through Listening, Client
sockets transition through Connecting. There is currently a lot of code
duplication in read and write methods. This will be cleaned up when the
connection setup is handled by BluetoothInterface.
2014-07-10 15:10:36 +02:00
Thomas Zimmermann
da1fed1c54 Bug 1029387: Convert Bluedroid Socket's Connect method to asynchronous design, r=shuang 2014-07-10 15:10:26 +02:00
Thomas Zimmermann
72b7c542e0 Bug 1029387: Convert Bluedroid Socket's Listen method to asynchronous design, r=shuang 2014-07-10 15:10:13 +02:00
Thomas Zimmermann
3bd553181a Bug 1029387: Add result handler for Bluetooth Socket interface, r=shuang 2014-07-10 15:09:44 +02:00
Shawn Huang
a1f4838926 Bug 1033273 - Part 1: Add InitHfpInterface/DeinitHfpinterface. r=btian 2014-07-03 00:04:00 -04:00
Shawn Huang
07f4910a6f Bug 1033234 - Fix build break when building JB 4.2. r=tzimmermann 2014-07-02 22:58:00 -04:00
Thomas Zimmermann
e188e5fadb Bug 1029386: Asynchronous Bluedroid DUT and LE interfaces, r=shuang 2014-07-03 09:53:39 +02:00
Thomas Zimmermann
8a58f145a7 Bug 1029386: Asynchronous authentification in Bluedroid, r=shuang 2014-07-03 09:53:32 +02:00
Thomas Zimmermann
a6d7b0523c Bug 1029386: Asynchronous Bluedroid device bonding, r=shuang 2014-07-03 09:53:20 +02:00
Thomas Zimmermann
4576ec0f2d Bug 1029386: Asynchronous discovery methods in Bluedroid, r=shuang 2014-07-03 09:53:06 +02:00
Thomas Zimmermann
e28c99433b Bug 1029386: Asynchronous remote-service methods in Bluedroid, r=shuang 2014-07-03 09:52:52 +02:00
Thomas Zimmermann
c5d1627efb Bug 1029386: Asynchronous Bluedroid device-property methods, r=shuang 2014-07-03 09:52:35 +02:00
Thomas Zimmermann
dcb822db7b Bug 1029386: Asynchronous Bluedroid adapter methods, r=shuang 2014-07-03 09:52:19 +02:00
Thomas Zimmermann
f98cf38379 Bug 1029386: Asynchronous Bluedroid starting and stopping, r=shuang 2014-07-03 09:51:57 +02:00
Thomas Zimmermann
ffc089af91 Bug 1029386: Split Bluedroid start/stop code, r=shuang
This patch prepares refactoring of the Bluedroid start and stop
code towards an asynchronous design.
2014-07-03 09:51:40 +02:00
Thomas Zimmermann
cdfb7d739e Bug 1029386: Add result handler for Bluetooth Core profile, r=shuang
The result-handler class contains a method for each interface
in the Core profile and a method for failed calls. The patch
also adds runnable classes that execute a result handler's
method on the main thread.
2014-07-03 09:51:27 +02:00
Thomas Zimmermann
866f8e76b3 Bug 1027030: Convert Bluetooth to use Bluedroid wrappers, r=shuang
This patch converts the Bluedroid backend to use the wrapper
classes. The affected interfaces are Core, Sockets, Handsfree,
A2DP, and AVRCP.
2014-06-27 15:45:26 +08:00
Thomas Zimmermann
cf3848df5f Bug 1027030: Wrap Bluedroid interfaces in classes, r=shuang
This patch adds classes around all Bluedroid interfaces that are
currently used by Gecko. These are Core, Socket, Handsfree, A2DP,
and AVRCP.

All arguments and return values are still Bluedroid types and
constants. Future patches will convert them to interface-neutral
artifacts.
2014-06-27 15:45:26 +08:00
Shawn Huang
d3b3314624 Bug 1007576 - [bluez] Update CoD value after device found while doing NFC pairing, r=echou 2014-06-27 11:43:01 +08:00