diff options
author | Danny Baumann <dannybaumann@web.de> | 2017-01-09 11:51:34 +0100 |
---|---|---|
committer | Zhao Wei Liew <zhaoweiliew@gmail.com> | 2017-01-24 09:44:52 +0000 |
commit | 48d968543f12747298abe3f199eb843dbc583cdd (patch) | |
tree | 3689a49de9de68654e1c500876fce55fdd7884ad /src | |
parent | 0e68dec285dd3ecd2d9ed69350fb487b0e62680b (diff) | |
download | android_packages_apps_Snap-48d968543f12747298abe3f199eb843dbc583cdd.tar.gz android_packages_apps_Snap-48d968543f12747298abe3f199eb843dbc583cdd.tar.bz2 android_packages_apps_Snap-48d968543f12747298abe3f199eb843dbc583cdd.zip |
Correctly return to film strip after editing a picture.
Change-Id: Icd4e47474f871d427d10ab2575e0d9622f1b4369
(cherry picked from commit e0a3c03cf912c6b437dd2bf96f486b88c699fb9c)
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/camera/CameraActivity.java | 19 | ||||
-rwxr-xr-x | src/com/android/camera/CaptureModule.java | 4 | ||||
-rw-r--r-- | src/com/android/camera/PhotoModule.java | 4 | ||||
-rw-r--r-- | src/com/android/camera/VideoModule.java | 4 | ||||
-rw-r--r-- | src/com/android/camera/WideAnglePanoramaModule.java | 4 | ||||
-rw-r--r-- | src/com/android/camera/ui/CameraControls.java | 6 |
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 b573530a6..ee66776bf 100755 --- 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(); } |