Closed Bug 988427 Opened 11 years ago Closed 11 years ago

Allow audio-channel-ringer to be used by |privileged| apps

Categories

(Firefox OS Graveyard :: General, defect)

defect
Not set
normal

Tracking

(feature-b2g:2.0)

RESOLVED FIXED
2.0 S2 (23may)
feature-b2g 2.0

People

(Reporter: oteo, Assigned: ferjm)

References

Details

Attachments

(1 file)

In order to allow third party apps to implement dialer-like application it would be nice to allow privileged app to use the audio-channel-ringer
Paul, what do you think ?
Flags: needinfo?(ptheriault)
So this permission is relatively low risk compared to other APIs. The risk is mainly that of DoS - i.e. one app doesn't release the channel (either deliberately or maliciously) and this stops your phone from ringing. Basically it just comes down to what is the plan when these apps compete with phone calls (and vice versa) - did you have a plan for that scenario? The risks I see are: 1. App stops your phone from ringing: This is mainly taken care of by however we solve the attention permission, since when two apps have the same audio priority, the foreground case wins (at least according to [1]). The system app would need logic though to make itself foreground in this case (maybe that is how attention screen already works, I dont know) 2. An app that is background silences telephony (and all other) audio: Ringer channel is higher than everything else (except public notification), I think that this means that if an app plays content on the ringer channel it stops you listening to phone calls ,and the there no indication to the user, which app is blocking audio. (It isnt clear from [1] what happens to audio on foreground app using audio-channel-telephony when a background app plays audio on audio-channel-ringer. Does the telephony get paused since ringer is higher? I assume so.) Does this concern you? What (if anything) can be done to stop apps from interfering with phone calls (both ringer and audio)? To me it seems like if you get a real phone call, the system app should always be able to use the ringer channel to notify you of the call. Is that not the case? Or maybe what I am asking for is some context as to why the app specifically needs ringer, rather than something lower (but still higher than content). Or am I overlooking some details of the competing audio policy here? [1] https://wiki.mozilla.org/WebAPI/AudioChannels#Audio_Competing_Policy
Also ni? UX team for the use case. Does loop client really need to take audio-channel-ringer or does it just use the existing notification or audio content to notify the user on the loop client call. We need to come up the conclusion as early as possible so that the right change can be made for the loop client in Forefox OS 2.0 time frame (before June 6, 2014)
Flags: needinfo?(firefoxos-ux-bugzilla)
(In reply to Paul Theriault [:pauljt] from comment #2) > So this permission is relatively low risk compared to other APIs. The risk > is mainly that of DoS - i.e. one app doesn't release the channel (either > deliberately or maliciously) and this stops your phone from ringing. > > Basically it just comes down to what is the plan when these apps compete > with phone calls (and vice versa) - did you have a plan for that scenario? The goal is that all calls (regardless if it's a phone call or loop one) have the same privileges in Gaia level and audio policy. It means that all apps which are declared explicitly as 'communications' app should have the same access to Attention Screen & Audio Channels. > 2. An app that is background silences telephony (and all other) audio: > Ringer channel is higher than everything else (except public notification), > I think that this means that if an app plays content on the ringer channel > it stops you listening to phone calls ,and the there no indication to the > user, which app is blocking audio. (It isnt clear from [1] what happens to > audio on foreground app using audio-channel-telephony when a background app > plays audio on audio-channel-ringer. Does the telephony get paused since > ringer is higher? I assume so.) In this case if the ringer appears the sound of telephony is not stopped (there is a fading). Try to download this branch: https://github.com/borjasalguero/gaia/tree/loop_test_poc There you could check all the channels and see how they interact between them using the all called 'Loop Test' Why to use the 'ringer' and not 'content'? Because 'content' is tied to the volume of the multimedia resources, for example the volume of the Music App or the Video App. However, when receiving a call (regardless the origin) we have a notification, which should be muted or not using the regular audio channel for notifications (check Settings > Sound > Ringer & Notification). As a basic example you can think about the following. Having your device in 'Silence mode' does not means that you can not reproduce music (actually I can listen music with Firefox OS in the office because of this! ;) ), and muting the music channel is not related with avoiding call notifications. We need to keep the same for all communication providers, in this case Loop, for ensuring the right user experience when using the audio channels.
(In reply to Paul Theriault [:pauljt] from comment #2) > The risks I see are: > 1. App stops your phone from ringing: ... since when two apps have the same > audio priority, the foreground case wins (at least according to [1]). No, in this case both of applications can play audio in the same time. The "foreground wins" is only applied to content channels. > > 2. An app that is background silences telephony (and all other) audio: > ... Does the telephony get paused since ringer is higher? I assume so.) Yes, it is the current design. Refer to comment 4 about fading, we did this effect between "notification" and "content/normal channel" already. But it is not applied to channels between "ringer" & "telephony". I can image that an app tries to play an audio with ringer channel silently then user will find all of music and notification are muted. And user don't know the reason. Maybe the prompt can notify user which apps try to use telephony or ringer channel then user may know to remove annoy one.
Flagging Derrin who has taken over UX for Loop.
Flags: needinfo?(firefoxos-ux-bugzilla) → needinfo?(dhenein)
Flags: in-moztrap?(jsmith)
feature-b2g: --- → 2.0
Attached patch v1Splinter Review
Assignee: nobody → ferjmoreno
Attachment #8424779 - Flags: review?(ptheriault)
Attachment #8424779 - Flags: review?(fabrice)
Comment on attachment 8424779 [details] [diff] [review] v1 Review of attachment 8424779 [details] [diff] [review]: ----------------------------------------------------------------- r=me pending Paul approval.
Attachment #8424779 - Flags: review?(fabrice) → review+
Attachment #8424779 - Flags: review?(ptheriault) → review+
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.0 S2 (23may)
Flags: needinfo?(ptheriault)
Flags: needinfo?(dhenein)
Flags: in-moztrap?(jsmith)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: