Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show_buffering IntDef values are wrongly updated in a commit. #5139

Closed
eneim opened this issue Nov 23, 2018 · 3 comments
Closed

show_buffering IntDef values are wrongly updated in a commit. #5139

eneim opened this issue Nov 23, 2018 · 3 comments
Assignees
Labels

Comments

@eneim
Copy link
Contributor

eneim commented Nov 23, 2018

Long story short, I think this commit has made the IntDef wrong ...

check this

Screenshot below:

  • SHOW_BUFFERING_ALWAYS is changed from 1 to 2.
  • SHOW_BUFFERING_WHEN_PLAYING is changed from 2 to 1.

screen shot 2018-11-23 at 17 02 23

@tonihei tonihei self-assigned this Nov 23, 2018
@tonihei
Copy link
Collaborator

tonihei commented Nov 23, 2018

Not sure this makes it wrong. The idea of IntDefs is to use constants instead of number literals when working with these states. So changing the numbers shouldn't make a difference. Can you explain why this is a problem for your code?

@eneim
Copy link
Contributor Author

eneim commented Nov 23, 2018

@tonihei Actually, the real issue is when you set this from xml layout with these enum: link to attrs.xml, it will be recognized here: link to PlayerView.java.

So setting "when_playing" in xml will result in the value to be 2, and in PlayerView.java, it will be compared to "ALWAYS" so this is the wrong behaviour: link to usage

@tonihei
Copy link
Collaborator

tonihei commented Nov 23, 2018

Ah, thanks for explaining. We'll fix that.

@tonihei tonihei added bug and removed question labels Nov 23, 2018
ojw28 pushed a commit that referenced this issue Nov 23, 2018
The corresponding IntDef has changed without updating the attribute values.

Issue:#5139
PiperOrigin-RevId: 222598044
@ojw28 ojw28 closed this as completed Nov 23, 2018
ojw28 pushed a commit that referenced this issue Nov 28, 2018
The corresponding IntDef has changed without updating the attribute values.

Issue:#5139
PiperOrigin-RevId: 222598044
@google google locked and limited conversation to collaborators May 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants