diff options
Diffstat (limited to 'src/com/android/camera/VideoUI.java')
-rw-r--r-- | src/com/android/camera/VideoUI.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/com/android/camera/VideoUI.java b/src/com/android/camera/VideoUI.java index 684179698..622ffa3d3 100644 --- a/src/com/android/camera/VideoUI.java +++ b/src/com/android/camera/VideoUI.java @@ -305,9 +305,25 @@ public class VideoUI implements PieRenderer.PieListener, /** * Starts a capture animation + */ + public void animateCapture() { + Bitmap bitmap = null; + if (mTextureView != null) { + bitmap = mTextureView.getBitmap((int) mSurfaceTextureUncroppedWidth / 2, + (int) mSurfaceTextureUncroppedHeight / 2); + } + animateCapture(bitmap); + } + + /** + * Starts a capture animation * @param bitmap the captured image that we shrink and slide in the animation */ public void animateCapture(Bitmap bitmap) { + if (bitmap == null) { + Log.e(TAG, "No valid bitmap for capture animation."); + return; + } ((ImageView) mPreviewThumb).setImageBitmap(bitmap); mAnimationManager.startCaptureAnimation(mPreviewThumb); } |