[Settings] Ring tone for message is truncated

RESOLVED WONTFIX

Status

Firefox OS
Gaia::SMS
RESOLVED WONTFIX
5 years ago
a year ago

People

(Reporter: atsai, Assigned: abhishekgarg119, Mentored)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [lang=js][good first bug])

(Reporter)

Description

5 years ago
Message ring tone is truncated.

[STR]
1. Launch "Seetings" -> "Sound"
2. Change the tones for Alert to "Minimal Bands"
3. Send a message to the device

[Expected Result]
*. You'll hear the same ring tone in step 2. and step 3

[Actual Result]
*. ring tone at step 3 is truncated

[Environment]
DuT:      Buri
Gaia:     d4b9a3d271f0451b4d903a03c2b931b8cc092041
Gecko:    http://hg.mozilla.org/mozilla-central/rev/6ecf0c4dfcbe
BuildID   20131127040203
Version   28.0a1
ro.build.version.incremental=eng.archermind.20131114.105818
Al - I don't fully understand this bug. Can you clarify what you mean by truncated?
Flags: needinfo?(atsai)
(Reporter)

Comment 2

5 years ago
Have you try the STR and compare the sound you hear in step 2 and 3? The real sound is a little bit shorter than the one in settings app.
Flags: needinfo?(atsai)
Can someone check if this reproduces on 1.2 or 1.1?
Keywords: qawanted
(Reporter)

Comment 4

5 years ago
Same on the v1.2.

Gaia:     1b67b551be11daf33dad8387a7153cc52e5cefa2
Gecko:    http://hg.mozilla.org/releases/mozilla-b2g26_v1_2/rev/87c5634a3404
BuildID   20131128004001
Version   26.0
ro.build.version.incremental=eng.archermind.20131114.105818

There's no such option in v1.1.
Keywords: qawanted
(In reply to Al Tsai [:atsai] from comment #4)
> Same on the v1.2.
> 
> Gaia:     1b67b551be11daf33dad8387a7153cc52e5cefa2
> Gecko:    http://hg.mozilla.org/releases/mozilla-b2g26_v1_2/rev/87c5634a3404
> BuildID   20131128004001
> Version   26.0
> ro.build.version.incremental=eng.archermind.20131114.105818
> 
> There's no such option in v1.1.

How is there no such option on this? I would expect that you would have the ability to playback a ringtone via the settings app as past releases.
(Reporter)

Comment 6

5 years ago
(In reply to Jason Smith [:jsmith] from comment #5)
> (In reply to Al Tsai [:atsai] from comment #4)
> > Same on the v1.2.
> > 
> > Gaia:     1b67b551be11daf33dad8387a7153cc52e5cefa2
> > Gecko:    http://hg.mozilla.org/releases/mozilla-b2g26_v1_2/rev/87c5634a3404
> > BuildID   20131128004001
> > Version   26.0
> > ro.build.version.incremental=eng.archermind.20131114.105818
> > 
> > There's no such option in v1.1.
> 
> How is there no such option on this? I would expect that you would have the
> ability to playback a ringtone via the settings app as past releases.

Oops. Sorry for my poor English. Please let me rephrase my sentences.

The situation also happens on v1.2 and v1.1, and it should be caused by the timeout function.
https://github.com/mozilla-b2g/gaia/blob/master/apps/sms/js/notify.js#L38

We might need to extend the time to play the sound, or to remove those sounds longer than two seconds.

I'd like not to raise as v1.3? due to it doesn't block user to use the phone. Will prefer to solve it on master after v1.3 branch out.

Updated

5 years ago
Component: General → Gaia::SMS
This is still happening.

The timeout is still done at [1].
Note this path is only used when we don't send a notification -- this means when we receive a message for a conversation we're consulting.
When we send a notification, the sound is played by the System app. They also have a timeout but it's twice as long (see [2]). It used to be 2sec as well, but it was changed in bug 957224.

I'd say the right way would be to wait until the end of the ringtone, but it's better to have the same behavior than the System app here.

[1] https://github.com/mozilla-b2g/gaia/blob/master/apps/sms/views/shared/js/notify.js#L64
[2] https://github.com/mozilla-b2g/gaia/blob/1a4af5ddbaed8a2ad4ed1b4f22c69c5a02c759a1/apps/system/js/notification_screen.js#L567
Very easy bug for a new contributor. Will need to add unit tests in views/shared/test/unit/notify_test.js using `this.sinon.clock.tick` [1] (the fake timer is already setup in the test file).

[1] http://sinonjs.org/docs/#clock
Mentor: felash
Whiteboard: [lang=js][good first bug]
See Also: → bug 957224
(Assignee)

Comment 9

2 years ago
Hey, i am new to mozilla and want to work on this bug. Can you please assign it to me?
Thanks.
Assigning to you.

Check out this for the setting up environment and other details.
https://github.com/mozilla-b2g/gaia/blob/master/apps/sms/README.md

You can comment here or come over irc channel (#fxos), if you have any doubt. 

Thanks
Assignee: nobody → abhishekgarg119
(Assignee)

Comment 11

2 years ago
dd
Flags: needinfo?(rishav006)
(Assignee)

Comment 12

2 years ago
Sorry for comment 11, made it by mistake.
I am having difficulty running gaia on my android device. Adb root command is taking too long. I have tried many options to solve this problem, but none has worked so for. Do you have any idea how to solve this problem?
Flags: needinfo?(atsai)
Hey,

We'd need a little more information about your environment. We don't really support well running the Messages app on B2G Droid. I'd suggest following the README.md and simulate a new message running "MessageManager.onMessageReceived({ message: { < insert something meaningful here > } })"
Flags: needinfo?(rishav006)
(Reporter)

Comment 14

2 years ago
I was out due to Chinese New Year. Hopefully comment 13 solved your question. :)
Flags: needinfo?(atsai)
Mass closing of Gaia::SMS bugs. End of an era :(
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → WONTFIX
Mass closing of Gaia::SMS bugs. End of an era :(
You need to log in before you can comment on or make changes to this bug.