diff options
Diffstat (limited to 'src/com/android/camera/PhotoModule.java')
-rwxr-xr-x | src/com/android/camera/PhotoModule.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java index 08b0058e4..aae6279e6 100755 --- a/src/com/android/camera/PhotoModule.java +++ b/src/com/android/camera/PhotoModule.java @@ -161,6 +161,7 @@ public class PhotoModule private static final int SWITCH_TO_GCAM_MODULE = 12; private static final int ON_PREVIEW_STARTED = 13; private static final int UNLOCK_CAM_SHUTTER = 14; + private static final int SET_FOCUS_RATIO = 15; // The subset of parameters we need to update in setCameraParameters(). private static final int UPDATE_PARAM_INITIALIZE = 1; @@ -554,6 +555,11 @@ public class PhotoModule mUI.enableShutter(true); break; } + + case SET_FOCUS_RATIO: { + mUI.getFocusRing().setRadiusRatio((Float)msg.obj); + break; + } } } } @@ -1035,6 +1041,14 @@ public class PhotoModule } } + @Override + public void setFocusRatio(float ratio) { + mHandler.removeMessages(SET_FOCUS_RATIO); + Message m = mHandler.obtainMessage(SET_FOCUS_RATIO); + m.obj = ratio; + mHandler.sendMessage(m); + } + // TODO: need to check cached background apps memory and longshot ION memory private boolean isLongshotNeedCancel() { @@ -1672,6 +1686,8 @@ public class PhotoModule setCameraState(IDLE); break; } + mCameraDevice.refreshParameters(); + mFocusManager.setParameters(mCameraDevice.getParameters()); mFocusManager.onAutoFocus(focused, mUI.isShutterPressed()); } } @@ -1682,6 +1698,8 @@ public class PhotoModule @Override public void onAutoFocusMoving( boolean moving, CameraProxy camera) { + mCameraDevice.refreshParameters(); + mFocusManager.setParameters(mCameraDevice.getParameters()); mFocusManager.onAutoFocusMoving(moving); } } @@ -4403,6 +4421,7 @@ public class PhotoModule CameraUtil.dumpParameters(mParameters); mCameraDevice.setParameters(mParameters); + mFocusManager.setParameters(mParameters); // Switch to gcam module if HDR+ was selected if (doModeSwitch && !mIsImageCaptureIntent) { |