summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/VideoCamera.java
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-02-13 12:57:53 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-02-13 12:57:53 -0800
commit5055ba62e22becc9c8d03898b80cda8ed68cfe80 (patch)
treebbd9f3365ac6e2592f582509eef36fcc07ce28dc /src/com/android/camera/VideoCamera.java
parentdee42a6e53cb1d0c7194b0cb92028cca353d7c5c (diff)
downloadLegacyCamera-5055ba62e22becc9c8d03898b80cda8ed68cfe80.zip
LegacyCamera-5055ba62e22becc9c8d03898b80cda8ed68cfe80.tar.gz
LegacyCamera-5055ba62e22becc9c8d03898b80cda8ed68cfe80.tar.bz2
auto import from //branches/cupcake/...@131421
Diffstat (limited to 'src/com/android/camera/VideoCamera.java')
-rw-r--r--src/com/android/camera/VideoCamera.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java
index 3474da6..e3b7ebe 100644
--- a/src/com/android/camera/VideoCamera.java
+++ b/src/com/android/camera/VideoCamera.java
@@ -150,17 +150,26 @@ public class VideoCamera extends Activity implements View.OnClickListener,
long delta = now - mRecordingStartTime;
long seconds = delta / 1000;
long minutes = seconds / 60;
+ long hours = minutes / 60;
+ long remainderMinutes = minutes - (hours * 60);
long remainderSeconds = seconds - (minutes * 60);
String secondsString = Long.toString(remainderSeconds);
if (secondsString.length() < 2) {
secondsString = "0" + secondsString;
}
- String minutesString = Long.toString(minutes);
+ String minutesString = Long.toString(remainderMinutes);
if (minutesString.length() < 2) {
minutesString = "0" + minutesString;
}
String text = minutesString + ":" + secondsString;
+ if (hours > 0) {
+ String hoursString = Long.toString(hours);
+ if (hoursString.length() < 2) {
+ hoursString = "0" + hoursString;
+ }
+ text = hoursString + ":" + text;
+ }
mRecordingTimeView.setText(text);
// Work around a limitation of the T-Mobile G1: The T-Mobile
// hardware blitter can't pixel-accurately scale and clip at the same time,
@@ -910,7 +919,7 @@ public class VideoCamera extends Activity implements View.OnClickListener,
private void stopVideoRecording() {
Log.v(TAG, "stopVideoRecording");
if (mMediaRecorderRecording || mMediaRecorder != null) {
- if (mMediaRecorderRecording) {
+ if (mMediaRecorderRecording && mMediaRecorder != null) {
mMediaRecorder.stop();
mCurrentVideoFilename = mCameraVideoFilename;
Log.v(TAG, "Setting current video filename: " + mCurrentVideoFilename);