summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/camera/Camera.java8
-rw-r--r--src/com/android/camera/EffectsRecorder.java10
-rw-r--r--src/com/android/camera/FocusManager.java4
-rwxr-xr-xsrc/com/android/camera/panorama/PanoramaActivity.java10
4 files changed, 16 insertions, 16 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java
index a391e20..8c74d24 100644
--- a/src/com/android/camera/Camera.java
+++ b/src/com/android/camera/Camera.java
@@ -43,9 +43,9 @@ import android.hardware.Camera.FaceDetectionListener;
import android.hardware.Camera.Parameters;
import android.hardware.Camera.PictureCallback;
import android.hardware.Camera.Size;
-import android.hardware.CameraSound;
import android.location.Location;
import android.media.CameraProfile;
+import android.media.MediaActionSound;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
@@ -184,7 +184,7 @@ public class Camera extends ActivityBase implements FocusManager.Listener,
// generating thumbnails. This reduces the shot-to-shot time.
private ImageSaver mImageSaver;
- private CameraSound mCameraSound;
+ private MediaActionSound mCameraSound;
private Runnable mDoSnapRunnable = new Runnable() {
public void run() {
@@ -1066,7 +1066,7 @@ public class Camera extends ActivityBase implements FocusManager.Listener,
@Override
public void playSound(int soundId) {
- mCameraSound.playSound(soundId);
+ mCameraSound.play(soundId);
}
private boolean saveDataToFile(String filePath, byte[] data) {
@@ -1204,7 +1204,7 @@ public class Camera extends ActivityBase implements FocusManager.Listener,
// Do this after starting preview because it depends on camera
// parameters.
initializeIndicatorControl();
- mCameraSound = new CameraSound();
+ mCameraSound = new MediaActionSound();
// Make sure preview is started.
try {
diff --git a/src/com/android/camera/EffectsRecorder.java b/src/com/android/camera/EffectsRecorder.java
index b649bc2..678c0b7 100644
--- a/src/com/android/camera/EffectsRecorder.java
+++ b/src/com/android/camera/EffectsRecorder.java
@@ -32,7 +32,7 @@ import android.filterpacks.videosrc.SurfaceTextureSource.SurfaceTextureSourceLis
import android.graphics.SurfaceTexture;
import android.hardware.Camera;
-import android.hardware.CameraSound;
+import android.media.MediaActionSound;
import android.media.MediaRecorder;
import android.media.CamcorderProfile;
import android.os.Handler;
@@ -118,7 +118,7 @@ public class EffectsRecorder {
private boolean mLogVerbose = Log.isLoggable(TAG, Log.VERBOSE);
private static final String TAG = "effectsrecorder";
- private CameraSound mCameraSound;
+ private MediaActionSound mCameraSound;
/** Determine if a given effect is supported at runtime
* Some effects require libraries not available on all devices
@@ -138,7 +138,7 @@ public class EffectsRecorder {
if (mLogVerbose) Log.v(TAG, "EffectsRecorder created (" + this + ")");
mContext = context;
mHandler = new Handler(Looper.getMainLooper());
- mCameraSound = new CameraSound();
+ mCameraSound = new MediaActionSound();
}
public void setCamera(Camera cameraDevice) {
@@ -693,7 +693,7 @@ public class EffectsRecorder {
recorder.setInputValue("maxFileSize", mMaxFileSize);
recorder.setInputValue("maxDurationMs", mMaxDurationMs);
recorder.setInputValue("recording", true);
- mCameraSound.playSound(CameraSound.START_VIDEO_RECORDING);
+ mCameraSound.play(MediaActionSound.START_VIDEO_RECORDING);
mState = STATE_RECORD;
}
@@ -713,7 +713,7 @@ public class EffectsRecorder {
}
Filter recorder = mRunner.getGraph().getFilter("recorder");
recorder.setInputValue("recording", false);
- mCameraSound.playSound(CameraSound.STOP_VIDEO_RECORDING);
+ mCameraSound.play(MediaActionSound.STOP_VIDEO_RECORDING);
mState = STATE_PREVIEW;
}
diff --git a/src/com/android/camera/FocusManager.java b/src/com/android/camera/FocusManager.java
index 72a0919..2b4ea6b 100644
--- a/src/com/android/camera/FocusManager.java
+++ b/src/com/android/camera/FocusManager.java
@@ -26,7 +26,7 @@ import android.graphics.Rect;
import android.graphics.RectF;
import android.hardware.Camera.Area;
import android.hardware.Camera.Parameters;
-import android.hardware.CameraSound;
+import android.media.MediaActionSound;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
@@ -224,7 +224,7 @@ public class FocusManager {
// so the state is always STATE_FOCUSING.
if (!Parameters.FOCUS_MODE_CONTINUOUS_PICTURE.
equals(mFocusMode)) {
- mListener.playSound(CameraSound.FOCUS_COMPLETE);
+ mListener.playSound(MediaActionSound.FOCUS_COMPLETE);
}
} else {
mState = STATE_FAIL;
diff --git a/src/com/android/camera/panorama/PanoramaActivity.java b/src/com/android/camera/panorama/PanoramaActivity.java
index 46f9e34..3278bd6 100755
--- a/src/com/android/camera/panorama/PanoramaActivity.java
+++ b/src/com/android/camera/panorama/PanoramaActivity.java
@@ -50,10 +50,10 @@ import android.graphics.SurfaceTexture;
import android.graphics.YuvImage;
import android.hardware.Camera.Parameters;
import android.hardware.Camera.Size;
-import android.hardware.CameraSound;
import android.hardware.Sensor;
import android.hardware.SensorManager;
import android.media.ExifInterface;
+import android.media.MediaActionSound;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
@@ -180,7 +180,7 @@ public class PanoramaActivity extends ActivityBase implements
private RotateDialogController mRotateDialog;
- private CameraSound mCameraSound;
+ private MediaActionSound mCameraSound;
private class MosaicJpeg {
public MosaicJpeg(byte[] data, int width, int height) {
@@ -293,7 +293,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();
+ mCameraSound = new MediaActionSound();
mMainHandler = new Handler() {
@Override
@@ -763,11 +763,11 @@ public class PanoramaActivity extends ActivityBase implements
// right now.
switch (mCaptureState) {
case CAPTURE_STATE_VIEWFINDER:
- mCameraSound.playSound(CameraSound.START_VIDEO_RECORDING);
+ mCameraSound.play(MediaActionSound.START_VIDEO_RECORDING);
startCapture();
break;
case CAPTURE_STATE_MOSAIC:
- mCameraSound.playSound(CameraSound.STOP_VIDEO_RECORDING);
+ mCameraSound.play(MediaActionSound.STOP_VIDEO_RECORDING);
stopCapture(false);
}
}