Closed Bug 1156229 Opened 10 years ago Closed 10 years ago

Support Bluetooth v2 on L

Categories

(Firefox OS Graveyard :: Bluetooth, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(firefox40 fixed)

RESOLVED FIXED
2.2 S11 (1may)
Tracking Status
firefox40 --- fixed

People

(Reporter: tzimmermann, Assigned: tzimmermann)

References

Details

Attachments

(2 files, 2 obsolete files)

We should be able to build Bluetooth v2 on L.
Most of these cases were originally fixed in bug 1137151.
Attachment #8594700 - Flags: review?(btian)
These two patches allowed to build Bluetooth v2 on nexus-5-l.
Comment on attachment 8594700 [details] [diff] [review] [01] Bug 1156229: Make ref-counted class destructors non-public Review of attachment 8594700 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/bluetooth/bluedroid/BluetoothGattManager.cpp @@ +208,5 @@ > + mReadCharacteristicState.Reset(); > + mWriteCharacteristicState.Reset(); > + mReadDescriptorState.Reset(); > + mWriteDescriptorState.Reset(); > + } Hi Thomas, Just FYI, this destructor will be removed by Bug 1063444 since I found out it's actually redundant when reviewing Bug 1063444.
Comment on attachment 8594700 [details] [diff] [review] [01] Bug 1156229: Make ref-counted class destructors non-public Review of attachment 8594700 [details] [diff] [review]: ----------------------------------------------------------------- Steal this review since there are only few lines left after I took a look at GattManager.cpp/h. ;)
Attachment #8594700 - Flags: review?(btian) → review?(joliu)
I think, ref-counted classes will need a non-public destructor, even if it's empty. If this destructor gets removed, I'll add an empty one.
Notes - fix virtual ~BluetoothGATTManager in [01] - protect helpers by BT_API_V2 in [02]
Comment on attachment 8594700 [details] [diff] [review] [01] Bug 1156229: Make ref-counted class destructors non-public Review of attachment 8594700 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/bluetooth/bluedroid/BluetoothGattManager.cpp @@ +208,5 @@ > + mReadCharacteristicState.Reset(); > + mWriteCharacteristicState.Reset(); > + mReadDescriptorState.Reset(); > + mWriteDescriptorState.Reset(); > + } Per Comment 6, let's make it empty. ::: dom/bluetooth/bluedroid/BluetoothGattManager.h @@ +84,5 @@ > const nsTArray<uint8_t>& aValue, > BluetoothReplyRunnable* aRunnable); > > private: > + virtual ~BluetoothGattManager(); Per irc discussion, agreed there's no point to use virtual since this class is final.
Attachment #8594700 - Flags: review?(joliu) → review+
Comment on attachment 8594701 [details] [diff] [review] [02] Bug 1156229: Update GATT support to include Android L Review of attachment 8594701 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/bluetooth/bluedroid/BluetoothGattHALInterface.cpp @@ +513,5 @@ > void > BluetoothGattClientHALInterface::Scan( > int aClientIf, bool aStart, BluetoothGattClientResultHandler* aRes) > { > +#if ANDROID_VERSION >= 20 Should be 21 here and the rest of this patch. @@ +1039,5 @@ > + /* FIXME: This method allocates a large amount of memory on the > + * stack. It should be rewritten to prevent the pending stack > + * overflow. Additionally |ArrayBuffer| seems like the wrong data > + * type here. Why not use plain pointers instead? > + */ Yes, no need to be an ArrayBuffer type here. Also, we currently don't use this function since it's related to peripheral mode. Peripheral mode will be supported later after we finish the first edition of GATT implementation. I think we could fix it when we implement peripheral mode support.
Attachment #8594701 - Flags: review?(joliu) → review+
Blocks: 1156716
Changes since v1: - fixed virtual constructor - empty constructor
Attachment #8594700 - Attachment is obsolete: true
Attachment #8595787 - Flags: review+
Changes since v1: - depend on ANDROID_VERSION >= 21
Attachment #8594701 - Attachment is obsolete: true
Attachment #8595788 - Flags: review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.2 S11 (1may)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: