MediaSession2: Add reset() to the MediaPlayerBase

This would be used in response to
  - MediaController2#play()
  - KEYCODE_MEDIA_STOP

Bug: 64098437
Test: passed MediaComponentTest
Change-Id: I7cd4d855d5e1bf8e4260a9b920f30dfe2eea44e1
This commit is contained in:
Jaewan Kim
2018-03-02 09:12:16 +09:00
parent 2410a0dd31
commit de2bbb322b
3 changed files with 7 additions and 1 deletions

View File

@@ -24345,7 +24345,6 @@ package android.media {
method public abstract void prepareDrm(java.util.UUID) throws android.media.MediaPlayer2.ProvisioningNetworkErrorException, android.media.MediaPlayer2.ProvisioningServerErrorException, android.media.ResourceBusyException, android.media.UnsupportedSchemeException;
method public abstract byte[] provideDrmKeyResponse(byte[], byte[]) throws android.media.DeniedByServerException, android.media.MediaPlayer2.NoDrmSchemeException;
method public abstract void releaseDrm() throws android.media.MediaPlayer2.NoDrmSchemeException;
method public abstract void reset();
method public abstract void restoreDrmKeys(byte[]) throws android.media.MediaPlayer2.NoDrmSchemeException;
method public void seekTo(long);
method public abstract void seekTo(long, int);
@@ -24510,6 +24509,7 @@ package android.media {
method public abstract void play();
method public abstract void prepare();
method public abstract void registerPlayerEventCallback(java.util.concurrent.Executor, android.media.MediaPlayerBase.PlayerEventCallback);
method public abstract void reset();
method public abstract void seekTo(long);
method public abstract void setAudioAttributes(android.media.AudioAttributes);
method public abstract void setDataSource(android.media.DataSourceDesc);

View File

@@ -1339,6 +1339,7 @@ public abstract class MediaPlayer2 extends MediaPlayerBase
* this method, you will have to initialize it again by setting the
* data source and calling prepare().
*/
@Override
public abstract void reset();
/**

View File

@@ -113,6 +113,11 @@ public abstract class MediaPlayerBase implements AutoCloseable {
*/
public abstract void pause();
/**
* Resets the MediaPlayerBase to its uninitialized state.
*/
public abstract void reset();
/**
*
*/