Commit Graph

69 Commits

Author SHA1 Message Date
Gregor Wagner
acecad8f82 Bug 1267577 - Move nsRunnable to mozilla::Runnable. r=gsvelto 2016-04-27 12:05:40 +02:00
Thomas Zimmermann
3db34e3133 Bug 1239979: Uninitialized Bluetooth profile managers explictly to release refs, r=shuang
The current Bluetooth profile managers remove themselves from a number
of observer lists in their destructors. But |nsIObserverService| keeps
it's own reference to the managers, so the destructors never run. Con-
sequently the Bluetooth module nevers cleans up correctly.

This patch adds an explicit uninit method to each profile manager. It
removes the manager from the observer lists.
2016-01-21 12:30:00 +01:00
Thomas Zimmermann
0163bc2474 Bug 1239979: Init and uninit all Bluetooth profile managers, r=shuang
The use is init and deinit methods is currently inconsistent among
Bluetooth profile managers. This patch unifies all these methods and
integrates them into the Bluetooth service. Instances of the manager
classes are now unref'ed during Bluetooth shutdown.
2016-01-21 12:30:00 +01:00
Thomas Zimmermann
30f1560836 Bug 1223722: Transfer Bluetooth addresses in |BluetoothValue|, r=brsun 2016-01-05 12:01:33 +01:00
Thomas Zimmermann
cb9c58250a Bug 1215525: Replace strings with Bluetooth addresses and UUIDs in Bluetooth mid-layer, r=brsun 2015-10-30 14:54:41 +01:00
Carsten "Tomcat" Book
aa4d7353fb Backed out changeset 4a99cfd718aa (bug 1215525) 2015-10-29 14:37:34 +01:00
Thomas Zimmermann
dc14c6ccee Bug 1215525: Replace strings with Bluetooth addresses and UUIDs in Bluetooth mid-layer, r=brsun 2015-10-29 13:30:02 +01:00
Nathan Froyd
01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Thomas Zimmermann
3ffdf6b57b Bug 1211948: Register Bluetooth A2DP module in A2DP manager, r=brsun
This patch moves the code for registering and unregistering the
A2DP backend module into the A2DP manager. The respective code in
the backend itself has been removed.

