Handle seek requests in AudioService

AudioService handles seek requests to RemoteControlClients.
Discard old or unprocessed seek requests when handling a new one.
Update javadoc for OnPlaybackPositionUpdateListener interface.

bug 8120740

Change-Id: Id17c2852b24d4b8af85e472a177484b98cfeba05
This commit is contained in:
Jean-Michel Trivi
2013-04-09 11:10:18 -07:00
parent 5a78b1b20d
commit 3fbf67e217
2 changed files with 17 additions and 2 deletions

View File

@@ -683,9 +683,12 @@ public class RemoteControlClient
/**
* Called on the implementer to notify it that the playback head should be set at the given
* position. If the position can be changed from its current value, the implementor of
* the interface should also update the playback position using
* the interface must also update the playback position using
* {@link RemoteControlClient#setPlaybackState(int, long, int)} to reflect the actual new
* position being used, regardless of whether it differs from the requested position.
* Failure to do so would cause the system to not know the new actual playback position,
* and user interface components would fail to show the user where playback resumed after
* the position was updated.
* @param newPositionMs the new requested position in the current media, expressed in ms.
*/
void onPlaybackPositionUpdate(long newPositionMs);