Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Subtitles crash and demo flow #61

Merged
merged 3 commits into from
Jun 29, 2017
Merged

Subtitles crash and demo flow #61

merged 3 commits into from
Jun 29, 2017

Conversation

Mecharyry
Copy link
Contributor

Problem

Crash when trying to check equality of equals on a object that was null 😬

NoPlayer Demo doesn't exactly follow the flow we expect clients to implement...

Solution

Swap the equality check to prevent crashes.

Make NoPlayer demo follow the flow we expect when creating and interacting with a Player.

Test(s) added

No, just changing flow in Activities.

Screenshots

No UI changes.

Paired with

@Dorvaryn

@ouchadam
Copy link
Contributor

💯

@joetimmins joetimmins self-requested a review June 29, 2017 13:02
@joetimmins joetimmins self-assigned this Jun 29, 2017
@@ -31,12 +30,12 @@ public SubtitleView(Context context, AttributeSet attrs) {
}

public void setCues(TextCues textCues) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this textCues ever be null? Because if it can, line 37 can throw NullPointerException.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 We've updated the mapper, that passes to this, to ensure that it always returns a list.

@joetimmins joetimmins merged commit f0194a6 into exo-player-2 Jun 29, 2017
@joetimmins joetimmins deleted the bug_fixes branch June 29, 2017 13:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants