diff --git a/app/src/androidTest/java/de/test/antennapod/service/playback/PlaybackServiceMediaPlayerTest.java b/app/src/androidTest/java/de/test/antennapod/service/playback/PlaybackServiceMediaPlayerTest.java index f420d24d2..68a0ecd08 100644 --- a/app/src/androidTest/java/de/test/antennapod/service/playback/PlaybackServiceMediaPlayerTest.java +++ b/app/src/androidTest/java/de/test/antennapod/service/playback/PlaybackServiceMediaPlayerTest.java @@ -170,7 +170,7 @@ public class PlaybackServiceMediaPlayerTest extends InstrumentationTestCase { } @Override - public void playbackSpeedAvailableChanged() { + public void setSpeedAbilityChanged() { } @@ -244,7 +244,7 @@ public class PlaybackServiceMediaPlayerTest extends InstrumentationTestCase { } @Override - public void playbackSpeedAvailableChanged() { + public void setSpeedAbilityChanged() { } @@ -321,7 +321,7 @@ public class PlaybackServiceMediaPlayerTest extends InstrumentationTestCase { } @Override - public void playbackSpeedAvailableChanged() { + public void setSpeedAbilityChanged() { } @@ -399,7 +399,7 @@ public class PlaybackServiceMediaPlayerTest extends InstrumentationTestCase { } @Override - public void playbackSpeedAvailableChanged() { + public void setSpeedAbilityChanged() { } @@ -471,7 +471,7 @@ public class PlaybackServiceMediaPlayerTest extends InstrumentationTestCase { } @Override - public void playbackSpeedAvailableChanged() { + public void setSpeedAbilityChanged() { } @@ -544,7 +544,7 @@ public class PlaybackServiceMediaPlayerTest extends InstrumentationTestCase { } @Override - public void playbackSpeedAvailableChanged() { + public void setSpeedAbilityChanged() { } @@ -619,7 +619,7 @@ public class PlaybackServiceMediaPlayerTest extends InstrumentationTestCase { } @Override - public void playbackSpeedAvailableChanged() { + public void setSpeedAbilityChanged() { } @@ -697,7 +697,7 @@ public class PlaybackServiceMediaPlayerTest extends InstrumentationTestCase { } @Override - public void playbackSpeedAvailableChanged() { + public void setSpeedAbilityChanged() { } @@ -750,7 +750,7 @@ public class PlaybackServiceMediaPlayerTest extends InstrumentationTestCase { } @Override - public void playbackSpeedAvailableChanged() { + public void setSpeedAbilityChanged() { } @@ -823,7 +823,7 @@ public class PlaybackServiceMediaPlayerTest extends InstrumentationTestCase { } @Override - public void playbackSpeedAvailableChanged() { + public void setSpeedAbilityChanged() { } @@ -933,7 +933,7 @@ public class PlaybackServiceMediaPlayerTest extends InstrumentationTestCase { } @Override - public void playbackSpeedAvailableChanged() { + public void setSpeedAbilityChanged() { } @@ -1020,7 +1020,7 @@ public class PlaybackServiceMediaPlayerTest extends InstrumentationTestCase { } @Override - public void playbackSpeedAvailableChanged() { + public void setSpeedAbilityChanged() { } @@ -1119,7 +1119,7 @@ public class PlaybackServiceMediaPlayerTest extends InstrumentationTestCase { } @Override - public void playbackSpeedAvailableChanged() { + public void setSpeedAbilityChanged() { } 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 8810f3375..4911f61bc 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java @@ -175,14 +175,14 @@ public abstract class MediaplayerActivity extends AppCompatActivity implements O } @Override - public void onPlaybackSpeedAvailableChanged() { - MediaplayerActivity.this.onPlaybackSpeedAvailableChanged(); + public void onSetSpeedAbilityChanged() { + MediaplayerActivity.this.onSetSpeedAbilityChanged(); } }; } - protected void onPlaybackSpeedAvailableChanged() { - Log.d(TAG, "onPlaybackSpeedAvailableChanged()"); + protected void onSetSpeedAbilityChanged() { + Log.d(TAG, "onSetSpeedAbilityChanged()"); updatePlaybackSpeedButton(); } 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() {}