summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Yoo <jyoo@codeaurora.org>2016-01-22 15:52:00 -0800
committerSteve Kondik <steve@cyngn.com>2016-08-03 15:45:45 -0700
commitf64b94c590a37fa8c7e42d3a8058f1c297ca1739 (patch)
tree6e87833bbd2cb17c36265da1e3712e9c2fe19e4a
parentf5fb6cfd9038e128adb05044bf6ec87fb2215976 (diff)
downloadandroid_packages_apps_Snap-f64b94c590a37fa8c7e42d3a8058f1c297ca1739.zip
android_packages_apps_Snap-f64b94c590a37fa8c7e42d3a8058f1c297ca1739.tar.gz
android_packages_apps_Snap-f64b94c590a37fa8c7e42d3a8058f1c297ca1739.tar.bz2
SnapdragonCamera: Register media status listener
Register sd card media status listener on resume. Change-Id: I7b3b7e3104b7729c83d83926bb794e0d7ec237d2 CRs-Fixed: 960865
-rw-r--r--src/com/android/camera/VideoModule.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index 1c87968..231d9ab 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();