diff options
author | ByteHamster <info@bytehamster.com> | 2022-11-01 11:58:48 +0100 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2022-11-01 12:06:21 +0100 |
commit | 1e336ac0f8dd7ad74f576f2ce478222eaab26c1b (patch) | |
tree | ec1d3c6efadd542631f5f5a31c450a716ef24675 /core | |
parent | a83674507904cd8c29ca0c3bd9d52d45fa7115a4 (diff) | |
download | AntennaPod-1e336ac0f8dd7ad74f576f2ce478222eaab26c1b.zip |
No need to have a virtual method that is only used in one single instance
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackController.java | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackController.java b/core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackController.java index 5b6530850..80795a7cd 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackController.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackController.java @@ -235,17 +235,7 @@ public abstract class PlaybackController { Log.d(TAG, "status: " + status.toString()); checkMediaInfoLoaded(); switch (status) { - case PAUSED: - updatePlayButtonShowsPlay(true); - if (!PlaybackService.isCasting() && PlaybackService.getCurrentMediaType() == MediaType.VIDEO) { - setScreenOn(false); - } - break; case PLAYING: - if (!PlaybackService.isCasting() && PlaybackService.getCurrentMediaType() == MediaType.VIDEO) { - onAwaitingVideoSurface(); - setScreenOn(true); - } updatePlayButtonShowsPlay(false); break; case PREPARING: @@ -253,7 +243,8 @@ public abstract class PlaybackController { updatePlayButtonShowsPlay(!playbackService.isStartWhenPrepared()); } break; - case PREPARED: + case PAUSED: + case PREPARED: // Fall-through case STOPPED: // Fall-through case INITIALIZED: // Fall-through updatePlayButtonShowsPlay(true); @@ -277,8 +268,6 @@ public abstract class PlaybackController { public abstract void loadMediaInfo(); - public void onAwaitingVideoSurface() {} - /** * Called when connection to playback service has been established or * information has to be refreshed @@ -300,16 +289,6 @@ public abstract class PlaybackController { } } - /** - * Should be implemented by classes that show a video. The default implementation - * does nothing - * - * @param enable True if the screen should be kept on, false otherwise - */ - protected void setScreenOn(boolean enable) { - - } - public void playPause() { if (playbackService == null) { new PlaybackServiceStarter(activity, media).start(); |