Граф коммитов

1027 Коммитов

Автор SHA1 Сообщение Дата
Thomas Zimmermann d8b08562b6 Bug 1029389: Asynchronous Bluetooth Handsfree init and cleanup methods, r=shuang 2014-07-15 10:56:53 +02:00
Thomas Zimmermann 978e728e28 Bug 1029389: Add result-handler class for Bluetooth Handsfree profile, r=shuang 2014-07-15 10:56:53 +02:00
Thomas Zimmermann 1ed065692c 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 ff0816378b 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 59a307fb1b 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 4df0a8ba94 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 65625cbecc 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 cb15a54553 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 b4b1937c50 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 54b45b1fbc Bug 1029387: Convert Bluedroid Socket's Connect method to asynchronous design, r=shuang 2014-07-10 15:10:26 +02:00
Thomas Zimmermann d0f2a0813a Bug 1029387: Convert Bluedroid Socket's Listen method to asynchronous design, r=shuang 2014-07-10 15:10:13 +02:00
Thomas Zimmermann f600d9127f Bug 1029387: Add result handler for Bluetooth Socket interface, r=shuang 2014-07-10 15:09:44 +02:00
Shawn Huang ffede25d1f Bug 1033273 - Part 1: Add InitHfpInterface/DeinitHfpinterface. r=btian 2014-07-03 00:04:00 -04:00
Shawn Huang 54408ff0cb Bug 1033234 - Fix build break when building JB 4.2. r=tzimmermann 2014-07-02 22:58:00 -04:00
Thomas Zimmermann 09f4418e5b Bug 1029386: Asynchronous Bluedroid DUT and LE interfaces, r=shuang 2014-07-03 09:53:39 +02:00
Thomas Zimmermann ae8327a31e Bug 1029386: Asynchronous authentification in Bluedroid, r=shuang 2014-07-03 09:53:32 +02:00
Thomas Zimmermann d03babe552 Bug 1029386: Asynchronous Bluedroid device bonding, r=shuang 2014-07-03 09:53:20 +02:00
Thomas Zimmermann ae524b159b Bug 1029386: Asynchronous discovery methods in Bluedroid, r=shuang 2014-07-03 09:53:06 +02:00
Thomas Zimmermann 077ae29975 Bug 1029386: Asynchronous remote-service methods in Bluedroid, r=shuang 2014-07-03 09:52:52 +02:00
Thomas Zimmermann c408b4d665 Bug 1029386: Asynchronous Bluedroid device-property methods, r=shuang 2014-07-03 09:52:35 +02:00
Thomas Zimmermann e0760329b5 Bug 1029386: Asynchronous Bluedroid adapter methods, r=shuang 2014-07-03 09:52:19 +02:00
Thomas Zimmermann 4a8768ea72 Bug 1029386: Asynchronous Bluedroid starting and stopping, r=shuang 2014-07-03 09:51:57 +02:00
Thomas Zimmermann e11fd99785 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 2ace39db13 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 a820dabab4 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 a95f1c7908 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 373361cdc7 Bug 1007576 - [bluez] Update CoD value after device found while doing NFC pairing, r=echou 2014-06-27 11:43:01 +08:00
Shawn Huang 8a0bdc092c Bug 1027506 - [bluedroid] Don't reset call array after HFP link lost, r=echou 2014-06-26 09:58:50 +08:00
Olli Pettay 67c5293976 Bug 1029866 - Rename InitUsingWin(...) to Init(...), r=bobowencode
--HG--
extra : rebase_source : e04aac99fe64270f283cf49ed52b8f7512a2fa3b
2014-06-25 13:17:17 +03:00
Shawn Huang 2029d5d02b Bug 1015819 - Part 2: [bluez] Restore CoD value based on SDP records. r=echou, f=btian 2014-06-24 02:36:00 -04:00
Shawn Huang 1ce0b655c9 Bug 1015819 - Part 1: [bluedroid] Restore CoD value based on SDP records. r=echou, f=btian 2014-06-20 00:48:00 -04:00
Bob Owen f9b75f5bf1 Bug 1023969 - Part 4: Replace |AutoPushJSContext|s in BluetoothDevice::SetPropertyByValue. r=bholley 2014-06-20 14:42:33 +01:00
Bob Owen 480df31e2f Bug 1023969 - Part 3: Replace AutoPushJSContext in BluetoothManager GetAdapterTask::ParseSuccessfulReply. r=bholley 2014-06-19 20:17:59 +01:00
Bob Owen 872cb50d73 Bug 1023969 - Part 2: Replace |AutoPushJSContext|s in BluetoothAdapter::SetPropertyByValue. r=bholley 2014-06-19 20:14:32 +01:00
Bob Owen 552ac0e02c Bug 1023969 - Part 1: Replace AutoPushJSContext in BluetoothAdapter GetDevicesTask::ParseSuccessfulReply. r=bholley 2014-06-19 20:09:03 +01:00
Hsin-Yi Tsai 4e0d0af049 Bug 981519 - number and name presentation - part 5 - BT module. r=btian 2014-04-17 11:46:03 +08:00
Shawn Huang 72f81139b3 Bug 989976 - [bluedroid] Hit SIGBUS on unaligned access while doing AdapterPropertiesChangeCallback. r=echou 2014-06-17 01:38:00 -04:00
Jamin Liu b86122ee4d Bug 968709 - Add a marionette test for pairing APIs of BluetoothAdapter. r=echou, f=vyang 2014-06-05 19:17:00 -04:00
Jamin Liu 449dc2e322 Bug 968709 - Add a marionette test case to Bluetooth set to make sure the URL of Marionette client is correct. r=vyang
Few marionette tests in unit-test set may navigate to specific URL and
wouldn't restore the URL of marionette client when the tests end.
Navigate the URL to default value before running Bluetooth test to make
sure the correctness of test.
2014-06-18 00:20:00 -04:00
Hsin-Yi Tsai e926f8230a Backed out changeset e152089ae843 (bug 981519) for causing regression bug 1026081 2014-06-17 15:37:31 +08:00
Jamin Liu d69fd4964b Bug 1009157 - Ensures that we can receive BT enable/disabled events in marionette test every times. r=echou
Ensures that we can always receive that "enabled"/"disabled" event by
installing the event handler *before* we ever enable/disable Bluetooth. Or
we might just miss those events and get a timeout error.
2014-06-15 22:50:00 +02:00
Hsin-Yi Tsai fcd581cf2c Bug 981519 - number and name presentation - part 5 - BT module. r=btian 2014-04-17 11:46:03 +08:00
Boris Zbarsky bc1e511e33 Bug 1009675 part 2. Return WebIDL 'any' values as handles. r=peterv 2014-06-11 16:26:52 -04:00
Ed Morley 719d73ac3f Backed out changeset 5f7e58de5d56 (bug 968709) for causing bug 1023167 2014-06-10 11:49:10 +01:00
Ed Morley 53328097b1 Backed out changeset 8d2cc1387119 (bug 968709) 2014-06-10 11:48:43 +01:00
Daniel Holbert ca0c9284b0 Bug 1022417: Annotate BluetoothHfpManager::GetVolumeTask as MOZ_FINAL to calm GCC Wdelete-non-virtual-dtor build warning. blanket-r=ehsan 2014-06-08 14:58:02 -07:00
Eric Chou b5110e88a0 Bug 1002391 - Get the latest SDP records of the target device, r=shuang
Use BlueZ API 'CreateDevice' to update the SDP records of those
unknown devices. On the other hand, still use 'DiscoverServices'
to update SDP records of paired devices.
2014-06-06 18:14:22 +08:00
Jamin Liu 56e037f1e5 Bug 968709 - Add a marionette test for pairing APIs of BluetoothAdapter. r=echou, f=vyang 2014-06-06 11:38:24 +08:00
Jamin Liu e1c73ffde3 Bug 968709 - Add a marionette test case to Bluetooth set to make sure the URL of Marionette client is correct. r=echou, f=vyang
Few marionette tests in unit-test set may navigate to specific URL and
wouldn't restore the URL of marionette client when the tests end.
Navigate the URL to default value before running Bluetooth test to make
sure the correctness of test.
2014-06-06 11:38:24 +08:00
Vicamo Yang fa6b7968d6 Bug 927320 - 2/2: rename related variables. r=aknow,btian 2014-06-03 22:15:30 +08:00
Vicamo Yang cff89f3dbc Bug 927320 - 1/2: rename TelephonyProvider to TelephonyService. r=aknow
--HG--
rename : dom/telephony/gonk/TelephonyProvider.js => dom/telephony/gonk/TelephonyService.js
rename : dom/telephony/gonk/TelephonyProvider.manifest => dom/telephony/gonk/TelephonyService.manifest
rename : dom/telephony/ipc/TelephonyIPCProvider.cpp => dom/telephony/ipc/TelephonyIPCService.cpp
rename : dom/telephony/ipc/TelephonyIPCProvider.h => dom/telephony/ipc/TelephonyIPCService.h
rename : dom/telephony/nsIGonkTelephonyProvider.idl => dom/telephony/nsIGonkTelephonyService.idl
rename : dom/telephony/nsITelephonyProvider.idl => dom/telephony/nsITelephonyService.idl
2014-06-03 22:15:25 +08:00
Kyle Huey 3fdfb7f0db Bug 1011110: Don't allow replying to a BluetoothRequest twice. r=bent 2014-06-02 19:02:27 -07:00
Steve Fink 5a86ec4061 Bug 1017419 - Handlify nsTArrayToJSArray, r=terrence
--HG--
extra : rebase_source : 802407d2c25fe060e16b546890859720664158ae
2014-06-02 09:40:13 -07:00
Szu-Yu Chen [:aknow] f6fb2a8ba2 Bug 1016849 - Part 3: Remove isActive (bluetooth). r=btian 2014-05-29 00:16:00 -04:00
Eric Chou 9f74e62745 Bug 1015826 - Dispatch part of BondStateChangedCallback to main thread, r=tzimmermann 2014-05-29 11:24:09 +08:00
Eric Chou 8020037f26 Bug 1015826 - Dispatch part of RemoteDevicePropertiesCallback to main thread, r=tzimmermann 2014-05-29 11:24:07 +08:00
Eric Chou 2c49c88962 Bug 1015826 - Use Atomic to ensure thread-safe, r=tzimmermann 2014-05-29 11:24:05 +08:00
Eric Chou 5e386daa49 Bug 1015826 - Dispatch part of AdapterPropertiesCallback to main thread, r=tzimmermann
Please note that sSetPropertyRunnableArray[0] should be fired after
firing "PropertyChanged" to BluetoothAdapter, however this is not
guaranteed in current implementation. This patch also fixed this
potential problem.
2014-05-29 11:24:03 +08:00
Eric Chou 15ea6c70e6 Bug 1015826 - Remove unneccessary variable sIsBtEnabled to avoid racing issues, r=tzimmermann 2014-05-29 11:24:02 +08:00
Carsten "Tomcat" Book a4785f7882 Backed out changeset 349ca77481c0 (bug 968709) for marionette test failures 2014-05-28 13:02:01 +02:00
Jamin Liu 645c14c575 Bug 968709 - Add a marionette test for pairing APIs of BluetoothAdapter. r=echou, f=vyang 2014-05-22 22:42:00 +02:00
Ben Tian dbcb69f261 Bug 1016243 - [cleanup] Remove unused function BluetoothService::RemoveObserverFromTable, r=shuang 2014-05-27 17:02:44 +08:00
Ryan VanderMeulen 4a08636d20 Merge inbound to m-c on a CLOSED TREE. 2014-05-27 16:23:41 -04:00
Reuben Morais 6b28e6ff71 Bug 952486 - Use CheckPermissions instead of Func for several interfaces. r=bz 2014-05-25 15:31:11 -03:00
Eric Chou 5c32a5d4bc Bug 942104 - Notify BluetoothAdapter about discovery state changed (bluez), r=gyeh 2014-05-23 14:01:41 +08:00
Eric Chou 2199448d26 Bug 942104 - Notify BluetoothAdapter about discovery state changed (bluedroid), r=gyeh 2014-05-23 14:01:37 +08:00
Eric Chou af6be17fbd Bug 942104 - Fire event 'discoverystatechanged', r=gyeh 2014-05-23 14:00:25 +08:00
Eric Chou 7fd9600215 Bug 942104 - Add an event listener "ondiscoverystatechanged", r=gyeh, r=mrbkap 2014-05-23 14:00:14 +08:00
Eric Chou 842021ab69 Bug 942104 - Avoid exposing Bluetooth interface to all web pages, r=bz
Current Bluetooth related webidl implementation would make interfaces
such as BluetoothAdapter exposed to all web pages, and obviously we
don't want to see that.
2014-05-23 14:00:10 +08:00
Birunthan Mohanathas 189593520f Bug 869836 - Part 4: Use EqualsLiteral instead of `Equals(NS_LITERAL_STRING(...))`. r=ehsan 2014-05-22 06:48:51 +03:00
Birunthan Mohanathas 0e6f3a6562 Bug 869836 - Part 3: Use `Append('c')` instead of `AppendLiteral("c")`. r=ehsan 2014-05-22 06:48:51 +03:00
Birunthan Mohanathas 19bebbc68d Bug 869836 - Part 2: Use AppendLiteral instead of `Append(NS_LITERAL_STRING(...))`. r=ehsan 2014-05-22 06:48:50 +03:00
Birunthan Mohanathas d9e420fc7c Bug 869836 - Part 12: Use `Assign('c')` instead of `AssignLiteral("c")`. r=ehsan
--HG--
extra : rebase_source : a6b15019cee452973dd8bf3112c15e14175855a9
2014-05-26 21:55:08 +03:00
Birunthan Mohanathas 085f40aff8 Bug 869836 - Part 11: Use `Append('c')` instead of `AppendLiteral("c")`. r=ehsan
--HG--
extra : rebase_source : 08bcbfd804f1adcab40c7d59fa56deda1f6e0829
2014-05-26 21:54:58 +03:00
Birunthan Mohanathas cfd62b35ad Bug 869836 - Part 10: Use Truncate instead of `AssignLiteral("")`. r=ehsan
--HG--
extra : rebase_source : e75c900e72e5367518f2b923a839fd23acf29a42
2014-05-26 21:54:53 +03:00
Shawn Huang 619acef8fd Bug 1005901 - [bluedroid] Always do cleanup after disable. r=btian 2014-05-16 04:48:00 -04:00
Jamin Liu a2d35c1933 Bug 1003472 - If OPP manager can't get valid service channel, refresh SDP records until timeout is hit. r=shuang
If user tries to send a file to a device which just completes the pairing
process, the OPP manager may update SDP records when it's not ready.

