Closed Bug 766895 Opened 12 years ago Closed 12 years ago

B2G RIL: Set ril.radio.disabled = false doesn't bring back data connection

Categories

(Core :: DOM: Device Interfaces, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME
blocking-kilimanjaro +
blocking-basecamp +

People

(Reporter: kanru, Assigned: jaoo)

References

Details

Attachments

(1 file, 1 obsolete file)

In airplane mode we set ril.radio.disabled = true to turn off radio. This has a side effect that also turns off the data connection. But ril.data.disabled is not reflecting this. It means ril.data.disabled == false but we lose data connection and when ril.radio.disabled = false again, ril.data.disabled is still false and the data connection is not back.
Good find! Definitely a blocker.
blocking-basecamp: --- → ?
blocking-kilimanjaro: --- → ?
(In reply to Kan-Ru Chen [:kanru] from comment #0)
> In airplane mode we set ril.radio.disabled = true to turn off radio. This
> has a side effect that also turns off the data connection. 

That's right!

> But ril.data.disabled is not reflecting this. It means ril.data.disabled ==
> false but we lose data connection and when ril.radio.disabled = false again,
> ril.data.disabled is still false and the data connection is not back.

I guess you mean 'ril.data.enabled'. Actually the key 'ril.data.disabled' does not exist in settings. Anyway you are right. When setting 'ril.radio.disable' to true the data call is automatically disconnected but the setting 'ril.data.enabled' does not reflect that change.

The desired behavior here (IMHO) should be: i) to set 'ril.data.enabled' to false when the user sets 'ril.radio.disable' to true because the data call is automatically disconnected and ii) to set the data call up again (if the old value of 'ril.data.enabled' was true) when the user sets 'ril.radio.disabled' to false.
blocking-basecamp: ? → +
blocking-kilimanjaro: ? → +
vliu, can you take a look at this please? Thanks!
Assignee: nobody → vliu
Attached patch WIP (obsolete) (deleted) — Splinter Review
Actually this patch does not solve the problem. This is what I have done after a quick look at it.
Looks like jaoo is taking care of this.
Assignee: vliu → josea.olivera
Comment on attachment 643206 [details] [diff] [review]
WIP

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

::: dom/system/gonk/RadioInterfaceLayer.js
@@ +907,5 @@
>          this._radioEnabled = !setting.value;
> +        if (this._isDataEnabled() && !this._radioEnabled) {
> +          gSettingsService.getLock().set("ril.data.enabled", false, this);
> +          gSettingsService.getLock().set("ril.data.enableOnRadioStateChange", true, this);
> +          // We save that information because the user might want to switch off the device.

Why do we need to save this information explicitly? This doesn't make sense to me.

Here's how I picture the situation: Ideally, when ril.radio.disabled is set to false, the radio turns back on, registers with the network, and we should automatically re-enable the data call. The question is: why does this not happen? Before we do anything else, we should answer this question. My suspicion is that somehow RILNetworkInterface doesn't realize the radio is shutting down and the data call has gone away, but it might be something else.
Attached patch WIP v1 (deleted) — Splinter Review
I am not sure that what I am attaching here it useful or not. This is the WIP I was before realizing something is fishy in data calls. I guess the first step would be to test latest changes for data calls on otoro-ics.
Attachment #643206 - Attachment is obsolete: true
(In reply to Kan-Ru Chen [:kanru] from comment #0)
> In airplane mode we set ril.radio.disabled = true to turn off radio. This
> has a side effect that also turns off the data connection. But
> ril.data.disabled is not reflecting this. It means ril.data.disabled ==
> false but we lose data connection and when ril.radio.disabled = false again,
> ril.data.disabled is still false and the data connection is not back.

I can't reproduce this. With my patch for bug 775359 applied and a working data connection, I enabled airplane mode and then disabled it again. The data connection came back. AFAICT, ril.data.enabled did not change value (which is what we expect). Resolving \o/
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: