Skip to content

Commit aef4af4

Browse files
James DongAndroid (Google) Code Review
authored andcommitted
Merge "Add MEDIA_ERROR_SERVER_DIED error constant to MediaRecorder.java class" into jb-mr1-dev
2 parents 2caec6c + a35379a commit aef4af4

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

api/current.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11512,6 +11512,7 @@ package android.media {
1151211512
method public void setVideoSource(int) throws java.lang.IllegalStateException;
1151311513
method public void start() throws java.lang.IllegalStateException;
1151411514
method public void stop() throws java.lang.IllegalStateException;
11515+
field public static final int MEDIA_ERROR_SERVER_DIED = 100; // 0x64
1151511516
field public static final int MEDIA_RECORDER_ERROR_UNKNOWN = 1; // 0x1
1151611517
field public static final int MEDIA_RECORDER_INFO_MAX_DURATION_REACHED = 800; // 0x320
1151711518
field public static final int MEDIA_RECORDER_INFO_MAX_FILESIZE_REACHED = 801; // 0x321

media/java/android/media/MediaRecorder.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,12 +721,17 @@ public void reset() {
721721
public native int getMaxAmplitude() throws IllegalStateException;
722722

723723
/* Do not change this value without updating its counterpart
724-
* in include/media/mediarecorder.h!
724+
* in include/media/mediarecorder.h or mediaplayer.h!
725725
*/
726726
/** Unspecified media recorder error.
727727
* @see android.media.MediaRecorder.OnErrorListener
728728
*/
729729
public static final int MEDIA_RECORDER_ERROR_UNKNOWN = 1;
730+
/** Media server died. In this case, the application must release the
731+
* MediaRecorder object and instantiate a new one.
732+
* @see android.media.MediaRecorder.OnErrorListener
733+
*/
734+
public static final int MEDIA_ERROR_SERVER_DIED = 100;
730735

731736
/**
732737
* Interface definition for a callback to be invoked when an error
@@ -741,6 +746,7 @@ public interface OnErrorListener
741746
* @param what the type of error that has occurred:
742747
* <ul>
743748
* <li>{@link #MEDIA_RECORDER_ERROR_UNKNOWN}
749+
* <li>{@link #MEDIA_ERROR_SERVER_DIED}
744750
* </ul>
745751
* @param extra an extra code, specific to the error type
746752
*/

0 commit comments

Comments
 (0)