It's especially likely to occur in BT file transfer with inline pairing
since OPP manager would request for a service channel to send the file when
device is just paired.
2014-05-16 14:35:20 +08:00
Thomas Zimmermann 5ad6357538 Bug 997137: Inherit |DroidSocketImpl| from |UnixFdWatcher|, r=echou
This patch converts |DroidSocketImpl| to inherit from |UnixFdWatcher|.
|UnixFdWatcher| maintains a Unix file descriptor on the I/O loop, and
replaces similar functionality in |DroidSocketImpl|.

As a side effect, all file descriptors in |DroidSocketImpl| are now
non-blocking. This does change the way how the code works, but ensures
that it doesn't block on the I/O thread.
2014-05-14 13:21:10 +02:00
Edgar Chen 2afd371dff Bug 898445 - Part 3: Bluetooth changes for MobileConnection webidl. r=echou 2014-02-25 18:01:23 +08:00
Ben Tian 86e0e103e0 Bug 1003020 - Update to the latest battery level when HFP manager initializes, r=shuang 2014-04-29 19:12:36 +08:00
Chris Peterson aca9b90afe Bug 990764 - Replace MOZ_ASSUME_UNREACHABLE in dom. r=smaug 2014-04-20 00:36:40 -07:00
Jamin Liu 524061df61 Bug 1003663 - Handle the case that user turn off BT during the middle of BT reply. r=echou, f=shuang
- End the session if BT is turn off during the middle of BT profile connection.
- Clear static queues(array) when BT is on.
2014-05-08 19:20:15 +08:00
Ting-Yu Lin 59a2106328 Bug 1006986 - Fix build fail for flame debug. r=echou 2014-05-06 22:39:00 -04:00
Jamin Liu b2bb32ea0f Bug 1003658 - Avoid to create reference cycle in BluetoothProfileController which would cause memory leak. r=echou, f=shuang 2014-05-07 10:57:27 +08:00
Jamin Liu 74cef88c2b Bug 1003657 - Don't keep reference in GetDefaultAdapterPathInternal() to avoid memory leak. r=echou, f=shuang 2014-05-06 11:45:51 +08:00
Ben Tian 85369d6c23 Bug 1003762 - [bluedroid] Notify BluetoothRilListener of service change, r=echou 2014-05-05 09:28:20 +08:00
Nathan Froyd 84041459a1 Bug 1003306 - part 2 - use services::GetPermissionManager everywhere that's appropriate; r=ehsan 2014-04-29 13:27:26 -04:00
Shawn Huang 8e45b3c2ac Bug 993954 - Check sBluetoothChild is null when closing Settings application
It is possible that sBluetoothChild set to nullptr and RecvNotify get called from MessageLoop.
This patch check sBluetoothChild.
2014-04-30 16:58:15 +01:00
Hsin-Yi Tsai f3458d4208 Bug 1000670 - part 5 - BT - impl NotifyClirModeChanged. r=echou 2014-04-24 14:53:03 +08:00
Birunthan Mohanathas 5f1fde8824 Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
Jamin Liu e7a188ed74 Bug 990423 - [Bluetooth] Fix the incorrect condition for reporting call held status when call state changed. r=echou, f=btian
---
 dom/bluetooth/bluez/BluetoothHfpManager.cpp |  108 ++++++++++++++++++++++++---
 dom/bluetooth/bluez/BluetoothHfpManager.h   |    2 +
 2 files changed, 99 insertions(+), 11 deletions(-)
