summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/VideoCamera.java
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2010-11-10 01:38:15 +0800
committerWu-cheng Li <wuchengli@google.com>2010-11-10 18:07:14 +0800
commit64fbf551646615592f8bd8320fef57e9aae01492 (patch)
treea37d44eecae8319381ee40e10d1117c2c1cc02d1 /src/com/android/camera/VideoCamera.java
parentd56274ad69e088a1682d33c6d414261ed080b378 (diff)
downloadLegacyCamera-64fbf551646615592f8bd8320fef57e9aae01492.zip
LegacyCamera-64fbf551646615592f8bd8320fef57e9aae01492.tar.gz
LegacyCamera-64fbf551646615592f8bd8320fef57e9aae01492.tar.bz2
Rotate the recording time according to orientation. do not merge
bug:3163671 Change-Id: I87d8d8615df136d8347fb345e68eb1f8f8b6fb8b
Diffstat (limited to 'src/com/android/camera/VideoCamera.java')
-rw-r--r--src/com/android/camera/VideoCamera.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java
index 1d17104..0c0a6d9 100644
--- a/src/com/android/camera/VideoCamera.java
+++ b/src/com/android/camera/VideoCamera.java
@@ -22,6 +22,7 @@ import com.android.camera.ui.CamcorderHeadUpDisplay;
import com.android.camera.ui.GLRootView;
import com.android.camera.ui.GLView;
import com.android.camera.ui.HeadUpDisplay;
+import com.android.camera.ui.RotateRecordingTime;
import android.content.ActivityNotFoundException;
import android.content.BroadcastReceiver;
@@ -167,6 +168,7 @@ public class VideoCamera extends NoSearchActivity
private ContentResolver mContentResolver;
private ShutterButton mShutterButton;
+ private RotateRecordingTime mRecordingTimeRect;
private TextView mRecordingTimeView;
private Switcher mSwitcher;
private boolean mRecordingTimeCountsDown = false;
@@ -183,7 +185,8 @@ public class VideoCamera extends NoSearchActivity
private MyOrientationEventListener mOrientationListener;
// The device orientation in degrees. Default is unknown.
private int mOrientation = OrientationEventListener.ORIENTATION_UNKNOWN;
- // The orientation compensation for icons and thumbnails.
+ // The orientation compensation for icons and thumbnails. Degrees are in
+ // counter-clockwise
private int mOrientationCompensation = 0;
private int mOrientationHint; // the orientation hint for video playback
@@ -336,6 +339,7 @@ public class VideoCamera extends NoSearchActivity
mIsVideoCaptureIntent = isVideoCaptureIntent();
mQuickCapture = getIntent().getBooleanExtra(EXTRA_QUICK_CAPTURE, false);
mRecordingTimeView = (TextView) findViewById(R.id.recording_time);
+ mRecordingTimeRect = (RotateRecordingTime) findViewById(R.id.recording_time_rect);
ViewGroup rootView = (ViewGroup) findViewById(R.id.video_camera);
LayoutInflater inflater = this.getLayoutInflater();
@@ -1232,6 +1236,8 @@ public class VideoCamera extends NoSearchActivity
mMediaRecorderRecording = true;
mRecordingStartTime = SystemClock.uptimeMillis();
updateRecordingIndicator(false);
+ // Rotate the recording time.
+ mRecordingTimeRect.setOrientation(mOrientationCompensation);
mRecordingTimeView.setText("");
mRecordingTimeView.setVisibility(View.VISIBLE);
updateRecordingTime();