Closed Bug 1032651 Opened 10 years ago Closed 10 years ago

[Gaia] CMAS on/off toggle in Settings

Categories

(Firefox OS Graveyard :: Gaia::Settings, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(feature-b2g:2.1)

RESOLVED FIXED
2.1 S2 (15aug)
feature-b2g 2.1

People

(Reporter: howie, Assigned: gasolin)

References

Details

(Whiteboard: [p=3])

Attachments

(2 files)

To implement a CMAS on/off toggle in Settings.
Blocks: 1023684
Hi Arthur, please reassign if needed, thanks.
Assignee: nobody → arthur.chen
feature-b2g: --- → 2.1
Hi jenny, could you help provide related UI spec?
Flags: needinfo?(jelee)
You can find it here: bug 1026685 attachment 8452848 [details] 
Note that all future spec update will be posted in the bug too, thanks!
Flags: needinfo?(jelee)
Attached image CMAS settings (deleted) —
Thanks jenny!

According to the spec, the requirement is add `Emergency Alert` toggle under `Message Settings` panel > `Cell Broadcast Messages` section.
Assignee: arthur.chen → gasolin
@Bruce I'd like confirm the dependency between `Cell Broadcast` toggle and `Emergency Alert` toggle.

Does the following rule correct?

1. When Cell Broadcast is disabled, Emergency Alert is disabled as well
2. When Cell Broadcast is enabled, Emergency Alert get's its pref state and can be toggled
Flags: needinfo?(bhuang)
got the confirm in bug 1026685 comment 11

1. Two toggles, CB and CMAS
2. When CB on, user can turn on/off the CMAS
3. When CB off, CMAS is also off for sure.

I'd use 'ril.cellbroadcast.cmas.disabled' as mozSettings key in UI if no objection.
Flags: needinfo?(bhuang)
Attached file pull request redirect to github (deleted) —
Implement above requirement, add following rule:

* When CB on, CMAS state will be retained to the state before CB off.
(if CMAS is on before CB off, after CB on, CMAS will be on as well)

with marionette test
Attachment #8464400 - Flags: review?(arthur.chen)
Note this patch does not include `SIM settings` panel and the multiple SIMs sub panels described in UI spec
BTW, The wording is corrected by following Title wording rule described in bug 936398
Comment on attachment 8464400 [details]
pull request redirect to github

Thanks for the patch. Please check my comments in github.
Attachment #8464400 - Flags: review?(arthur.chen)
as bug 1026685 comment 21, The CMAS settings key would be 'cmas.enabled'
Comment on attachment 8464400 [details]
pull request redirect to github

The update includes

- Add CMAS disabled when CB off rule.
- Use asyncStorage to remember last CMAS state when CB off
- add marionette test for CB/CMAS dependency
Attachment #8464400 - Flags: review?(arthur.chen)
Attachment #8464400 - Flags: feedback?(ejchen)
Whiteboard: [p=2]
Target Milestone: --- → 2.1 S1 (1aug)
Comment on attachment 8464400 [details]
pull request redirect to github

Hi Fred,

please check my comments on Github ! Thanks :)
Attachment #8464400 - Flags: feedback?(ejchen)
Comment on attachment 8464400 [details]
pull request redirect to github

Please check my comments in github, thanks.
Attachment #8464400 - Flags: review?(arthur.chen)
Comment on attachment 8464400 [details]
pull request redirect to github

The logic is revised to make CMAS totally count on CBS, which lead to simpler code \o/

please kindly review it again
Attachment #8464400 - Flags: review?(arthur.chen)
Attachment #8464400 - Flags: feedback?(ejchen)
Comment on attachment 8464400 [details]
pull request redirect to github

There is one last issue to be addressed before merging. AsyncStorage supports storing arrays, please check my github comments.
Attachment #8464400 - Flags: review?(arthur.chen)
Comment on attachment 8464400 [details]
pull request redirect to github

changed to write array directly into asyncStorage, please kindly review it again
Attachment #8464400 - Flags: feedback?(ejchen) → review?(arthur.chen)
Comment on attachment 8464400 [details]
pull request redirect to github

r=me with the nits addressed. Please squash the commits before merging, thanks!
Attachment #8464400 - Flags: review?(arthur.chen) → review+
TBPL test passed,
merged to gaia master https://github.com/mozilla-b2g/gaia/commit/aab6b29f304d4bea7fd6e03dc661f86f9a8d4e9b

thanks!
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [p=2] → [p=3]
Target Milestone: 2.1 S1 (1aug) → 2.1 S2 (15aug)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: