[B2G] Manage the sound of the attention window

VERIFIED FIXED in Firefox OS master

Status

VERIFIED FIXED
3 years ago
3 years ago

People

(Reporter: evanxd, Assigned: evanxd)

Tracking

({regression, smoketest})

unspecified
FxOS-S3 (24Jul)
ARM
Gonk (Firefox OS)
regression, smoketest
Dependency tree / graph

Firefox Tracking Flags

(blocking-b2g:2.5+, b2g-master fixed)

Details

(Whiteboard: [dogfood-blocker])

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
STR:
1. Set alarm in Clock app.
2. Play music in Music app.
3. Alarm is ringing.

Excepted result:
Alarm is playing, but music is not.

Actual result:
Alarm and music are playing at same time.
(Assignee)

Comment 1

3 years ago
Looks like it is a gecko bug related with [1].

After applying the [2] patch and do the STR, you could see the below log.
```
I/GeckoConsole( 4261): Content JS LOG: bug 1181982: Music registers audio channels 
I/GeckoConsole( 4261): Content JS LOG: bug 1181982: audioChannels: [object BrowserElementAudioChannel],[object BrowserElementAudioChannel] 
I/GeckoConsole( 4261): Content JS LOG: bug 1181982: Clock registers audio channels 
I/GeckoConsole( 4261): Content JS LOG: bug 1181982: audioChannels: [object BrowserElementAudioChannel],[object BrowserElementAudioChannel] 
I/GeckoConsole( 4261): Content JS LOG: bug 1181982: clock.gaiamobile.org registers audio channels
```

The alarm attention window cannot get the `allowedAudioChannels`. Then the Audio Channel Service[3] cannot manage it. That's the root cause of this bug.

[1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1183301#c9
[2]: https://github.com/evanxd/gaia/commit/f38de9dfec23929ab4cd22ff733c67911676484d
[3]: https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/audio_channel_service.js
(Assignee)

Updated

3 years ago
Depends on: 1183301
(Assignee)

Updated

3 years ago
Assignee: evanxd → nobody
(Assignee)

Updated

3 years ago
Assignee: nobody → evanxd
Created attachment 8634629 [details] [review]
[gaia] evanxd:bug-1181982 > mozilla-b2g:master
(Assignee)

Comment 4

3 years ago
Discussed with Kan-Ru and Alastor offline, we need to wait for mozbrowserloadend to get allowedAudioChannels from browser element.
(Assignee)

Comment 5

3 years ago
Patch is ready for review. But need a reviewer.
(Assignee)

Comment 6

3 years ago
Comment on attachment 8634629 [details] [review]
[gaia] evanxd:bug-1181982 > mozilla-b2g:master

Hi Dominic,

Could you help to review the patch?

Thanks.
Attachment #8634629 - Flags: review?(dominic.kuo)
(Assignee)

Updated

3 years ago
Duplicate of this bug: 1184812

Updated

3 years ago
Duplicate of this bug: 1184303

Comment 9

3 years ago
Comment on attachment 8634629 [details] [review]
[gaia] evanxd:bug-1181982 > mozilla-b2g:master

Looks like we have to wait for mozbrowserloadend then can get correct allowedAudioChannels for app windows, and the patch does the right thing so looks good to me.
Attachment #8634629 - Flags: review?(dominic.kuo) → review+
(Assignee)

Comment 10

3 years ago
Dominic, thanks for the review. But the patch causes some Gij failures, go fixing the tests.
(Assignee)

Comment 11

3 years ago
First step, restart all treeherder tasks. The treeherder: https://treeherder.mozilla.org/#/jobs?repo=gaia&revision=ae307813f5a5fa988cb1044a285d82f32f4355c6
Blocks: 1183710
(Assignee)

Updated

3 years ago
Blocks: 1180618
(Assignee)

Updated

3 years ago
No longer blocks: 1183710
(Assignee)

Updated

3 years ago
No longer blocks: 1180618

Updated

3 years ago
Duplicate of this bug: 1186050

Comment 15

3 years ago
This bug can solve the problem that we can't manage the sound of the attention window.

For example, the alarm starts.
Summary: Alarm and Music are playing at same time. → [B2G] Manage the sound of the attention window
Carrying over the flags from dupe (bug 1186050)
blocking-b2g: --- → 2.5+
status-b2g-master: --- → affected
Keywords: regression, smoketest
(Assignee)

Comment 23

3 years ago
master: https://github.com/mozilla-b2g/gaia/commit/2ae9a4c6fa09567dd079a0907e35673f1813e402
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Whiteboard: [dogfood-blocker]
This issue is verified fixed on the latest Spark 2.5 build.
Alarms properly pause playing music before audibly sounding themselves, then un-pause the music when the alarm is dismissed.

Environmental Variables:
Device: Aries 2.5
Build ID: 20150724113133
Gaia: db299103dd17a873cba4ff88e62ec173bf80fe62
Gecko: 9bca608ab65a
Gonk: 2916e2368074b5383c80bf5a0fba3fc83ba310bd
Version: 42.0a1 (2.5)
Firmware Version: D5803_23.1.A.1.28_NCB.ftf
User Agent: Mozilla/5.0 (Mobile; rv:42.0) Gecko/42.0 Firefox/42.0
Status: RESOLVED → VERIFIED
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(onelson)
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(onelson)
See Also: → bug 1188790
status-b2g-master: affected → fixed
Target Milestone: --- → FxOS-S3 (24Jul)
You need to log in before you can comment on or make changes to this bug.