diff options
author | Wu-cheng Li <wuchengli@google.com> | 2011-11-18 18:28:09 +0800 |
---|---|---|
committer | Wu-cheng Li <wuchengli@google.com> | 2011-11-18 18:55:15 +0800 |
commit | 90089f9eddde732725c43dcad07f4567ed8cb776 (patch) | |
tree | 81e3f318ebbd42199aa9bca72c56dd0276b7b004 /src/com/android/camera/panorama | |
parent | 13c101cf7829c98da4341a39ecc142afc024cdb7 (diff) | |
download | packages_apps_LegacyCamera-90089f9eddde732725c43dcad07f4567ed8cb776.zip packages_apps_LegacyCamera-90089f9eddde732725c43dcad07f4567ed8cb776.tar.gz packages_apps_LegacyCamera-90089f9eddde732725c43dcad07f4567ed8cb776.tar.bz2 |
Update camera sound API.
bug:5640219
Change-Id: Ic3af6527f3025ec04ba4be16b621b462f89953f1
Diffstat (limited to 'src/com/android/camera/panorama')
-rwxr-xr-x | src/com/android/camera/panorama/PanoramaActivity.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/com/android/camera/panorama/PanoramaActivity.java b/src/com/android/camera/panorama/PanoramaActivity.java index 69fcc83..d446e41 100755 --- a/src/com/android/camera/panorama/PanoramaActivity.java +++ b/src/com/android/camera/panorama/PanoramaActivity.java @@ -49,7 +49,7 @@ import android.graphics.SurfaceTexture; import android.graphics.YuvImage; import android.hardware.Camera.Parameters; import android.hardware.Camera.Size; -import android.hardware.Camera.Sound; +import android.hardware.CameraSound; import android.hardware.Sensor; import android.hardware.SensorManager; import android.media.ExifInterface; @@ -176,6 +176,8 @@ public class PanoramaActivity extends ActivityBase implements private RotateDialogController mRotateDialog; + private CameraSound mCameraSound; + private class MosaicJpeg { public MosaicJpeg(byte[] data, int width, int height) { this.data = data; @@ -271,6 +273,7 @@ public class PanoramaActivity extends ActivityBase implements mDialogOkString = getResources().getString(R.string.dialog_ok); mDialogPanoramaFailedString = getResources().getString(R.string.pano_dialog_panorama_failed); + mCameraSound = new CameraSound(); mMainHandler = new Handler() { @Override @@ -733,11 +736,11 @@ public class PanoramaActivity extends ActivityBase implements // right now. switch (mCaptureState) { case CAPTURE_STATE_VIEWFINDER: - mCameraDevice.playSound(Sound.START_VIDEO_RECORDING); + mCameraSound.playSound(CameraSound.START_VIDEO_RECORDING); startCapture(); break; case CAPTURE_STATE_MOSAIC: - mCameraDevice.playSound(Sound.STOP_VIDEO_RECORDING); + mCameraSound.playSound(CameraSound.STOP_VIDEO_RECORDING); stopCapture(false); } } @@ -977,6 +980,7 @@ public class PanoramaActivity extends ActivityBase implements clearMosaicFrameProcessorIfNeeded(); mOrientationEventListener.disable(); resetScreenOn(); + mCameraSound.release(); System.gc(); } |