Closed Bug 899949 Opened 11 years ago Closed 11 years ago

[b2g-bluetooth] Failed to disconnect A2DP when turning off Bluetooth

Categories

(Firefox OS Graveyard :: Bluetooth, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: gyeh, Assigned: gyeh)

References

Details

(Whiteboard: [fixed-in-birch])

Attachments

(1 file, 1 obsolete file)

We try to disconnect all profiles before turning off Bluetooth, however, it failed to disconnect A2DP.
Blocks: 891257
Here's the problem: when handling change of mozsettings, |gToggleInProgress| will be set to true to prevent other incoming actions. Then, we tried to close all profile sockets. However, the assertion will be failed in the following lines since gToggleInProgress is false and IsToggling() returns true.

 BluetoothDBusService::SendSinkMessage(const nsAString& aDeviceAddress,
                                       const nsAString& aMessage)
 {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(mConnection);

   NS_ENSURE_TRUE(IsReady(), NS_ERROR_FAILURE);
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Attached patch Patch 1(v1): Check enable status (obsolete) — Splinter Review
Eric, please help to review this patch. Thanks.
Assignee: nobody → gyeh
Attachment #783687 - Flags: review?(echou)
Comment on attachment 783687 [details] [diff] [review]
Patch 1(v1): Check enable status

Review of attachment 783687 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good. Additionally, it seems that we should file a cleanup bug to see if IsReady() is still needed for every single function.
Attachment #783687 - Flags: review?(echou) → review+
https://hg.mozilla.org/mozilla-central/rev/67401b1684e1
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: