Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: [b2g] (mozBluetooth|mozWifiManager).setEnabled() and mozSettings

42 views
Skip to first unread message

Gene Lian

unread,
Jul 19, 2012, 5:03:27 AM7/19/12
to Tim Guan-tin Chien, Eric Chou, Fabien Cazenave, Kyle Machulis, dev-...@lists.mozilla.org
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
>

Tim Guan-tin Chien

unread,
Jul 19, 2012, 5:49:45 AM7/19/12
to Gene Lian, Eric Chou, Evelyn Hung, Fabien Cazenave, Kyle Machulis, dev-...@lists.mozilla.org
Gene, Kaze, Evelyn,

We just have a offline discussion about this.

Gene will be working on the bug to allow wifiManager to consume
mozSettings value directly. In the mean time, Evelyn will deliver a
Gaia change that (A) actually ask Settings app and Quick Settings in
System app to respect the mozSetting value, and (B) sync that value
from mozSettings to wifiManager in System app.

The part (B) will be removed once Gene's platform fix is delivered.

Kaze, Evelyn is working on wifi part of the Settings app extensively,
so you might need to hands off from there now.


Tim

Tim Guan-tin Chien

unread,
Jul 19, 2012, 6:53:39 AM7/19/12
to Gene Lian, Eric Chou, Evelyn Hung, Fabien Cazenave, Kyle Machulis, dev-...@lists.mozilla.org
Correct Evelyn's email address :-/

Evelyn Hung

unread,
Jul 19, 2012, 11:31:23 AM7/19/12
to Tim Guan-tin Chien, Eric Chou, Fabien Cazenave, Kyle Machulis, dev-...@lists.mozilla.org, Gene Lian
I found there is an updated version of the wifi in Setting app (from Kaze),
I'm trying to merge now.

Evelyn
0 new messages