Closed Bug 1180618 Opened 9 years ago Closed 9 years ago

Ringer is not managed by Audio Channel Service

Categories

(Firefox OS Graveyard :: Gaia::System::Audio Mgmt, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:2.5?, b2g-master verified)

VERIFIED FIXED
blocking-b2g 2.5?
Tracking Status
b2g-master --- verified

People

(Reporter: evanxd, Assigned: evanxd)

References

Details

(Whiteboard: permafail)

Attachments

(3 files)

STR:
1. Play music in Music app.
2. Call the phone device.
3. Call screen is showed.

Excepted result
Music is stopped, and ringer is playing.

Actual result
Music and ringer are playing at same time.
Blocks: 1130350
Don't why cannot make a phone call currently in the [1] build.

But this bug is probably related with bug 1183301, just like bug 1181982.

[1]:
Build ID               20150714160203
Gaia Revision          f38de9dfec23929ab4cd22ff733c67911676484d
Gaia Date              2015-07-15 08:55:09
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/d5025c151d17
Gecko Version          42.0a1
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150622.193834
Firmware Date          Mon Jun 22 19:38:45 EDT 2015
Bootloader             L1TC00011880
Depends on: 1181982
No longer depends on: 1181982
No longer blocks: 1130350
Summary: Ringer and Music are playing at same time. → Ringer is not managed by Audio Channel Service
Blocks: 1130350
Looks like the root cause is that System app doesn't receive "mozSystemWindowChromeEvent" event form gecko.
We also need to change gecko code[1]
```
this.sendChromeEvent({
  type: 'system-audiochannel-state-changed',
  name: channel.name,
  isActive: evt.target.result
});
```
to
```
SystemAppProxy._sendCustomEvent('mozSystemWindowChromeEvent', {
  type: 'system-audiochannel-state-changed',
  name: channel.name,
  isActive: evt.target.result
});
```
for having consistent mozChromeEvent name called mozSystemWindowChromeEvent.

[1]: https://dxr.mozilla.org/mozilla-central/source/b2g/chrome/content/shell.js#588-592
Blocks: 1188754
Depends on: 1188762
Update patch[1]: Listen mozSystemWindowChromeEvent event to handle system audio channels.

[1]: https://github.com/evanxd/gaia/commit/4204da4b1cafecaa1ded5343bca9bb6aedc307d0
Depends on: 1167465
We already have a patch[1] for this bug. But the bug is just blocked by Bug 1167465.

[1]: https://github.com/evanxd/gaia/commit/7252c43a38c757f88d6e4cd45cd181330ee0b8d6
The patch[1] for exposing Audio Channels in System App's window is not working now. That still blocks this bug. Alastor is fixing that.

[1]: http://bugzil.la/1167465
Whiteboard: [2.5-aries-test-run-1][2.5-aries-test-run-2]
This bug still exists in OGA Music and NGA Music on Flame 2.5 latest build.
STR:
1. Play a music by OGA Music or NGA Music.
2. Incoming a call

Actual result:
Music and ringer are playing at same time.

Device:Flame 2.5(affected):
Build ID               20150927150205
Gaia Revision          285486b417f1cb8316b19c0698a6655fc053fbd6
Gaia Date              2015-09-25 14:11:30
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/6256ec9113c115141aab089c45ee69438884b680
Gecko Version          44.0a1
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150927.184956
Firmware Date          Sun Sep 27 18:50:08 EDT 2015
Firmware Version       v18D v4
Bootloader             L1TC000118D0
Blocks: 1205048
QA Whiteboard: [MGSEI-Triage+]
WIP patch: https://github.com/evanxd/gaia/commit/5559d0c1cc18f573bdfc1840120e9e4ba4001d47

The patch already fix the issue, then we need to remove useless coded.
Whiteboard: [2.5-aries-test-run-1][2.5-aries-test-run-2] → [2.5-aries-test-run-1][2.5-aries-test-run-2], permafail
Whiteboard: [2.5-aries-test-run-1][2.5-aries-test-run-2], permafail → permafail
[Blocking Requested - why for this release]:
No longer blocks: 1205048
blocking-b2g: --- → 2.5?
Comment on attachment 8639748 [details] [review]
[gaia] evanxd:bug-1180618 > mozilla-b2g:master

Hi Alastor,

Could you review the patch?

Thanks.
Attachment #8639748 - Flags: review?(alwu)
Hi, Evan,
I think you post the wrong link, this link is about the try result of the bug1199420.
Updated patch[1] to fix failed Gij tasks and remove useless code.

[1]: https://github.com/evanxd/gaia/commit/84e11a6036ea38495083bbb831d9b3c3a6348e75
Hi Alastor,

Looks like I already fixed the failed Gij tasks.

Please help to continue to review the patch.

Thanks.
Flags: needinfo?(alwu)
Flags: needinfo?(alwu)
Attachment #8639748 - Flags: review?(alwu) → review+
Evan, it looks like you rewrite the logic when the sound is played by System app? The patch here doesn't match the problem you described in comment 2. Could you write down the actual problem and why do we need to fix in this way? Thanks.
Flags: needinfo?(evan)
Blocks: 1206621
Gecko exported allowed audio channels in System App's Window in Bug 1167465.

It means that System app can access its allowed audio channels directly. For example, we can do `navigator.mozAudioChannelManager.allowedAudioChannels` to get all audio channels in System app. (It's only for System app)

So no need to depend on `mozSystemWindowChromeEvent` to get or control System app's allowed audio channels.
Flags: needinfo?(evan)
Alastor, thanks for the review.
master: https://github.com/mozilla-b2g/gaia/commit/5eebe01a8c33d7f0b8713370decce81b76a61799
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
This bug has been verified as "pass" on the latest build of Flame KK 2.5 and Aries KK 2.5 by the STR in comment 0 .

Actual results: Music is stopped, and ringer is playing.
See attachment: verified_logcat_1811.txt, verified_Aries_KK v2.5.3gp.
Reproduce rate: 0/10.

Device: Flame KK 2.5 (Pass)
Build ID               20151020150236
Gaia Revision          11eb5d4cb2675d359d277ae17772bc75f7ccedbc
Gaia Date              2015-10-20 16:22:28
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/f397034950304b845175f8dab8fccbdd0e8bf995
Gecko Version          44.0a1
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20151020.182846
Firmware Date          Tue Oct 20 18:28:58 EDT 2015
Firmware Version       v18D v4
Bootloader             L1TC000118D0

Device: Aries KK 2.5 (Pass)
Build ID               20151020225607
Gaia Revision          11eb5d4cb2675d359d277ae17772bc75f7ccedbc
Gaia Date              2015-10-20 16:22:28
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/f397034950304b845175f8dab8fccbdd0e8bf995
Gecko Version          44.0a1
Device Name            aries
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.worker.20151020.221418
Firmware Date          Tue Oct 20 22:14:26 UTC 2015
Bootloader             s1
Status: RESOLVED → VERIFIED
Depends on: 1220320
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: