@@ -600,22 +600,24 @@ public void onDoubleTapEnd() {
600600 }
601601
602602 @ Override
603- public Boolean shouldFastForward (@ NonNull final DisplayPortion portion ) {
603+ public Optional <Boolean > shouldFastForward (
604+ @ NonNull final DisplayPortion portion
605+ ) {
604606 // Null indicates an invalid area or condition e.g. the middle portion
605607 // or video start or end was reached during double tap seeking
606608 if (invalidSeekConditions ()) {
607609 playerGestureListener .endMultiDoubleTap ();
608- return null ;
610+ return Optional . empty () ;
609611 }
610612 if (portion == DisplayPortion .LEFT
611613 // Small puffer to eliminate infinite rewind seeking
612614 && simpleExoPlayer .getCurrentPosition () > 500L ) {
613- return false ;
615+ return Optional . of ( false ) ;
614616 } else if (portion == DisplayPortion .RIGHT ) {
615- return true ;
617+ return Optional . of ( true ) ;
616618 }
617619 /* portion == DisplayPortion.MIDDLE */
618- return null ;
620+ return Optional . empty () ;
619621 }
620622
621623 @ Override
@@ -630,7 +632,8 @@ public void seek(final boolean forward) {
630632
631633 private boolean invalidSeekConditions () {
632634 return exoPlayerIsNull ()
633- || simpleExoPlayer .getPlaybackState () == SimpleExoPlayer .STATE_ENDED
635+ || simpleExoPlayer .getPlaybackState ()
636+ == com .google .android .exoplayer2 .Player .STATE_ENDED
634637 || simpleExoPlayer .getCurrentPosition () >= simpleExoPlayer .getDuration ()
635638 || currentState == STATE_COMPLETED ;
636639 }
0 commit comments