Closed Bug 857878 Opened 12 years ago Closed 12 years ago

[Settings] Side effect of BT init because of Connenctivity.js code changing

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
critical

Tracking

(blocking-b2g:leo+)

RESOLVED DUPLICATE of bug 847851
blocking-b2g leo+

People

(Reporter: leo.bugzilla.gaia, Assigned: jj.evelyn)

Details

(Keywords: regression, Whiteboard: [TD-8313])

In connectivity.js, the below code was changed on Mozilla build version, 20130318070202 // starting when we get a chance navigator.mozL10n.ready(function loadWhenIdle() { var idleObserver = { time: 3, onidle: function() { Connectivity.init(); navigator.removeIdleObserver(idleObserver); } }; navigator.addIdleObserver(idleObserver); }); Because of this code changing, BT init has some problems. When go to BT menu as soon as entering settings app, before passing 3 sec. exactly, BT can't initialiize narmally. Bluetooch.js file loaded before initialize Connectivity and then it will happen the problem about BT on/off event callback. Please check the code about time:3 and BT init related with connectivity.
blocking-b2g: --- → leo?
I've CC'd some people who've made recent changes here and also Alex who was talking about a decision yesterday.
can we understand exactly what the user impact is on this?
Flags: needinfo?(leo.bugzilla.gaia)
Dear Mozilla Team, Reproduce step is below. 1. Phone booting. 2. enter the setting app. 3. enter the bluetooth setting before 3 second from step 2. 4. bluetooth does not turn on. Root cause is that bluetooth listeners are replaced in connectivity.init(). gBluetooth.onadapteradded = function() { dispatchEvent(new CustomEvent('bluetooth-adapter-added')); updateBluetooth(); }; gBluetooth.ondisabled = function() { dispatchEvent(new CustomEvent('bluetooth-disabled')); updateBluetooth(); }; these listeners must be replaced when bluetooth.js is loaded. But if you enter bluetooth setting before 3 second, and bluetooth.js is loaded first. And then this code is replaced by connectivity.init. Normal loading process : connectivity.init() -> bluetooth.js After 3 timer process : bluetooth.js -> connectivity.init() Please check this point and if you don't understand, contact me again. Thanks.
(In reply to Joe Cheng [:jcheng] from comment #2) > can we understand exactly what the user impact is on this? Bluetooth doesn't come up. Couldn't repro on v1.0.1, so this appears to be a regression in v1.1. leo+
Assignee: nobody → ehung
blocking-b2g: leo? → leo+
Flags: needinfo?(leo.bugzilla.gaia)
Keywords: regression
(In reply to leo.bugzilla.gecko from comment #3) > Dear Mozilla Team, > > Reproduce step is below. > > 1. Phone booting. > 2. enter the setting app. > 3. enter the bluetooth setting before 3 second from step 2. > 4. bluetooth does not turn on. > > Root cause is that bluetooth listeners are replaced in connectivity.init(). > > gBluetooth.onadapteradded = function() { > dispatchEvent(new CustomEvent('bluetooth-adapter-added')); > updateBluetooth(); > }; > gBluetooth.ondisabled = function() { > dispatchEvent(new CustomEvent('bluetooth-disabled')); > updateBluetooth(); > }; > > these listeners must be replaced when bluetooth.js is loaded. > But if you enter bluetooth setting before 3 second, and bluetooth.js is > loaded first. > And then this code is replaced by connectivity.init. > > Normal loading process : connectivity.init() -> bluetooth.js > After 3 timer process : bluetooth.js -> connectivity.init() > > Please check this point and if you don't understand, contact me again. > > Thanks. It's a dup of bug 847851. The code segment above has been changed in the patch of bug 847851, and merged into gaia master. We are waiting for it uplifting to v1.0.1.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
Whiteboard: [TD-8313]
You need to log in before you can comment on or make changes to this bug.