This commit is contained in:
Martin Fietz 2016-03-25 13:20:07 +01:00
parent 2e19bba6b9
commit 383a833c30
5 changed files with 28 additions and 28 deletions

View File

@ -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() {
}

View File

@ -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();
}

View File

@ -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

View File

@ -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();
}
};

View File

@ -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() {}