diff options
author | Martin Fietz <Martin.Fietz@gmail.com> | 2016-03-25 13:20:07 +0100 |
---|---|---|
committer | Martin Fietz <Martin.Fietz@gmail.com> | 2016-03-25 13:20:07 +0100 |
commit | 383a833c30fa13f18a5e58319f2045d3c0f08ea8 (patch) | |
tree | 42b77c3e4308b36383297d2cd3d34d0858e6fc62 /core/src/main | |
parent | 2e19bba6b940f715c63bd458dcbf40fa53bf8845 (diff) | |
download | AntennaPod-383a833c30fa13f18a5e58319f2045d3c0f08ea8.zip |
Refactor
Diffstat (limited to 'core/src/main')
3 files changed, 11 insertions, 11 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java index 1ca06de52..729ea9e7a 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java @@ -142,9 +142,9 @@ public class PlaybackService extends Service { public static final int NOTIFICATION_TYPE_PLAYBACK_SPEED_CHANGE = 8; /** - * Playback speed has changed + * Ability to set the playback speed has changed */ - public static final int NOTIFICATION_TYPE_PLAYBACK_SPEED_CHANGE_AVAILABLE_CHANGED = 9; + public static final int NOTIFICATION_TYPE_SET_SPEED_ABILITY_CHANGED = 9; /** * Returned by getPositionSafe() or getDurationSafe() if the playbackService @@ -520,8 +520,8 @@ public class PlaybackService extends Service { sendNotificationBroadcast(NOTIFICATION_TYPE_PLAYBACK_SPEED_CHANGE, 0); } - public void playbackSpeedAvailableChanged() { - sendNotificationBroadcast(NOTIFICATION_TYPE_PLAYBACK_SPEED_CHANGE_AVAILABLE_CHANGED, 0); + public void setSpeedAbilityChanged() { + sendNotificationBroadcast(NOTIFICATION_TYPE_SET_SPEED_ABILITY_CHANGED, 0); } @Override diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceMediaPlayer.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceMediaPlayer.java index 0c7bb5cb9..aa51840a7 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceMediaPlayer.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceMediaPlayer.java @@ -1018,7 +1018,7 @@ public class PlaybackServiceMediaPlayer implements SharedPreferences.OnSharedPre void playbackSpeedChanged(float s); - void playbackSpeedAvailableChanged(); + void setSpeedAbilityChanged(); void onBufferingUpdate(int percent); @@ -1040,7 +1040,7 @@ public class PlaybackServiceMediaPlayer implements SharedPreferences.OnSharedPre ((AudioPlayer) mp) .setOnBufferingUpdateListener(audioBufferingUpdateListener); ((AudioPlayer) mp).setOnInfoListener(audioInfoListener); - ((AudioPlayer) mp).setOnSpeedAdjustmentAvailableChangedListener(audioSpeedAvailableChangedListener); + ((AudioPlayer) mp).setOnSpeedAdjustmentAvailableChangedListener(audioSetSpeedAbilityListener); } else { ((VideoPlayer) mp) .setOnCompletionListener(videoCompletionListener); @@ -1086,10 +1086,10 @@ public class PlaybackServiceMediaPlayer implements SharedPreferences.OnSharedPre } private final MediaPlayer.OnSpeedAdjustmentAvailableChangedListener - audioSpeedAvailableChangedListener = new MediaPlayer.OnSpeedAdjustmentAvailableChangedListener() { + audioSetSpeedAbilityListener = new MediaPlayer.OnSpeedAdjustmentAvailableChangedListener() { @Override public void onSpeedAdjustmentAvailableChanged(MediaPlayer arg0, boolean speedAdjustmentAvailable) { - callback.playbackSpeedAvailableChanged(); + callback.setSpeedAbilityChanged(); } }; 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 17b1bd72f..1409ffe09 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 @@ -336,8 +336,8 @@ public abstract class PlaybackController { case PlaybackService.NOTIFICATION_TYPE_PLAYBACK_SPEED_CHANGE: onPlaybackSpeedChange(); break; - case PlaybackService.NOTIFICATION_TYPE_PLAYBACK_SPEED_CHANGE_AVAILABLE_CHANGED: - onPlaybackSpeedAvailableChanged(); + case PlaybackService.NOTIFICATION_TYPE_SET_SPEED_ABILITY_CHANGED: + onSetSpeedAbilityChanged(); } } @@ -364,7 +364,7 @@ public abstract class PlaybackController { public void onPlaybackSpeedChange() {} - public void onPlaybackSpeedAvailableChanged() {} + public void onSetSpeedAbilityChanged() {} public void onShutdownNotification() {} |