summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/app/MuteVideo.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/gallery3d/app/MuteVideo.java')
-rwxr-xr-x[-rw-r--r--]src/com/android/gallery3d/app/MuteVideo.java16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/com/android/gallery3d/app/MuteVideo.java b/src/com/android/gallery3d/app/MuteVideo.java
index a385fbb9f..dd05397d2 100644..100755
--- a/src/com/android/gallery3d/app/MuteVideo.java
+++ b/src/com/android/gallery3d/app/MuteVideo.java
@@ -87,9 +87,19 @@ public class MuteVideo {
VideoUtils.startMute(mFilePath, mDstFileInfo);
SaveVideoFileUtils.insertContent(
mDstFileInfo, mActivity.getContentResolver(), mUri);
- } catch (IOException e) {
- Toast.makeText(mActivity, mActivity.getString(R.string.video_mute_err),
- Toast.LENGTH_SHORT).show();
+ } catch (Exception e) {
+ mHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ Toast.makeText(mActivity, mActivity.getString(R.string.video_mute_err),
+ Toast.LENGTH_SHORT).show();
+ if (mMuteProgress != null) {
+ mMuteProgress.dismiss();
+ mMuteProgress = null;
+ }
+ }
+ });
+ return;
}
// After muting is done, trigger the UI changed.
mHandler.post(new Runnable() {