2014-04-25 09:59:32 +08:00
Ben Tian e7082d69f6 Bug 997580 - Don't notify bluedroid of callstate change during transition. r=echou 2014-04-24 11:56:11 +08:00
Ben Tian 21a9d0c6a6 Bug 993286 - Patch 3/3: Add Call.Set() function, r=echou, a=1.4+ 2014-04-21 18:19:53 +08:00
Ben Tian 0006f8f1ad Bug 993286 - Patch 2/3: Support AT+CHLD=3 to merge calls, r=echou, a=1.4+ 2014-04-24 14:55:27 +08:00
Ben Tian 4a4ef6382a Bug 993286 - Patch 1/3: Get call setup state from call array, r=echou, a=1.4+ 2014-04-24 13:56:07 +08:00
Shawn Huang 5e62268892 Bug 997626 - [bluez] Handle RequestPairingConsent event and reply pairing confirmation directly. r=echou, f=btian
Consent pairing event raises under the following conditions:
1. Local IO capabilities are DisplayYesNo and remote IO capabiltiies are DisplayOnly or NoInputNoOutput.
2. Call PairingConsent callback for "incoming" request.
This patch is try to directly reply pairing confirmation for consent cases.

How to test:
1. Initialize pairing request with IO capabilities-NoInputNoOutput as
headset role to b2g phone
2. Check pairing status of bluetooth headset
2014-04-22 08:37:01 -04:00
Jocelyn Liu 6b09a27335 Bug 993289: Fix the logic while updating call setup state, f=btian, r=echou 2014-04-22 16:42:38 +08:00
Jocelyn Liu 326e43c775 Bug 993288 - Separate BTHF_CALL_STATE_INCOMING and BTHF_CALL_STATE_WAITING for CLCC response only, for other cases, use BTHF_CALL_STATE_INCOMING for both states. r=echou 2014-04-17 16:55:45 +08:00
Jocelyn Liu 19cd47bd80 Bug 993290 - Respond OK after receiving ATDxxx and improve readability on ProcessDialCall(). r=echou 2014-04-17 03:09:00 +02:00
Shawn Huang 455b1b0792 Bug 994411 - [bluedroid] Ignore pending MO call index, while making MO call with bluetooth headset, r=echou 2014-04-17 17:38:28 +08:00