PreviewVideoActivity: ensure player is stopped when closing fullscreen

This already worked for onBackPressed

Signed-off-by: Álvaro Brey Vilas <alvaro.brey@nextcloud.com>
This commit is contained in:
Álvaro Brey Vilas 2022-02-18 17:36:06 +01:00
parent 686748dda2
commit e419144456
No known key found for this signature in database
GPG key ID: 2585783189A62105

View file

@ -90,7 +90,7 @@ public class PreviewVideoActivity extends FileActivity implements OnCompletionLi
exoPlayer = new SimpleExoPlayer.Builder(this).build();
playerView.setPlayer(exoPlayer);
findViewById(R.id.exo_exit_fs).setOnClickListener(v -> finish());
findViewById(R.id.exo_exit_fs).setOnClickListener(v -> onBackPressed());
if (mSavedPlaybackPosition >= 0) {
exoPlayer.seekTo(mSavedPlaybackPosition);