New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[qmf-notifications-plugin] Don't emit email_exists for every received… #2
base: master
Are you sure you want to change the base?
Conversation
… email, only for the summary.
|
@pvuorela, I don't have access to |
|
I'm not sure if this is the right thing here. First off all, should mention the rationale in the commit message so it's available later on. Now only the summary line might get people looking the git history puzzled. The "email" feedback should exist in the same /usr/share/ngfd/events.d/email.ini file. Earlier we used to have separate files for each feedback but now related ones are merged. The summary notification is transient. Thus I'd think the feedback should be stopped when it disappears, thus doesn't feel proper for led. It's maybe a bit surprising that now the email_exists has the sound set too. History on the email.ini from 2018 seems to be |
Yeh, sorry, I should have put a commit message, but since it's not corresponding to what is in public ngfd repo, I was a bit undecide. In ngfd repo, "email_exists" basically do nothing and "email" is playing the email tone, and a beep in short mode. Which then is consistent with the current code here (before PR). While, email and email_exists are overwritten from the private
Running ngfd in debug mode returns this for "email" feedback: That's why I think that the "email" feedback is not working (and no sound is emitted either).
Indeed, and since this "email_exists" is emitted for every new email, it creates a lot of play, then stop, then play, then stop… requests in ngfd. Thus the PR. But as I mentioned in the first comment, a better fix maybe in the overriding ini files from the private repo. |
|
When looking at the phone Should it be For reference, there is a similar |
|
cc @jusa too |
|
Did some testing myself, mostly with notification test app. Didn't go checking ngfd debugs so far. The email feedback does seem to work, as in it plays the vibra. But nothing else. That's confusing. I would expect the _exists to turn on the led and plain email playing the vibra and the sound. Second, the "// App is on screen beep only" case doesn't indeed seem to work as beep. And why should it, there's nothing requesting a beep mode there. For comparison the SMS case seems to have some play.mode = foreground setting on the event. But thinking if it would be simpler to have a totally different feedback for that case, or alternatively just play a named tone or file. |
|
Created an internal bug. Guess we should make the definitions saner in the event config side. |
I agree with you. But at the moment, "email_exists" is sent to ngfd for every received email. So a sync that retrieve twenty emails, will ask over DBus 20 times to play "email_exists". If we ask for a vibration there, it will actually vibrate a lot !
Well actually if you change the
I agree. Would it make sense to actually move the ngfd rule files for email and email_exists in this qmf-notifications-plugin repo to see the consistency between the rule and the notification emission ? Or is it too linked to Android workarounds (besides logic definition, that's the only difference I spot in the file with the one coming from ngfd repo), so it must stay Jolla specific ? |
|
Oh and I forgot, but the main motivation (from my side) is to avoid to ask to play a sound 20 times in a row as with the current scheme, because I suspect it can be the source for a race in gstreamer plugin that stucks ngfd. |
Sure. But perhaps not that much problem if that would only do the led. Sure there's some redundancy if we assume what the feedbacks do, but then again "exists" should be there as long as some of the email notifications exist, right? Thus it would need to be set for all.
Perhaps that's the problem, missing the mode being set on the parameters.
Not sure. If it's defined here perhaps it could be without the extra feedback definition altogether. |
… email, only for the summary.
The "email_exists" kind of feedback is emiting sound and led pattern as defined in
jolla-common-configurationsprivate repo (but not in ngfd repo), while the "email" feedback is not existing. This PR should do the following:Currently, the following is happening:
[1612.18446744073709551183] INFO: dbus: >> stop received for id '1'immediately followed by[1612.18446744073709551184] INFO: dbus: >> play received for event 'email_exists' with id '2' (client :1.268 : 2 active request(s))). Ngfd is kind enough to stop the email ringing and plays only the last one.jolla-common-configurations.The current PR is highlighting a bug though : the feedback should be a simple "beep" when we are already in the email client (like for the message application), but it is actually ringing full email sound at the moment. With the PR, the full email sound is not emitted anymore (since it was emitted because of the notification hint for each email) but the beep is not working either, because it is using the "email" hint which does not exist in
jolla-common-configurations.@pvuorela , what do you think about these changes ? I still can't reproduce the hanging bug in ngfd, but this may be a source of it : maybe when receiving lots of emails, stopping the playback in the gstreamer thread and restarting it repeatedly may be the cause ?