summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/camera/CameraActivity.java19
-rw-r--r--src/com/android/camera/CaptureModule.java4
-rw-r--r--src/com/android/camera/PhotoModule.java4
-rw-r--r--src/com/android/camera/VideoModule.java4
-rw-r--r--src/com/android/camera/WideAnglePanoramaModule.java4
-rw-r--r--src/com/android/camera/ui/CameraControls.java6
6 files changed, 24 insertions, 17 deletions
diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java
index 250e49e8a..d18a4a442 100644
--- a/src/com/android/camera/CameraActivity.java
+++ b/src/com/android/camera/CameraActivity.java
@@ -1698,13 +1698,6 @@ public class CameraActivity extends Activity
}
}
- @Override
- public void onWindowFocusChanged(boolean focus) {
- // Hide action bar first since we are in full screen mode first, and
- // switch the system UI to lights-out mode.
- if (focus) this.setSystemBarsVisibility(false);
- }
-
/**
* Checks if any of the needed Android runtime permissions are missing.
* If they are, then launch the permissions activity under one of the following conditions:
@@ -1750,9 +1743,6 @@ public class CameraActivity extends Activity
finish();
return;
}
- // Hide action bar first since we are in full screen mode first, and
- // switch the system UI to lights-out mode.
- this.setSystemBarsVisibility(false);
UsageStatistics.onEvent(UsageStatistics.COMPONENT_CAMERA,
UsageStatistics.ACTION_FOREGROUNDED, this.getClass().getSimpleName());
@@ -1762,14 +1752,21 @@ public class CameraActivity extends Activity
super.onResume();
mPaused = false;
mCurrentModule.onResumeAfterSuper();
- mCurrentModule.animateControls(0);
setSwipingEnabled(true);
if (mResetToPreviewOnResume) {
+ // Hide action bar first since we are in full screen mode first, and
+ // switch the system UI to lights-out mode.
+ setSystemBarsVisibility(false);
// Go to the preview on resume.
+ mCurrentModule.animateControls(0);
mFilmStripView.getController().goToFirstItem();
+ } else {
+ setSystemBarsVisibility(true);
+ mCurrentModule.animateControls(1);
}
+
// Default is showing the preview, unless disabled by explicitly
// starting an activity we want to return from to the filmstrip rather
// than the preview.
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index 9ccfc6e59..b9eca0c0a 100644
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -429,7 +429,9 @@ public class CaptureModule extends BaseModule<CaptureUI> implements PhotoControl
mActivity.runOnUiThread(new Runnable() {
@Override
public void run() {
- mUI.hidePreviewCover();
+ if (arePreviewControlsVisible()) {
+ mUI.hidePreviewCover();
+ }
}
});
mFirstPreviewLoaded = true;
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index e41c77762..590a11226 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -2997,7 +2997,9 @@ public class PhotoModule extends BaseModule<PhotoUI> implements
new CameraManager.CameraPreviewDataCallback() {
@Override
public void onPreviewFrame(byte[] data, CameraProxy camera) {
- mUI.hidePreviewCover();
+ if (arePreviewControlsVisible()) {
+ mUI.hidePreviewCover();
+ }
}
});
mCameraDevice.startPreview();
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index ea78bb42a..b72cc1cee 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -1356,7 +1356,9 @@ public class VideoModule extends BaseModule<VideoUI> implements
new CameraManager.CameraPreviewDataCallback() {
@Override
public void onPreviewFrame(byte[] data, CameraProxy camera) {
- mUI.hidePreviewCover();
+ if (arePreviewControlsVisible()) {
+ mUI.hidePreviewCover();
+ }
}
});
mCameraDevice.startPreview();
diff --git a/src/com/android/camera/WideAnglePanoramaModule.java b/src/com/android/camera/WideAnglePanoramaModule.java
index 59b71e06b..e7c95c015 100644
--- a/src/com/android/camera/WideAnglePanoramaModule.java
+++ b/src/com/android/camera/WideAnglePanoramaModule.java
@@ -1167,7 +1167,9 @@ public class WideAnglePanoramaModule extends BaseModule<WideAnglePanoramaUI> imp
new CameraManager.CameraPreviewDataCallback() {
@Override
public void onPreviewFrame(byte[] data, CameraProxy camera) {
- mUI.hidePreviewCover();
+ if (arePreviewControlsVisible()) {
+ mUI.hidePreviewCover();
+ }
}
});
mCameraDevice.startPreview();
diff --git a/src/com/android/camera/ui/CameraControls.java b/src/com/android/camera/ui/CameraControls.java
index f06c14d1b..c57c538f5 100644
--- a/src/com/android/camera/ui/CameraControls.java
+++ b/src/com/android/camera/ui/CameraControls.java
@@ -468,7 +468,9 @@ public class CameraControls extends RotatableLayout {
} else {
mRemainingPhotosText.setText(remaining + " ");
}
- mRemainingPhotos.setVisibility(View.VISIBLE);
+ if (mAnimationHelper.areControlsVisible()) {
+ mRemainingPhotos.setVisibility(View.VISIBLE);
+ }
}
mCurrentRemaining = remaining;
}
@@ -489,7 +491,6 @@ public class CameraControls extends RotatableLayout {
} else {
mBottomBar.setBackgroundResource(R.drawable.camera_controls_bg_translucent);
}
- mAnimationHelper.reset();
}
public void showRefocusToast(boolean show) {
@@ -636,6 +637,7 @@ public class CameraControls extends RotatableLayout {
}
public void reset() {
+ dump("reset");
if (mAnimator != null) {
mAnimator.cancel();
}