summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/VideoCamera.java
diff options
context:
space:
mode:
authorOwen Lin <owenlin@google.com>2009-06-26 15:47:39 -0700
committerOwen Lin <owenlin@google.com>2009-07-01 15:32:22 -0700
commit482a3a54cfa8ec2cc913efc0e73a01d78453ee6d (patch)
tree3ac284b8f0217fe1e6bec73c6bdeac8fa51f6adf /src/com/android/camera/VideoCamera.java
parent35f8af0ff228adfeec6bb40844d362f6dd62dab6 (diff)
downloadLegacyCamera-482a3a54cfa8ec2cc913efc0e73a01d78453ee6d.zip
LegacyCamera-482a3a54cfa8ec2cc913efc0e73a01d78453ee6d.tar.gz
LegacyCamera-482a3a54cfa8ec2cc913efc0e73a01d78453ee6d.tar.bz2
Fixed the OOM in crop image.
The original code of "CropImage" won't wait the save action to be complete before exiting. We have to hide the ProgressDialog in onStop(), otherwise, if the job is done in background(after onStop()), a "no window token exception" will be thrown when dialog.dismiss() is called. Thus, a new MonitoredActivity is introduced to help us handle this, hope it will be useful in other places.
Diffstat (limited to 'src/com/android/camera/VideoCamera.java')
-rw-r--r--src/com/android/camera/VideoCamera.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java
index 106588c..657bbad 100644
--- a/src/com/android/camera/VideoCamera.java
+++ b/src/com/android/camera/VideoCamera.java
@@ -1256,13 +1256,11 @@ public class VideoCamera extends Activity implements View.OnClickListener,
if (mRecordingTimeCountsDown != countdownRemainingTime) {
// Avoid setting the color on every update, do it only
// when it needs changing.
-
mRecordingTimeCountsDown = countdownRemainingTime;
- int color =
- getResources().getColor(
- countdownRemainingTime ? R.color.recording_time_remaining_text
- : R.color.recording_time_elapsed_text);
+ int color = getResources().getColor(countdownRemainingTime
+ ? R.color.recording_time_remaining_text
+ : R.color.recording_time_elapsed_text);
mRecordingTimeView.setTextColor(color);
}