mozilla-b2g/gaia — pull request #7444 by tdz (2013-01-09 16:32:46+00:00)
Title: Bug 828174: Track Bluetooth discovery state in Settings app [r=ehung]

The settings app unconditionally stops Bluetooth discovery when
processing incoming events. Stopping discovery when no discovery
is actually running will make the Bluetooth daemon generate an
error.

This patch prevents this by tracking the discovery state in the
settings application and only stopping discovery if it's currently
running. We reuse the value 'discoverTimeout' for this purpose,
because it exposes the required behaviour.

Signed-off-by: Thomas Zimmermann