diff options
Diffstat (limited to 'src/com/android/camera/Camera.java')
-rw-r--r-- | src/com/android/camera/Camera.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java index cd8a0b3..4a311de 100644 --- a/src/com/android/camera/Camera.java +++ b/src/com/android/camera/Camera.java @@ -82,7 +82,7 @@ public class Camera extends ActivityBase implements FocusManager.Listener, View.OnTouchListener, ShutterButton.OnShutterButtonListener, SurfaceHolder.Callback, ModePicker.OnModeChangeListener, FaceDetectionListener, CameraPreference.OnPreferenceChangedListener, - LocationManager.Listener { + LocationManager.Listener, ShutterButton.OnShutterButtonLongPressListener { private static final String TAG = "camera"; @@ -369,6 +369,7 @@ public class Camera extends ActivityBase implements FocusManager.Listener, // Initialize shutter button. mShutterButton = (ShutterButton) findViewById(R.id.shutter_button); mShutterButton.setOnShutterButtonListener(this); + mShutterButton.setOnShutterButtonLongPressListener(this); mShutterButton.setVisibility(View.VISIBLE); // Initialize focus UI. @@ -1318,6 +1319,7 @@ public class Camera extends ActivityBase implements FocusManager.Listener, finish(); } + @Override public void onShutterButtonFocus(ShutterButton button, boolean pressed) { switch (button.getId()) { case R.id.shutter_button: @@ -1326,6 +1328,7 @@ public class Camera extends ActivityBase implements FocusManager.Listener, } } + @Override public void onShutterButtonClick(ShutterButton button) { switch (button.getId()) { case R.id.shutter_button: @@ -1334,6 +1337,15 @@ public class Camera extends ActivityBase implements FocusManager.Listener, } } + @Override + public void onShutterButtonLongPressed(ShutterButton button) { + if (mPausing || mCameraState == SNAPSHOT_IN_PROGRESS + || mCameraDevice == null || mPicturesRemaining <= 0) return; + + Log.v(TAG, "onShutterButtonLongPressed"); + mFocusManager.shutterLongPressed(); + } + private OnScreenHint mStorageHint; private void updateStorageHint() { |