Loading media/java/android/media/MediaPlayerBase.java +4 −4 Original line number Diff line number Diff line Loading @@ -132,8 +132,8 @@ public abstract class MediaPlayerBase implements AutoCloseable { public static final long UNKNOWN_TIME = -1; /** * Returns the current playback head position. * @return the current play position in ms, or {@link #UNKNOWN_TIME} if unknown. * Gets the current playback head position. * @return the current playback position in ms, or {@link #UNKNOWN_TIME} if unknown. */ public long getCurrentPosition() { return UNKNOWN_TIME; } Loading @@ -144,8 +144,8 @@ public abstract class MediaPlayerBase implements AutoCloseable { public long getDuration() { return UNKNOWN_TIME; } /** * Returns the duration of the current data source, or {@link #UNKNOWN_TIME} if unknown. * @return the duration in ms, or {@link #UNKNOWN_TIME}. * Gets the buffered position of current playback, or {@link #UNKNOWN_TIME} if unknown. * @return the buffered position in ms, or {@link #UNKNOWN_TIME}. */ public long getBufferedPosition() { return UNKNOWN_TIME; } Loading media/java/android/media/MediaSession2.java +11 −13 Original line number Diff line number Diff line Loading @@ -1465,39 +1465,37 @@ public class MediaSession2 implements AutoCloseable { } /** * Get the player state. * Gets the current player state. * * @return player state * @return the current player state * @hide */ // TODO(jaewan): Unhide (b/74578458) public @PlayerState int getPlayerState() { // TODO(jaewan): implement this (b/74578458) return PLAYER_STATE_IDLE; return mProvider.getPlayerState_impl(); } /** * Get the current position. * Gets the current position. * * @return position * @return the current playback position in ms, or {@link MediaPlayerBase#UNKNOWN_TIME} if * unknown. * @hide */ // TODO(jaewan): Unhide (b/74578458) public long getCurrentPosition() { // TODO(jaewan): implement this (b/74578458) return -1; public long getPosition() { return mProvider.getPosition_impl(); } /** * Get the buffered position. * Gets the buffered position, or {@link MediaPlayerBase#UNKNOWN_TIME} if unknown. * * @return buffered position * @return the buffered position in ms, or {@link MediaPlayerBase#UNKNOWN_TIME}. * @hide */ // TODO(jaewan): Unhide (b/74578458) public long getBufferedPosition() { // TODO(jaewan): implement this (b/74578458) return -1; return mProvider.getBufferedPosition_impl(); } /** Loading media/java/android/media/update/MediaSession2Provider.java +3 −0 Original line number Diff line number Diff line Loading @@ -65,6 +65,9 @@ public interface MediaSession2Provider extends TransportControlProvider { void setPlaylist_impl(List<MediaItem2> list, MediaMetadata2 metadata); MediaItem2 getCurrentPlaylistItem_impl(); void notifyError_impl(int errorCode, Bundle extras); int getPlayerState_impl(); long getPosition_impl(); long getBufferedPosition_impl(); interface CommandProvider { int getCommandCode_impl(); Loading Loading
media/java/android/media/MediaPlayerBase.java +4 −4 Original line number Diff line number Diff line Loading @@ -132,8 +132,8 @@ public abstract class MediaPlayerBase implements AutoCloseable { public static final long UNKNOWN_TIME = -1; /** * Returns the current playback head position. * @return the current play position in ms, or {@link #UNKNOWN_TIME} if unknown. * Gets the current playback head position. * @return the current playback position in ms, or {@link #UNKNOWN_TIME} if unknown. */ public long getCurrentPosition() { return UNKNOWN_TIME; } Loading @@ -144,8 +144,8 @@ public abstract class MediaPlayerBase implements AutoCloseable { public long getDuration() { return UNKNOWN_TIME; } /** * Returns the duration of the current data source, or {@link #UNKNOWN_TIME} if unknown. * @return the duration in ms, or {@link #UNKNOWN_TIME}. * Gets the buffered position of current playback, or {@link #UNKNOWN_TIME} if unknown. * @return the buffered position in ms, or {@link #UNKNOWN_TIME}. */ public long getBufferedPosition() { return UNKNOWN_TIME; } Loading
media/java/android/media/MediaSession2.java +11 −13 Original line number Diff line number Diff line Loading @@ -1465,39 +1465,37 @@ public class MediaSession2 implements AutoCloseable { } /** * Get the player state. * Gets the current player state. * * @return player state * @return the current player state * @hide */ // TODO(jaewan): Unhide (b/74578458) public @PlayerState int getPlayerState() { // TODO(jaewan): implement this (b/74578458) return PLAYER_STATE_IDLE; return mProvider.getPlayerState_impl(); } /** * Get the current position. * Gets the current position. * * @return position * @return the current playback position in ms, or {@link MediaPlayerBase#UNKNOWN_TIME} if * unknown. * @hide */ // TODO(jaewan): Unhide (b/74578458) public long getCurrentPosition() { // TODO(jaewan): implement this (b/74578458) return -1; public long getPosition() { return mProvider.getPosition_impl(); } /** * Get the buffered position. * Gets the buffered position, or {@link MediaPlayerBase#UNKNOWN_TIME} if unknown. * * @return buffered position * @return the buffered position in ms, or {@link MediaPlayerBase#UNKNOWN_TIME}. * @hide */ // TODO(jaewan): Unhide (b/74578458) public long getBufferedPosition() { // TODO(jaewan): implement this (b/74578458) return -1; return mProvider.getBufferedPosition_impl(); } /** Loading
media/java/android/media/update/MediaSession2Provider.java +3 −0 Original line number Diff line number Diff line Loading @@ -65,6 +65,9 @@ public interface MediaSession2Provider extends TransportControlProvider { void setPlaylist_impl(List<MediaItem2> list, MediaMetadata2 metadata); MediaItem2 getCurrentPlaylistItem_impl(); void notifyError_impl(int errorCode, Bundle extras); int getPlayerState_impl(); long getPosition_impl(); long getBufferedPosition_impl(); interface CommandProvider { int getCommandCode_impl(); Loading