diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index 6296cdcba07bf58b33094c905a43245160da0567..5ec93ad1fe21b958fb6ea604db4cf5e05dd86b35 100755
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -262,6 +262,7 @@ public class CaptureModule implements CameraModule, PhotoController,
 
     private boolean[] mTakingPicture = new boolean[MAX_NUM_CAM];
     private int mControlAFMode = CameraMetadata.CONTROL_AF_MODE_CONTINUOUS_PICTURE;
+    private int mLastAFmode = mControlAFMode;
     private int mLastResultAFState = -1;
     private Rect[] mCropRegion = new Rect[MAX_NUM_CAM];
     private boolean mAutoFocusRegionSupported;
@@ -2122,7 +2123,7 @@ public class CaptureModule implements CameraModule, PhotoController,
 
     private void applyCommonSettings(CaptureRequest.Builder builder, int id) {
         builder.set(CaptureRequest.CONTROL_MODE, CaptureRequest.CONTROL_MODE_AUTO);
-        builder.set(CaptureRequest.CONTROL_AF_MODE, mControlAFMode);
+        applyAfModes(builder);
         applyFaceDetection(builder);
         applyWhiteBalance(builder);
         applyExposure(builder);
@@ -2134,7 +2135,6 @@ public class CaptureModule implements CameraModule, PhotoController,
         applySaturationLevel(builder);
         applyAntiBandingLevel(builder);
         applySharpnessControlModes(builder);
-        applyAfModes(builder);
         applyExposureMeteringModes(builder);
         applyHistogram(builder);
     }
@@ -4033,10 +4033,19 @@ public class CaptureModule implements CameraModule, PhotoController,
 
     private void applyAfModes(CaptureRequest.Builder request) {
         String value = mSettingsManager.getValue(SettingsManager.KEY_AF_MODE);
+        int intValue = mLastAFmode;
         if (value != null) {
-            int intValue = Integer.parseInt(value);
+            intValue = Integer.parseInt(value);
+        }
+        if (mLastAFmode != intValue) {
+            // means afmode value changed manually
             request.set(CaptureRequest.CONTROL_AF_MODE, intValue);
+            mControlAFMode = intValue;
+        } else {
+            request.set(CaptureRequest.CONTROL_AF_MODE, mControlAFMode);
+            mSettingsManager.setValue(SettingsManager.KEY_AF_MODE, String.valueOf(mControlAFMode));
         }
+        mLastAFmode = mControlAFMode;
     }
 
     private void applyExposureMeteringModes(CaptureRequest.Builder request) {
diff --git a/version.mk b/version.mk
index 7f0658043e32a19a79de1d525426607857a9d4dc..434f1292177713d006365eed906cf2345e262b70 100755
--- a/version.mk
+++ b/version.mk
@@ -40,7 +40,7 @@
 # base_version_build is 3 digits and auto-increment for fixing CR.
 base_version_major := 2
 base_version_minor := 01
-base_version_build := 006
+base_version_build := 007
 
 #####################################################
 #####################################################