diff options
author | Camera Software Integration <camswint@localhost> | 2015-11-10 13:19:41 -0800 |
---|---|---|
committer | Camera Software Integration <camswint@localhost> | 2015-12-22 16:10:47 +0530 |
commit | 854974258687f49cab1216fc32f75a3cdbc4785f (patch) | |
tree | 7fa4ed3c7911b1d4472c665a59033663d0889157 /src/com/android/camera/WideAnglePanoramaUI.java | |
parent | 74f3341640267fcb7867995314e39098aac55dd0 (diff) | |
download | android_packages_apps_Snap-854974258687f49cab1216fc32f75a3cdbc4785f.tar.gz android_packages_apps_Snap-854974258687f49cab1216fc32f75a3cdbc4785f.tar.bz2 android_packages_apps_Snap-854974258687f49cab1216fc32f75a3cdbc4785f.zip |
SnapdragonCamera: Do not update panorama thumbnail when cancelled
Do not update thumbnail when panorama is cancelled.
Change-Id: I3db9f9614b35ee4e475fbb7b1dc801b77e6ed6bd
CRs-Fixed: 934157
Diffstat (limited to 'src/com/android/camera/WideAnglePanoramaUI.java')
-rw-r--r-- | src/com/android/camera/WideAnglePanoramaUI.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/com/android/camera/WideAnglePanoramaUI.java b/src/com/android/camera/WideAnglePanoramaUI.java index 862e4d2ba..f79115449 100644 --- a/src/com/android/camera/WideAnglePanoramaUI.java +++ b/src/com/android/camera/WideAnglePanoramaUI.java @@ -88,6 +88,7 @@ public class WideAnglePanoramaUI implements private ShutterButton mShutterButton; private CameraControls mCameraControls; private ImageView mThumbnail; + private Bitmap mThumbnailBitmap; private Matrix mProgressDirectionMatrix = new Matrix(); private float[] mProgressAngle = new float[2]; @@ -299,7 +300,7 @@ public class WideAnglePanoramaUI implements mCaptureProgressBar.setVisibility(View.INVISIBLE); } - public void showFinalMosaic(Bitmap bitmap, int orientation) { + public void saveFinalMosaic(Bitmap bitmap, int orientation) { if (bitmap != null && orientation != 0) { Matrix rotateMatrix = new Matrix(); rotateMatrix.setRotate(orientation); @@ -316,7 +317,14 @@ public class WideAnglePanoramaUI implements // a framework bug. Call requestLayout() as a workaround. mSavingProgressBar.requestLayout(); - mActivity.updateThumbnail(bitmap); + mThumbnailBitmap = bitmap; + } + + public void showFinalMosaic() { + if (mThumbnailBitmap == null) return; + mActivity.updateThumbnail(mThumbnailBitmap); + mThumbnailBitmap.recycle(); + mThumbnailBitmap = null; } public void onConfigurationChanged( |