Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • briar briar
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 785
    • Issues 785
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 10
    • Merge requests 10
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • briarbriar
  • briarbriar
  • Issues
  • #1572
Closed
Open
Issue created May 29, 2019 by akwizgran@akwizgranOwner

Transport icons use inconsistent information to determine plugin state

The transport icons in the nav drawer use two sources of information to determine which transports are active: Plugin#isRunning() and TransportEnabled/DisabledEvents. But these sources can be inconsistent. For example, BluetoothPlugin#isRunning() returns true if the adapter is enabled, regardless of whether contact connections are enabled, but the plugin doesn't broadcast TransportEnabledEvents unless contact connections are enabled. This leads to the following bug:

  • Start Briar with default settings and the Bluetooth adapter enabled
  • The Bluetooth icon is active because isRunning() returns true
  • Disable the Bluetooth adapter
  • The Bluetooth icon is inactive because a TransportDisabledEvent was broadcast
  • Re-enable the Bluetooth adapter
  • The Bluetooth icon remains inactive because no TransportEnabledEvent was broadcast

Arguably the real issue here is that plugins (or the manager) should provide an isEnabled() method that follows the enabled/disabled events. This could easily be implemented in the manager, and could also be used to suppress redundant enabled/disabled events, such as those broadcast when toggling the Bluetooth adapter state without contact connections enabled.

Related to discussion of plugin states on #185 (closed).

Assignee
Assign to
Time tracking