Skip to content

Commit 9d96354

Browse files
author
James Dong
committed
Fix a Javadoc to clarify when setAudioStreamType() should be called.
bug - 2737926 Change-Id: I8718c3d1a544cf5cb1b7e98b6c24fe0e6d3574ba
1 parent de56c27 commit 9d96354

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

media/java/android/media/MediaPlayer.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,9 @@
344344
* <td>{Idle, Initialized, Stopped, Prepared, Started, Paused,
345345
* PlaybackCompleted}</p></td>
346346
* <td>{Error}</p></td>
347-
* <td>Successful invoke of this method does not change the state.</p></td></tr>
347+
* <td>Successful invoke of this method does not change the state. In order for the
348+
* target audio stream type to become effective, this method must be called before
349+
* prepare() or prepareAsync().</p></td></tr>
348350
* <tr><td>setDataSource </p></td>
349351
* <td>{Idle} </p></td>
350352
* <td>{Initialized, Prepared, Started, Paused, Stopped, PlaybackCompleted,
@@ -1112,7 +1114,9 @@ public boolean resume() {
11121114

11131115
/**
11141116
* Sets the audio stream type for this MediaPlayer. See {@link AudioManager}
1115-
* for a list of stream types.
1117+
* for a list of stream types. Must call this method before prepare() or
1118+
* prepareAsync() in order for the target stream type to become effective
1119+
* thereafter.
11161120
*
11171121
* @param streamtype the audio stream type
11181122
* @see android.media.AudioManager

0 commit comments

Comments
 (0)