merge in ics-factoryrom-2-release history after reset to ics-mr0
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java
index 1bedb4f..8898510 100644
--- a/src/com/android/camera/Camera.java
+++ b/src/com/android/camera/Camera.java
@@ -82,7 +82,7 @@
View.OnTouchListener, ShutterButton.OnShutterButtonListener,
SurfaceHolder.Callback, ModePicker.OnModeChangeListener,
FaceDetectionListener, CameraPreference.OnPreferenceChangedListener,
- LocationManager.Listener, ShutterButton.OnShutterButtonLongPressListener {
+ LocationManager.Listener {
private static final String TAG = "camera";
@@ -370,7 +370,6 @@
// Initialize shutter button.
mShutterButton = (ShutterButton) findViewById(R.id.shutter_button);
mShutterButton.setOnShutterButtonListener(this);
- mShutterButton.setOnShutterButtonLongPressListener(this);
mShutterButton.setVisibility(View.VISIBLE);
// Initialize focus UI.
@@ -1393,15 +1392,6 @@
mFocusManager.doSnap();
}
- @Override
- public void onShutterButtonLongPressed() {
- if (mPausing || mCameraState == SNAPSHOT_IN_PROGRESS
- || mCameraDevice == null || mPicturesRemaining <= 0) return;
-
- Log.v(TAG, "onShutterButtonLongPressed");
- mFocusManager.shutterLongPressed();
- }
-
private OnScreenHint mStorageHint;
private void updateStorageHint() {
diff --git a/src/com/android/camera/FocusManager.java b/src/com/android/camera/FocusManager.java
index 86b92c2..72ea8b5 100644
--- a/src/com/android/camera/FocusManager.java
+++ b/src/com/android/camera/FocusManager.java
@@ -56,7 +56,6 @@
private boolean mInitialized;
private boolean mFocusAreaSupported;
- private boolean mInLongPress;
private boolean mLockAeAwbNeeded;
private boolean mAeAwbLock;
private Matrix mMatrix;
@@ -174,22 +173,6 @@
}
}
- public void shutterLongPressed() {
- if (Parameters.FOCUS_MODE_CONTINUOUS_PICTURE.equals(mFocusMode)
- && isSupported(Parameters.FOCUS_MODE_AUTO, mParameters.getSupportedFocusModes())) {
- if (mState == STATE_IDLE || mState == STATE_FOCUSING_SNAP_ON_FINISH) {
- Log.e(TAG, "Invalid focus state=" + mState);
- }
- mInLongPress = true;
- // Cancel any outstanding Auto focus requests. The auto focus mode
- // will be changed from CAF to auto in cancelAutoFocus.
- onShutterUp();
- // Call Autofocus
- onShutterDown();
- mInLongPress = false;
- }
- }
-
public void doSnap() {
if (!mInitialized) return;
@@ -379,11 +362,7 @@
public String getFocusMode() {
if (mOverrideFocusMode != null) return mOverrideFocusMode;
- if (mInLongPress) {
- // Users long-press the shutter button in CAF. Change it to auto
- // mode, so it will do a full scan.
- mFocusMode = Parameters.FOCUS_MODE_AUTO;
- } else if (mFocusAreaSupported && mFocusArea != null) {
+ if (mFocusAreaSupported && mFocusArea != null) {
// Always use autofocus in tap-to-focus.
mFocusMode = Parameters.FOCUS_MODE_AUTO;
} else {
diff --git a/src/com/android/camera/ShutterButton.java b/src/com/android/camera/ShutterButton.java
index ace154e..c7f792a 100755
--- a/src/com/android/camera/ShutterButton.java
+++ b/src/com/android/camera/ShutterButton.java
@@ -26,7 +26,7 @@
* It's currently an {@code ImageView} that can call a delegate when the
* pressed state changes.
*/
-public class ShutterButton extends ImageView implements View.OnLongClickListener {
+public class ShutterButton extends ImageView {
/**
* A callback to be invoked when a ShutterButton's pressed state changes.
*/
@@ -40,30 +40,17 @@
void onShutterButtonClick();
}
- /**
- * A callback to be invoked when a ShutterButton's long pressed.
- */
- public interface OnShutterButtonLongPressListener {
- void onShutterButtonLongPressed();
- }
-
private OnShutterButtonListener mListener;
- private OnShutterButtonLongPressListener mLongPressListener;
private boolean mOldPressed;
public ShutterButton(Context context, AttributeSet attrs) {
super(context, attrs);
- setOnLongClickListener(this);
}
public void setOnShutterButtonListener(OnShutterButtonListener listener) {
mListener = listener;
}
- public void setOnShutterButtonLongPressListener(OnShutterButtonLongPressListener listener) {
- mLongPressListener = listener;
- }
-
/**
* Hook into the drawable state changing to get changes to isPressed -- the
* onPressed listener doesn't always get called when the pressed state
@@ -122,12 +109,4 @@
}
return result;
}
-
- @Override
- public boolean onLongClick(View v) {
- if (mLongPressListener != null) {
- mLongPressListener.onShutterButtonLongPressed();
- }
- return false;
- }
}