summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorDoris Liu <tianliu@google.com>2013-05-07 17:33:27 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-05-07 17:33:27 -0700
commit01fd3f2eb5a6b2239fee7b53bbbaa508dddcb3da (patch)
treeb4dade009e2463decf2d2e3edb88ec1dbe2537a3 /src/com/android
parentb046fa1e21e056da33d26a7f7e1fd8dcf3038db3 (diff)
parentca83651a7fd9244682d340e4af2c6f52f5ba80ed (diff)
downloadandroid_packages_apps_Gallery2-01fd3f2eb5a6b2239fee7b53bbbaa508dddcb3da.tar.gz
android_packages_apps_Gallery2-01fd3f2eb5a6b2239fee7b53bbbaa508dddcb3da.tar.bz2
android_packages_apps_Gallery2-01fd3f2eb5a6b2239fee7b53bbbaa508dddcb3da.zip
am ca83651a: am b281a646: Merge "Fix video capture intent overlapping buttons" into gb-ub-photos-bryce
* commit 'ca83651a7fd9244682d340e4af2c6f52f5ba80ed': Fix video capture intent overlapping buttons
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/camera/VideoController.java2
-rw-r--r--src/com/android/camera/VideoModule.java9
-rw-r--r--src/com/android/camera/VideoUI.java3
-rw-r--r--src/com/android/camera/ui/CameraControls.java2
4 files changed, 14 insertions, 2 deletions
diff --git a/src/com/android/camera/VideoController.java b/src/com/android/camera/VideoController.java
index 8bde8090f..474f521de 100644
--- a/src/com/android/camera/VideoController.java
+++ b/src/com/android/camera/VideoController.java
@@ -27,7 +27,7 @@ public interface VideoController extends OnShutterButtonListener {
public void onReviewPlayClicked(View view);
public boolean isVideoCaptureIntent();
-
+ public boolean isInReviewMode();
public int onZoomChanged(int index);
public void onSingleTapUp(View view, int x, int y);
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index 0bcdbabb5..f7830a303 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -126,6 +126,7 @@ public class VideoModule implements CameraModule,
private boolean mIsVideoCaptureIntent;
private boolean mQuickCapture;
+ private boolean mIsInReviewMode = false;
private MediaRecorder mMediaRecorder;
private EffectsRecorder mEffectsRecorder;
@@ -541,15 +542,22 @@ public class VideoModule implements CameraModule,
@OnClickAttr
public void onReviewDoneClicked(View v) {
+ mIsInReviewMode = false;
doReturnToCaller(true);
}
@OnClickAttr
public void onReviewCancelClicked(View v) {
+ mIsInReviewMode = false;
stopVideoRecording();
doReturnToCaller(false);
}
+ @Override
+ public boolean isInReviewMode() {
+ return mIsInReviewMode;
+ }
+
private void onStopVideoRecording() {
mEffectsDisplayResult = true;
boolean recordFail = stopVideoRecording();
@@ -1525,6 +1533,7 @@ public class VideoModule implements CameraModule,
}
private void showCaptureResult() {
+ mIsInReviewMode = true;
Bitmap bitmap = null;
if (mVideoFileDescriptor != null) {
bitmap = Thumbnail.createVideoThumbnailBitmap(mVideoFileDescriptor.getFileDescriptor(),
diff --git a/src/com/android/camera/VideoUI.java b/src/com/android/camera/VideoUI.java
index 0afcd8a8d..0c9457204 100644
--- a/src/com/android/camera/VideoUI.java
+++ b/src/com/android/camera/VideoUI.java
@@ -293,6 +293,9 @@ public class VideoUI implements SurfaceHolder.Callback, PieRenderer.PieListener,
}
public void dismissPopup(boolean topLevelPopupOnly, boolean fullScreen) {
+ // In review mode, we do not want to bring up the camera UI
+ if (mController.isInReviewMode()) return;
+
if (fullScreen) {
mActivity.showUI();
mBlocker.setVisibility(View.VISIBLE);
diff --git a/src/com/android/camera/ui/CameraControls.java b/src/com/android/camera/ui/CameraControls.java
index d63a454a9..7940ae0d9 100644
--- a/src/com/android/camera/ui/CameraControls.java
+++ b/src/com/android/camera/ui/CameraControls.java
@@ -317,7 +317,7 @@ public class CameraControls extends RotatableLayout {
// on the wrong side of the screen. We need to make adjustment to move the controls
// to the USB side
public void adjustControlsToRightPosition() {
- int orientation = Util.getDisplayRotation((Activity) getContext());
+ int orientation = getUnifiedRotation();
if (orientation >= 180) {
flipChildren();
}