diff options
author | ByteHamster <info@bytehamster.com> | 2021-05-14 20:56:18 +0200 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2021-05-14 22:07:35 +0200 |
commit | 362e66cf0857cf7432303c5e47e806d808224d3d (patch) | |
tree | 511f549a14d947616dad72a27868b7f91113fad2 | |
parent | 342ed92994e39d5c4859c86261fa0d31ddd83027 (diff) | |
download | AntennaPod-362e66cf0857cf7432303c5e47e806d808224d3d.zip |
Removed code from MediaPlayerActivity that only affects the audio player
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java | 29 | ||||
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java | 10 |
2 files changed, 2 insertions, 37 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java index 4b5822ac7..fbcab03a4 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java @@ -65,7 +65,6 @@ import io.reactivex.schedulers.Schedulers; */ public abstract class MediaplayerActivity extends CastEnabledActivity implements OnSeekBarChangeListener { private static final String TAG = "MediaplayerActivity"; - private static final String PREFS = "MediaPlayerActivityPreferences"; PlaybackController controller; @@ -145,11 +144,6 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements } @Override - public void onPlaybackSpeedChange() { - MediaplayerActivity.this.onPlaybackSpeedChange(); - } - - @Override protected void setScreenOn(boolean enable) { super.setScreenOn(enable); MediaplayerActivity.this.setScreenOn(enable); @@ -169,20 +163,12 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements } } - private void onPlaybackSpeedChange() { - updatePlaybackSpeedButtonText(); - } - - void chooseTheme() { - setTheme(UserPreferences.getTheme()); - } - void setScreenOn(boolean enable) { } @Override protected void onCreate(Bundle savedInstanceState) { - chooseTheme(); + setTheme(R.style.Theme_AntennaPod_VideoPlayer); super.onCreate(savedInstanceState); Log.d(TAG, "onCreate()"); @@ -454,19 +440,10 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements showTimeLeft = UserPreferences.shouldShowRemainingTime(); onPositionObserverUpdate(); checkFavorite(); - updatePlaybackSpeedButton(); - } - - void updatePlaybackSpeedButton() { - // Only meaningful on AudioplayerActivity, where it is overridden. - } - - void updatePlaybackSpeedButtonText() { - // Only meaningful on AudioplayerActivity, where it is overridden. } void setupGUI() { - setContentView(getContentViewResourceId()); + setContentView(R.layout.videoplayer_activity); sbPosition = findViewById(R.id.sbPosition); txtvPosition = findViewById(R.id.txtvPosition); cardViewSeek = findViewById(R.id.cardViewSeek); @@ -571,8 +548,6 @@ public abstract class MediaplayerActivity extends CastEnabledActivity implements controller.seekTo(curr + UserPreferences.getFastForwardSecs() * 1000); } - protected abstract int getContentViewResourceId(); - private void handleError(int errorCode) { final AlertDialog.Builder errorDialog = new AlertDialog.Builder(this); errorDialog.setTitle(R.string.error_label); diff --git a/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java index f7b122c3d..b3bf0ebc8 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java @@ -69,11 +69,6 @@ public class VideoplayerActivity extends MediaplayerActivity { private FrameLayout videoframe; private ImageView skipAnimationView; - @Override - protected void chooseTheme() { - setTheme(R.style.Theme_AntennaPod_VideoPlayer); - } - @SuppressLint("AppCompatMethod") @Override protected void onCreate(Bundle savedInstanceState) { @@ -401,11 +396,6 @@ public class VideoplayerActivity extends MediaplayerActivity { } @Override - protected int getContentViewResourceId() { - return R.layout.videoplayer_activity; - } - - @Override protected void setScreenOn(boolean enable) { super.setScreenOn(enable); if (enable) { |