commit | 27fa6f007b6cc96e064e5bc10c3c3e059e1db48e | [log] [tgz] |
---|---|---|
author | Wei Jia <wjia@google.com> | Thu Sep 27 13:32:31 2018 -0700 |
committer | Wei Jia <wjia@google.com> | Thu Sep 27 13:32:31 2018 -0700 |
tree | c46106d1971bf1fef92050697d3de57b18977dc5 | |
parent | 2616b08d4d8295dd8cd14565e49617e8ac1ad68c [diff] |
MediaPlayer2: implement skipToNext Test: cts Bug: 112549021 Change-Id: Ibaf1fad4166c0c48058489f3d3d29dcda9a90d52
diff --git a/media/java/android/media/MediaPlayer2Impl.java b/media/java/android/media/MediaPlayer2Impl.java index 7b7b800..84d246f 100644 --- a/media/java/android/media/MediaPlayer2Impl.java +++ b/media/java/android/media/MediaPlayer2Impl.java
@@ -271,7 +271,10 @@ addTask(new Task(CALL_COMPLETED_SKIP_TO_NEXT, false) { @Override void process() { - // TODO: switch to next data source and play + if (getState() == PLAYER_STATE_PLAYING) { + pause(); + } + playNextDataSource(); } }); }