Skip to content

suppressVolumeIndicator default is incorrectly described in documentation #25

Description

@CarltonCassedy

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Pass an empty options object to the watch function (i.e. rely on defaults)
  2. Press volume button on android device
  3. Observe that the system volume indicator does not appear.

Expected behavior
A clear and concise description of what you expected to happen.

The default system behavior should occur, as it has not been suppressed, and the documentation indicates the default value for that option is "false".

Problematic line in source code:

suppressVolumeIndicator = Boolean.TRUE.equals(call.getBoolean("suppressVolumeIndicator", true));

suppressVolumeIndicator = Boolean.TRUE.equals(call.getBoolean("suppressVolumeIndicator", true));

The "true" passed as a second argument to call.getBoolean is the actual default value, which does not match what is in the documentation. Either the code should be changed to have false as the default, or the documentation should indicate true is the default. I think false as a default is more intuitive. But changing the documentation instead is a less intrusive change, that won't break the code of anyone who's already relying on the actual default behavior

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdocumentationImprovements or additions to documentation

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions