summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2011-11-16 11:34:51 -0800
committerEino-Ville Talvala <etalvala@google.com>2011-11-16 11:34:51 -0800
commit0e3f8387302b4aa882c20891f1faba74030f1a4f (patch)
tree100afc1aa4bdfb42747566f4e9a96bae8ed5f503 /src/com/android
parent4ff0cffb08dc4ec6d8058e6a71edce72a39f138a (diff)
downloadLegacyCamera-0e3f8387302b4aa882c20891f1faba74030f1a4f.zip
LegacyCamera-0e3f8387302b4aa882c20891f1faba74030f1a4f.tar.gz
LegacyCamera-0e3f8387302b4aa882c20891f1faba74030f1a4f.tar.bz2
Fix EffectsRecorder error path handling when ending recording.
Previously, if mRunner had already been set to null, errors sent by mediarecorder would not be propagated to VideoCamera correctly. This resulted in crashes when putting device to sleep right after starting timelapse recording with effects. Bug: 5627242 Change-Id: I3ae3c713a0aaf9a4507442bbbcd3ec89971d5f95
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/camera/EffectsRecorder.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/camera/EffectsRecorder.java b/src/com/android/camera/EffectsRecorder.java
index 390efa6..3d2aebf 100644
--- a/src/com/android/camera/EffectsRecorder.java
+++ b/src/com/android/camera/EffectsRecorder.java
@@ -798,7 +798,13 @@ public class EffectsRecorder {
if (result == GraphRunner.RESULT_ERROR) {
// Handle error case
Log.e(TAG, "Error running filter graph!");
- raiseError(mRunner == null ? null : mRunner.getError());
+ Exception e = null;
+ if (mRunner != null) {
+ e = mRunner.getError();
+ } else if (mOldRunner != null) {
+ e = mOldRunner.getError();
+ }
+ raiseError(e);
}
if (mOldRunner != null) {
// Tear down old graph if available