mozilla-b2g/gaia — pull request #6969 by evelynhung (2012-12-12 12:32:43+00:00)
Title: bug 820166 stop discover nearby devices when Settings app is pushed to the background

do more error checking: detect bluetooth isn't ready or been turned off.
remove the hook of onenabled event, it's useless.
clean up when bluetooth is turned off, delete defaultAdapter