Tim,
This is an existing issue. Please see
https://bugzilla.mozilla.org/show_bug.cgi?id=729877. I'm just taking this one (for the Wifi part). Hopefully, it can be done in 1~2 weeks.
Thanks,
Gene
----- Original Message -----
> From: "Tim Guan-tin Chien" <
timd...@mozilla.com>
> To:
dev-...@lists.mozilla.org
> Cc: "Eric Chou" <
ec...@mozilla.com>, "Fabien Cazenave" <
ka...@mozilla.com>, "Kyle Machulis" <
kmac...@mozilla.com>
> Sent: Wednesday, July 11, 2012 2:31:29 PM
> Subject: [b2g] (mozBluetooth|mozWifiManager).setEnabled() and mozSettings
>
> (bcc dev-b2g@, please concentrate the discussion to dev-gaia@)
>
> Dear all,
>
> As I worked on Status Bar and Quick Settings, I found that turning
> on/off WIFI and Bluetooth is not done by mozSettings, but a
> setEnabled()
> method. That comes with some side effects:
>
> - the value doesn't stick after reboot
> - if Settings app and System are toggling the values on their own,
> they
> would have trouble sync the value and their UI.
>
> So I propose the following solution, if we all agreed, then code in
> Gaia
> should follow this flow:
>
> 1) We will create setting keys "bluetooth.enabled" and "wifi.enabled"
> that does nothing to platform but allow us to stick the value after
> reboot and sync the value across the apps.
> 2) App and the Status Bar should update the UI accordingly and they
> are
> NOT ALLOW to call setEnabled() method directly.
> 3) We will create bluetooth.js and wifi.js in the System app to match
> the value to actual setEnabled() method and do other stuff if it
> seems
> reasonable to do in System app.
>
> Using mozSettings value as a mean of cross-domain communication is
> not
> elegant, yet I believe with the current situation this is the only
> way.
>
> Kaze, would that be a problem for you? How soon do you think you can
> apply the Settings app with these rules?
>
> --
> Tim Guan-tin Chien, Front-end Dev, Mozilla Corp. (Taipei)
>
> _______________________________________________
> dev-b2g mailing list
>
dev...@lists.mozilla.org
>
https://lists.mozilla.org/listinfo/dev-b2g
>