diff options
| author | James Dong <jdong@google.com> | 2011-05-31 14:33:20 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-05-31 14:33:20 -0700 |
| commit | c51e224b0ab40280e6022bd8c9c1cf1a255ab3b9 (patch) | |
| tree | 26b5ee4005944827c00fbb7febcdde05d4d34148 /media | |
| parent | 326e12236c985e99885352429c68a650cbe2c0fe (diff) | |
| parent | 22bf7a7ea768c2cdadc5faf643aba70aebafc0d5 (diff) | |
| download | frameworks_base-c51e224b0ab40280e6022bd8c9c1cf1a255ab3b9.zip frameworks_base-c51e224b0ab40280e6022bd8c9c1cf1a255ab3b9.tar.gz frameworks_base-c51e224b0ab40280e6022bd8c9c1cf1a255ab3b9.tar.bz2 | |
Merge "Add some comment to MediaRecorder.stop() about the stop() failure (-1007)"
Diffstat (limited to 'media')
| -rw-r--r-- | media/java/android/media/MediaRecorder.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/media/java/android/media/MediaRecorder.java b/media/java/android/media/MediaRecorder.java index 38202f2..1478a6d 100644 --- a/media/java/android/media/MediaRecorder.java +++ b/media/java/android/media/MediaRecorder.java @@ -716,6 +716,12 @@ public class MediaRecorder /** * Stops recording. Call this after start(). Once recording is stopped, * you will have to configure it again as if it has just been constructed. + * Note that a RuntimeException is intentionally thrown to the + * application, if no valid audio/video data has been received when stop() + * is called. This happens if stop() is called immediately after + * start(). The failure lets the application take action accordingly to + * clean up the output file (delete the output file, for instance), since + * the output file is not properly constructed when this happens. * * @throws IllegalStateException if it is called before start() */ |
