diff options
author | Steve Kondik <steve@cyngn.com> | 2016-11-07 16:50:48 -0800 |
---|---|---|
committer | Michael Bestas <mikeioannina@gmail.com> | 2017-01-04 22:00:39 +0200 |
commit | d6162483d308b8d796d8fcec975437376c3bb868 (patch) | |
tree | a59496db1af01971f83b66e98659a5027c555162 /src/com/android/camera/PhotoUI.java | |
parent | d1351bbb3e79ebbfe82e9e596ab76cf839a5fd1b (diff) | |
download | android_packages_apps_Snap-d6162483d308b8d796d8fcec975437376c3bb868.tar.gz android_packages_apps_Snap-d6162483d308b8d796d8fcec975437376c3bb868.tar.bz2 android_packages_apps_Snap-d6162483d308b8d796d8fcec975437376c3bb868.zip |
Reenable left swipe for Filmstrip
* These commits are from the CameraNext application in COS.
* Credits: Ed Carrigan, Ed Mancebo, Wilhelm Fitzpatrick
Revert "SnapdragonCamera: Fix preview broken when coming back from gallery"
This reverts commit 5b8948f83a65e8f9bd1b419bd11511e48dc34887.
Revert "SnapdragonCamera: fix crash after photo deletion"
This reverts commit 171d2b253a752ca104ccf4a58f4e9d6d82bd7b28.
CameraNext: Fix camera crash on device unlock
This patch from the plugin branch also fixes CYNGNOS-1878
Due to the bug below, when the camera is fore-grounded when device
is unlocked, the SurfaceView is getting recreated, which caused it
to be in a weird state when we were trying to reattach the preview
to it.
-----
Fixed Black Screen On Back.
The issue was that mCameraView was not being populated when it
should have been (after it had been added to the view hierarchy).
The problem was the SurfaceView was being removed from the hierarchy
when it shouldn't have been.
Issue-Id: CP-129
(cherry picked from commit 4010462fe0b4cf1c15624cfca7d6a3d4d380613a)
CameraNext: avoid scaling camera preview in filmstrip
(cherry picked from commit 823ed983c4dccac3959635f1a14fcfe47cd7b120)
CameraNext: fade camera preview to black during film strip transition
Instead of scaling and translating the camera preview to make room for film strip
images, we leave the preview in place and cover it gradually with the black preview
cover.
CameraNext : Add offset calculation for left navbar
Also prevent preview from translating while hidden - was
causing occasional glimpses of it in filmstrip.
CameraNext : Ensure vertical/horizontal swipes don't conflict
Ensure that the user can't swipe horizontally while trying
to delete the image. Avoids all sorts of synching issues between
mViewItem and the data adapter since the buffer is trying to constantly
keep its center to be the current visible item
CYNGNOS-1069
CameraNext: fix crash on entering filmstrip via thumbnail tap
mVerticalViewId was getting initialized in onUp, but if filmstrip
was entered without a swipe, no onUp occurred. Fixed by directly
initializing the field on object creation.
CameraNext: Fix ZoomView in the filmstrip
The ZoomView was getting covered in the Z axis while scrolling.
issue-id: SAMBAR-862
Revert "SnapdragonCamera: fix camera preview broken when resume from gallery"
This reverts commit 0acc1f027637c4f0126883be68f97817d7306032.
Change-Id: If4dd591c5c752a7fa33c669c15875c0077446a37
Diffstat (limited to 'src/com/android/camera/PhotoUI.java')
-rw-r--r-- | src/com/android/camera/PhotoUI.java | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/com/android/camera/PhotoUI.java b/src/com/android/camera/PhotoUI.java index 75e810d8b..3683c7a31 100644 --- a/src/com/android/camera/PhotoUI.java +++ b/src/com/android/camera/PhotoUI.java @@ -79,7 +79,7 @@ import com.android.camera.ui.ZoomRenderer; import com.android.camera.ui.focus.FocusRing; import com.android.camera.util.CameraUtil; -public class PhotoUI implements PieListener, +public class PhotoUI extends BaseUI implements PieListener, PreviewGestures.SingleTapListener, SurfaceHolder.Callback, CameraRootView.MyDisplayListener, @@ -143,7 +143,6 @@ public class PhotoUI implements PieListener, private boolean mOrientationResize; private boolean mPrevOrientationResize; - private View mPreviewCover; private RotateLayout mMenuLayout; private RotateLayout mSubMenuLayout; private LinearLayout mPreviewMenuLayout; @@ -479,6 +478,8 @@ public class PhotoUI implements PieListener, RectF r = new RectF(mSurfaceView.getLeft(), mSurfaceView.getTop(), mSurfaceView.getRight(), mSurfaceView.getBottom()); mController.onPreviewRectChanged(CameraUtil.rectFToRect(r)); + // Make sure preview cover is hidden if preview data is available. + hidePreviewCover(); } @Override @@ -816,7 +817,7 @@ public class PhotoUI implements PieListener, if (mPieRenderer != null) { mPieRenderer.setBlockFocus(!previewFocused); } - setShowMenu(previewFocused); + //setShowMenu(previewFocused); if (!previewFocused && mCountDownView != null) mCountDownView.cancelCountDown(); } @@ -1216,17 +1217,6 @@ public class PhotoUI implements PieListener, mNotSelectableToast.show(); } - public void showPreviewCover() { - mPreviewCover.setVisibility(View.VISIBLE); - } - - public void hidePreviewCover() { - // Hide the preview cover if need. - if (mPreviewCover.getVisibility() != View.GONE) { - mPreviewCover.setVisibility(View.GONE); - } - } - public boolean isPreviewCoverVisible() { if ((mPreviewCover != null) && (mPreviewCover.getVisibility() == View.VISIBLE)) { |