From 0d99f5a95ccf45ad45824875f3c4b56510a421d1 Mon Sep 17 00:00:00 2001 From: Dharmaray Kundargi Date: Fri, 4 Feb 2011 15:46:09 -0800 Subject: [PATCH] Fix issue 3426200 Movie Studio crashes when a media item is deleted Change-Id: I1149fbfd22b44b388897bbcc6970da74c1f6ac4f --- .../videoeditor/MediaArtistNativeHelper.java | 39 ++++++++++--------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/media/java/android/media/videoeditor/MediaArtistNativeHelper.java b/media/java/android/media/videoeditor/MediaArtistNativeHelper.java index 6b3f223de23ba..806b2845baa88 100644 --- a/media/java/android/media/videoeditor/MediaArtistNativeHelper.java +++ b/media/java/android/media/videoeditor/MediaArtistNativeHelper.java @@ -2984,27 +2984,28 @@ class MediaArtistNativeHelper { } } } - } - if (!mErrorFlagSet) { - mPreviewEditSettings.videoFrameSize = findVideoResolution(mVideoEditor - .getAspectRatio(), maxHeight); - populateBackgroundMusicProperties(mediaBGMList); - /** call to native populate settings */ - try { - nativePopulateSettings(mPreviewEditSettings, mClipProperties, mAudioSettings); - } catch (IllegalArgumentException ex) { - Log.e(TAG, "Illegal argument exception in nativePopulateSettings"); - throw ex; - } catch (IllegalStateException ex) { - Log.e(TAG, "Illegal state exception in nativePopulateSettings"); - throw ex; - } catch (RuntimeException ex) { - Log.e(TAG, "Runtime exception in nativePopulateSettings"); - throw ex; + if (!mErrorFlagSet) { + mPreviewEditSettings.videoFrameSize = findVideoResolution(mVideoEditor + .getAspectRatio(), maxHeight); + populateBackgroundMusicProperties(mediaBGMList); + + /** call to native populate settings */ + try { + nativePopulateSettings(mPreviewEditSettings, mClipProperties, mAudioSettings); + } catch (IllegalArgumentException ex) { + Log.e(TAG, "Illegal argument exception in nativePopulateSettings"); + throw ex; + } catch (IllegalStateException ex) { + Log.e(TAG, "Illegal state exception in nativePopulateSettings"); + throw ex; + } catch (RuntimeException ex) { + Log.e(TAG, "Runtime exception in nativePopulateSettings"); + throw ex; + } + mInvalidatePreviewArray = false; + mProcessingState = PROCESSING_NONE; } - mInvalidatePreviewArray = false; - mProcessingState = PROCESSING_NONE; } if (mErrorFlagSet) { mErrorFlagSet = false;