summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/VideoCamera.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/camera/VideoCamera.java')
-rwxr-xr-xsrc/com/android/camera/VideoCamera.java19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java
index 8960311..d5343fb 100755
--- a/src/com/android/camera/VideoCamera.java
+++ b/src/com/android/camera/VideoCamera.java
@@ -535,19 +535,18 @@ public class VideoCamera extends ActivityBase
}
}
- private void setOrientationIndicator(int degree) {
- if (mThumbnailView != null) mThumbnailView.setDegree(degree);
- if (mModePicker != null) mModePicker.setDegree(degree);
- if (mSharePopup != null) mSharePopup.setOrientation(degree);
- if (mBgLearningMessageRotater != null) mBgLearningMessageRotater.setOrientation(degree);
- if (mIndicatorControlContainer != null) mIndicatorControlContainer.setDegree(degree);
- if (mReviewDoneButton != null) mReviewDoneButton.setOrientation(degree);
- if (mReviewPlayButton != null) mReviewPlayButton.setOrientation(degree);
- if (mReviewCancelButton!= null) mReviewCancelButton.setOrientation(degree);
+ private void setOrientationIndicator(int orientation) {
+ Rotatable[] indicators = {mThumbnailView, mModePicker, mSharePopup,
+ mBgLearningMessageRotater, mIndicatorControlContainer,
+ mReviewDoneButton, mReviewPlayButton, mReviewCancelButton};
+ for (Rotatable indicator : indicators) {
+ if (indicator != null) indicator.setOrientation(orientation);
+ }
+
// We change the orientation of the linearlayout only for phone UI because when in portrait
// the width is not enough.
if (mLabelsLinearLayout != null) {
- if (((degree / 90) & 1) == 1) {
+ if (((orientation / 90) & 1) == 1) {
mLabelsLinearLayout.setOrientation(mLabelsLinearLayout.VERTICAL);
} else {
mLabelsLinearLayout.setOrientation(mLabelsLinearLayout.HORIZONTAL);