From f64b94c590a37fa8c7e42d3a8058f1c297ca1739 Mon Sep 17 00:00:00 2001 From: Jack Yoo Date: Fri, 22 Jan 2016 15:52:00 -0800 Subject: SnapdragonCamera: Register media status listener Register sd card media status listener on resume. Change-Id: I7b3b7e3104b7729c83d83926bb794e0d7ec237d2 CRs-Fixed: 960865 --- src/com/android/camera/VideoModule.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java index 1c87968a3..231d9abf5 100644 --- a/src/com/android/camera/VideoModule.java +++ b/src/com/android/camera/VideoModule.java @@ -413,10 +413,9 @@ public class VideoModule implements CameraModule, String action = intent.getAction(); if (action.equals(Intent.ACTION_MEDIA_EJECT)) { stopVideoRecording(); - } else if (action.equals(Intent.ACTION_MEDIA_SCANNER_STARTED)) { RotateTextToast.makeText(mActivity, - mActivity.getResources().getString(R.string.wait), Toast.LENGTH_LONG) - .show(); + mActivity.getResources().getString(R.string.video_recording_stopped), + Toast.LENGTH_SHORT).show(); } } } @@ -1110,6 +1109,8 @@ public class VideoModule implements CameraModule, @Override public void installIntentFilter() { + if(mReceiver != null) + return; // install an intent filter to receive SD card related events. IntentFilter intentFilter = new IntentFilter(Intent.ACTION_MEDIA_EJECT); @@ -1137,6 +1138,7 @@ public class VideoModule implements CameraModule, initializeVideoControl(); showVideoSnapshotUI(false); + installIntentFilter(); if (!mPreviewing) { openCamera(); -- cgit v1.2.3