diff options
author | Rajneesh Chowdury <rajneeshc@google.com> | 2011-03-15 16:20:17 -0700 |
---|---|---|
committer | Rajneesh Chowdury <rajneeshc@google.com> | 2011-03-15 16:20:17 -0700 |
commit | 8e7991a52edb3eb8bd1a44ceb7f6d97108748c8c (patch) | |
tree | 66b4f142e7368d3bd08590b12c0d1d8e4823d012 /media/java | |
parent | 3ec9d06f070db3a8899ad235736abd0ffaf6f578 (diff) | |
download | frameworks_base-8e7991a52edb3eb8bd1a44ceb7f6d97108748c8c.zip frameworks_base-8e7991a52edb3eb8bd1a44ceb7f6d97108748c8c.tar.gz frameworks_base-8e7991a52edb3eb8bd1a44ceb7f6d97108748c8c.tar.bz2 |
Fix for 4087846 Crash reported by monkey report (Java/Jni)
Change-Id: I356f975743f5a24e72f33a20ee497a2b12791be6
Diffstat (limited to 'media/java')
-rwxr-xr-x | media/java/android/media/videoeditor/VideoEditorImpl.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/media/java/android/media/videoeditor/VideoEditorImpl.java b/media/java/android/media/videoeditor/VideoEditorImpl.java index 7e1f73a..608cea0 100755 --- a/media/java/android/media/videoeditor/VideoEditorImpl.java +++ b/media/java/android/media/videoeditor/VideoEditorImpl.java @@ -899,6 +899,10 @@ public class VideoEditorImpl implements VideoEditor { throw new IllegalArgumentException("Surface could not be retrieved from Surface holder"); } + if (surface.isValid() == false) { + throw new IllegalStateException("Surface is not valid"); + } + if (timeMs < 0) { throw new IllegalArgumentException("requested time not correct"); } else if (timeMs > mDurationMs) { @@ -1622,6 +1626,10 @@ public class VideoEditorImpl implements VideoEditor { throw new IllegalArgumentException("Surface could not be retrieved from surface holder"); } + if (surface.isValid() == false) { + throw new IllegalStateException("Surface is not valid"); + } + if (listener == null) { throw new IllegalArgumentException(); } @@ -1858,6 +1866,10 @@ public class VideoEditorImpl implements VideoEditor { throw new IllegalArgumentException("Surface could not be retrieved from surface holder"); } + if (surface.isValid() == false) { + throw new IllegalStateException("Surface is not valid"); + } + if (mMANativeHelper != null) { mMANativeHelper.clearPreviewSurface(surface); } else { |