Store the resume position even if the window is not seekable

Note: this temporarily exposes a bug where seeking a non-seekable source leads
to the player position being negative before playback starts.

Issue: #2655

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=161801111
This commit is contained in:
andrewlewis 2017-07-13 06:50:46 -07:00 committed by Oliver Woodman
parent 8378c3dc1f
commit 68e5e91735

View file

@ -406,8 +406,7 @@ public class PlayerActivity extends Activity implements OnClickListener, ExoPlay
private void updateResumePosition() {
resumeWindow = player.getCurrentWindowIndex();
resumePosition = player.isCurrentWindowSeekable() ? Math.max(0, player.getContentPosition())
: C.TIME_UNSET;
resumePosition = Math.max(0, player.getContentPosition());
}
private void clearResumePosition() {