The new design allows for a strict separation between Setup module
and A2DP module.
2015-10-16 15:20:35 +02:00
Thomas Zimmermann
7b85e483f3 Bug 1211435: Rename some internal classes of Bluetooth's A2DP manager, r=shuang 2015-10-06 10:12:38 +02:00
Thomas Zimmermann
67ae102c63 Bug 1207649: Convert Bluetooth A2DP backend to |BluetoothAddress|, r=shuang
This patch converts all methods in Bluetooth's A2DP interface to
|BluetoothAddress|.
2015-09-30 09:42:33 +02:00
Carsten "Tomcat" Book
113003e824 Backed out 8 changesets (bug 1207649) for bustage on a CLOSED TREE
Backed out changeset df09a48144a5 (bug 1207649)
Backed out changeset fcbf5852361f (bug 1207649)
Backed out changeset d63567af5fa2 (bug 1207649)
Backed out changeset 02928720b1a0 (bug 1207649)
Backed out changeset b906ed92f33a (bug 1207649)
Backed out changeset f03f71a3de8a (bug 1207649)
Backed out changeset 9c647b56f37c (bug 1207649)
Backed out changeset a336f5041c27 (bug 1207649)
2015-09-29 15:54:21 +02:00
Thomas Zimmermann
06468d6f08 Bug 1207649: Convert Bluetooth A2DP backend to |BluetoothAddress|, r=shuang
This patch converts all methods in Bluetooth's A2DP interface to
|BluetoothAddress|.
2015-09-29 14:07:01 +02:00
Ben Tian
5e46603952 Bug 1195685 - Transform macro |BT_APPEND_NAMED_VALUE| into function, r=shuang 2015-09-09 10:59:36 +08:00
Thomas Zimmermann
f0d5f8b3dc Bug 1199110: Remove AVRCP support from |BluetoothA2dpManager| and convert callers, r=shuang
This patch removes AVRCP support from |BluetoothA2dpManager| and
converts all callers to use |BluetoothAvrcpManager| instead.
2015-08-31 17:27:47 +02:00
Thomas Zimmermann
df94c725aa Bug 1199110: Use mPlayStatus to determine track selection, r=shuang
This change removes AVRCP's dependency on the A2DP state.
2015-08-31 17:27:47 +02:00
Ben Tian
d4e5970e84 Bug 1195608 - [cleanup] Fix too long lines and revise some comments under dom/bluetooth, r=joliu 2015-08-18 11:29:45 +08:00
Ben Tian
9636b618b1 Bug 1192693 - [03] Remove bluetooth1 code from backend, r=tzimmermann 2015-08-17 15:30:37 +08:00
Birunthan Mohanathas
a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Jocelyn Liu
0d4e05f63a Bug 1167064 - Patch1: Switch to bluetooth APIv2. r=shuang 2015-06-16 09:38:50 +08:00
Shawn Huang
434fcb6904 Backed out changesets 0832ffdd8144 for Bug 1167064 2015-06-15 19:05:03 +08:00
Jocelyn Liu
3ded2db982 Bug 1167064 - Patch1: Switch to bluetooth APIv2. r=shuang 2015-06-15 17:11:35 +08:00
Ryan VanderMeulen
c0c862683b Backed out changeset 150544a28405 (bug 1167064) for B2G mochitest failures. 2015-06-08 15:41:26 -04:00
Jocelyn Liu
cbe97e5b2b Bug 1167064 - Switch to bluetooth APIv2. r=shuang 2015-06-04 02:59:00 -04:00
Shawn Huang
76d664e594 Bug 1160127 - Send HFP/A2DP profile disconnection notification, r=btian 2015-05-11 11:47:31 +08:00
Thomas Zimmermann
a9b8c25faa Bug 1159267: Share Bluedroid's A2DP manager between Bluetooth v1 and v2, r=btian
Bluedroid's A2DP manager is the same for Bluetooth v1 and v2, except
fixes for bug 1062697 and bug 1148311 in v1. This patch merges both
variants. The last remaining difference is a call to |DistributeSignal|,
which differs between both implementations.
2015-05-06 09:58:04 +02:00
Andrew McCreight
9e8f4b219e Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Shawn Huang
548f72bad6 Bug 1143925 - Avoid crash for HFP/A2DP manager during restart daemon. r=tzimmermann 2015-04-30 05:14:00 -04:00
Thomas Zimmermann
7abceb7651 Bug 1146355: Prepare Bluetooth A2DP manager, r=joliu 2015-04-09 15:57:41 +02:00
Shawn Huang
64649e4ccf Bug 1148311 - Handle AVRCP app settings notification response. r=tzimmermann 2015-03-30 05:46:00 -04:00
Shawn Huang
98c2945d66 Bug 1142417 - Truncate AVRCP meta data strings followed by BTRC_MAX_ATTR_STR_LEN. r=tzimmermann
--HG--
extra : histedit_source : 8e78f1f680b6c08c4f65f2049ab51dce32d7df0f
2015-03-27 07:08:00 -04:00
Ehsan Akhgari
883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Thomas Zimmermann
41cc33c0c2 Bug 1142132: Move helper classes of A2DP manager into manager's namespace, r=shuang
Keeping helper classes in Bluetooth's C++ namespace creates collisions
between symbols of different managers' helpers. Moving A2DP helpers into
the namespace of |BluetoothA2dpManager| fixes this problem for A2DP.
2015-03-12 13:07:32 +01:00
Thomas Zimmermann
13ab04a400 Bug 1132229: Survive crashes of bluetoothd, r=shuang
With this patch, Gecko will handle crashes of bluetoothd by clearing its
internal state. Switching Bluetooth off and on restarts the daemon and
the Bluetooth sub-system.
2015-02-26 09:52:45 +01:00
Thomas Zimmermann
a4ed330ba0 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
Shawn Huang
a27ae2d2d4 Bug 1062697 - Initialize avrcp play status using the proper value, disable AvRCP 1.5. r=btian 2014-09-24 03:36:00 -04:00
Thomas Zimmermann
fedc29b918 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
46e6f7feba 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
f17536cd4a 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
765250a67b 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
8fa4597127 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
d634b0fd10 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
5a658b2e3c 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
5e6ee3055d 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
d4a10240a2 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
ee587b2e81 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
4444130578 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
b3a1a811a5 Bug 1029390: Asynchronous AVRCP response interfaces, r=shuang 2014-07-23 07:56:23 +02:00
Thomas Zimmermann
55825543b8 Bug 1029390: Asynchronous A2DP connect/disconnect, r=shuang 2014-07-23 07:56:23 +02:00
Thomas Zimmermann
da7d3ecba0 Bug 1029390: Asynchronous init and cleanup of A2DP/AVRCP, r=shuang 2014-07-23 07:56:22 +02:00