Closed Bug 879671 Opened 11 years ago Closed 11 years ago

B2G RIL: Add on-off switch for Cell Broadcast functions

Categories

(Core :: DOM: Device Interfaces, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24
blocking-b2g leo+
Tracking Status
firefox22 --- wontfix
firefox23 --- wontfix
firefox24 --- fixed
b2g18 --- fixed
b2g18-v1.0.0 --- wontfix
b2g18-v1.0.1 --- wontfix
b2g-v1.1hd --- fixed

People

(Reporter: vicamo, Assigned: vicamo)

References

Details

(Whiteboard: [fixed-in-birch])

Attachments

(4 files, 1 obsolete file)

This is Gecko part work for bug 874796, user story for enable/disable Cell Broadcast.
In latest update in bug 874796 comment 8, "All channels - emergency and non-emergency channels should be switched on/off with this single option as per agreement with Operator."

We'll introduce a new boolean, default false, Settings entry "ril.cellbroadcast.disabled" to turn off Cell Broadcast completely even with non-empty CBMI/CBMID/CBMIR/MMI ("ril.cellbroadcast.searchlist") settings.
Assignee: nobody → vyang
blocking-b2g: --- → leo?
Blocking a blocker, marking it leo+ .
blocking-b2g: leo? → leo+
Attached patch m-c patch 1/2Splinter Review
Refactor setDebugEnabled to setInitialOptions.  We always need a way to pre-set some parameters to ril_work at the very beginning stage.  DEBUG flag and CLIENT_ID are two examples.  Another new parameter, Cell Broadcast Disabled, is going to be added in the second patch.
Attachment #759345 - Flags: review?(allstars.chh)
Attachment #759345 - Attachment description: m-c patch → m-c patch 1/2
Attached patch m-c patch 2/2 (obsolete) — Splinter Review
Implement "ril.cellbroadcast.disabled" that works as both Settings and Preference.  This parameter suggests RIL to disable CB function as possible.  On failure to disable/enable CB, the preference will not be rolled back to its original value.
Attachment #759350 - Flags: review?(allstars.chh)
Attached patch b2g18 patch 1/2Splinter Review
Attached patch b2g18 patch 2/2Splinter Review
Blocks: 879630
Comment on attachment 759350 [details] [diff] [review]
m-c patch 2/2

Review of attachment 759350 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/system/gonk/RadioInterfaceLayer.js
@@ +1953,5 @@
>          let setting = JSON.parse(data);
>          this.handleSettingsChange(setting.key, setting.value, setting.message);
>          break;
> +      case kPrefenceChangedObserverTopic:
> +        if (data == kCellBroadcastDisabled) {

can we use === ?
Attachment #759350 - Flags: review?(allstars.chh) → review+
Attachment #759345 - Flags: review?(allstars.chh) → review+
1) address review comments
2) fix unable to deactivate CB when search list is completely empty.
Attachment #759641 - Flags: review+
Attachment #759350 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/2fee4d3f4941
https://hg.mozilla.org/mozilla-central/rev/fb94126589a7
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
Flags: in-moztrap-
Hi Vicamo, why are you toggling on the preference rather than the setting?  The situation seems very similar, if not the same, as ril.radio.disabled but the solution is different.  Why is that?
Flags: needinfo?(vyang)
(In reply to Michael Schwartz [:m4] from comment #13)
> Hi Vicamo, why are you toggling on the preference rather than the setting? 
> The situation seems very similar, if not the same, as ril.radio.disabled but
> the solution is different.  Why is that?

Because desktop Firefox may not have Settings correctly setup.  We map Settings entries to preferences whenever possible so that we may implement that same function on desktop some day.
Flags: needinfo?(vyang)
Blocks: 1008501
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: