use of android.media.videoeditor.VideoEditor.PreviewProgressListener in project android_frameworks_base by ParanoidAndroid.
the class VideoEditorPreviewTest method testStartPreviewWithoutMediaItems.
/**
* To Test Preview : Without any Media Items in the story Board
*/
@LargeTest
public void testStartPreviewWithoutMediaItems() throws Exception {
boolean flagForException = false;
final SurfaceHolder surfaceHolder = MediaFrameworkTest.mSurfaceView.getHolder();
try {
mVideoEditor.startPreview(surfaceHolder, 0, -1, false, 1, new PreviewProgressListener() {
public void onProgress(VideoEditor videoEditor, long timeMs, OverlayData overlayData) {
}
public void onStart(VideoEditor videoEditor) {
setPreviewStart();
}
public void onStop(VideoEditor videoEditor) {
setPreviewStop();
}
public void onError(VideoEditor videoEditor, int error) {
setPreviewError();
}
});
} catch (IllegalArgumentException e) {
flagForException = true;
}
assertTrue("Preview without Media Items", flagForException);
}
Aggregations