Elevate refocus to its own mode, merge craft and camera.
Change-Id: I9686db26993319fdaf09f09c0610bb65e00a0e05
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index 7c79dfa..89a8e98 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -232,7 +232,6 @@
private FocusOverlayManager mFocusManager;
private final int mGcamModeIndex;
- private final int mRefocusModeIndex;
private String mSceneMode;
@@ -328,8 +327,6 @@
super(app);
mGcamModeIndex = app.getAndroidContext().getResources()
.getInteger(R.integer.camera_mode_gcam);
- mRefocusModeIndex = app.getAndroidContext().getResources()
- .getInteger(R.integer.camera_mode_refocus);
}
@Override
@@ -480,18 +477,6 @@
}
};
- private final ButtonManager.ButtonCallback mRefocusCallback =
- new ButtonManager.ButtonCallback() {
- @Override
- public void onStateChanged(int state) {
- if (state == ButtonManager.OFF) {
- throw new IllegalStateException(
- "Can't switch refocus off because it should already be off.");
- }
- mActivity.onModeSelected(mRefocusModeIndex);
- }
- };
-
private final View.OnClickListener mCancelCallback = new View.OnClickListener() {
@Override
public void onClick(View v) {
@@ -526,17 +511,8 @@
bottomBarSpec.enableCamera = true;
bottomBarSpec.cameraCallback = mCameraCallback;
bottomBarSpec.enableFlash = true;
-
- if (mActivity.getCurrentModuleIndex() == mActivity.getResources()
- .getInteger(R.integer.camera_mode_photo)) {
- bottomBarSpec.hideHdr = true;
- bottomBarSpec.hideRefocus = true;
- } else {
- bottomBarSpec.enableHdr = true;
- bottomBarSpec.hdrCallback = mHdrPlusCallback;
- bottomBarSpec.enableRefocus = true;
- bottomBarSpec.refocusCallback = mRefocusCallback;
- }
+ bottomBarSpec.enableHdr = true;
+ bottomBarSpec.hdrCallback = mHdrPlusCallback;
if (isImageCaptureIntent()) {
bottomBarSpec.showCancel = true;