diff options
-rwxr-xr-x | src/com/android/camera/CaptureModule.java | 36 | ||||
-rwxr-xr-x | src/com/android/camera/ui/ProMode.java | 22 | ||||
-rwxr-xr-x | version.mk | 6 |
3 files changed, 44 insertions, 20 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java index cf5ebdbb1..a55c9e451 100755 --- a/src/com/android/camera/CaptureModule.java +++ b/src/com/android/camera/CaptureModule.java @@ -1037,7 +1037,14 @@ public class CaptureModule implements CameraModule, PhotoController, } } - if ((CaptureResult.CONTROL_AF_STATE_FOCUSED_LOCKED == afState || + // If the lens is just fixed focus then check only + // for AE Lock else check AF & AE state before + // trigger of capture + if (mSettingsManager.isFixedFocus(getMainCameraId())) { + if (aeState == null || aeState == CaptureResult.CONTROL_AE_STATE_LOCKED) { + checkAfAeStatesAndCapture(id); + } + } else if ((CaptureResult.CONTROL_AF_STATE_FOCUSED_LOCKED == afState || CaptureResult.CONTROL_AF_STATE_NOT_FOCUSED_LOCKED == afState) && (aeState == null || aeState == CaptureResult.CONTROL_AE_STATE_LOCKED)) { checkAfAeStatesAndCapture(id); @@ -4024,7 +4031,7 @@ public class CaptureModule implements CameraModule, PhotoController, } }; - private void configureCameraSessionWithParameters(CameraDevice camera, + private void configureCameraSessionWithParameters(int cameraId, List<Surface> outputSurfaces, CameraCaptureSession.StateCallback listener, Handler handler, CaptureRequest initialRequest) throws CameraAccessException { List<OutputConfiguration> outConfigurations = new ArrayList<>(outputSurfaces.size()); @@ -4033,13 +4040,32 @@ public class CaptureModule implements CameraModule, PhotoController, outConfigurations.add(new OutputConfiguration(surface)); } + String zzHDR = mSettingsManager.getValue(SettingsManager.KEY_VIDEO_HDR_VALUE); + boolean zzHdrStatue = zzHDR.equals("1"); + // if enable ZZHDR mode, don`t call the setOpModeForVideoStream method. + /* if (!zzHdrStatue) { + setOpModeForVideoStream(cameraId); + }*/ + String value = mSettingsManager.getValue(SettingsManager.KEY_FOVC_VALUE); + if (value != null && Boolean.parseBoolean(value)) { + mStreamConfigOptMode = mStreamConfigOptMode | STREAM_CONFIG_MODE_FOVC; + } + if (zzHdrStatue) { + mStreamConfigOptMode = STREAM_CONFIG_MODE_ZZHDR; + } + if (DEBUG) { + Log.v(TAG, "configureCameraSessionWithParameters mStreamConfigOptMode :" + + mStreamConfigOptMode); + } + Method method_setSessionParameters = null; Method method_createCaptureSession = null; Object sessionConfig = null; try { Class clazz = Class.forName("android.hardware.camera2.params.SessionConfiguration"); sessionConfig = clazz.getConstructors()[0].newInstance( - SESSION_REGULAR, outConfigurations, new HandlerExecutor(handler), listener); + SESSION_REGULAR | mStreamConfigOptMode, outConfigurations, + new HandlerExecutor(handler), listener); if (method_setSessionParameters == null) { method_setSessionParameters = clazz.getDeclaredMethod( "setSessionParameters", CaptureRequest.class); @@ -4047,7 +4073,7 @@ public class CaptureModule implements CameraModule, PhotoController, method_setSessionParameters.invoke(sessionConfig, initialRequest); method_createCaptureSession = CameraDevice.class.getDeclaredMethod( "createCaptureSession", clazz); - method_createCaptureSession.invoke(camera, sessionConfig); + method_createCaptureSession.invoke(mCameraDevice[cameraId], sessionConfig); } catch (Exception exception) { Log.w(TAG, "configureCameraSessionWithParameters method is not exist"); exception.printStackTrace(); @@ -4173,7 +4199,7 @@ public class CaptureModule implements CameraModule, PhotoController, mSessionListener, mCameraHandler, initialRequest); } else { - configureCameraSessionWithParameters(mCameraDevice[cameraId], surfaces, + configureCameraSessionWithParameters(cameraId, surfaces, mSessionListener, mCameraHandler, mVideoRequestBuilder.build()); } } else { diff --git a/src/com/android/camera/ui/ProMode.java b/src/com/android/camera/ui/ProMode.java index c5193bdef..7a0dede04 100755 --- a/src/com/android/camera/ui/ProMode.java +++ b/src/com/android/camera/ui/ProMode.java @@ -325,20 +325,18 @@ public class ProMode extends View { mIndex = index; String key = currentKey(); - if (mIndex > 0) { - View v = mAddedViews.get(mIndex); - if (v instanceof TextView) { - ((TextView) v).setTextColor(BLUE); - } else if (v instanceof ImageView) { - if (mMode == WHITE_BALANCE_MODE) { - ((ImageView) v).setImageResource(wbIconsBlue[mIndex]); - } + View v = mAddedViews.get(mIndex); + if (v instanceof TextView) { + ((TextView) v).setTextColor(BLUE); + } else if (v instanceof ImageView) { + if (mMode == WHITE_BALANCE_MODE) { + ((ImageView) v).setImageResource(wbIconsBlue[mIndex]); } - if (key != null) mSettingsManager.setValueIndex(key, mIndex); - CharSequence[] cc = mSettingsManager.getEntries(key); - mUI.updateProModeText(mMode, cc[mIndex].toString()); - invalidate(); } + if (key != null) mSettingsManager.setValueIndex(key, mIndex); + CharSequence[] cc = mSettingsManager.getEntries(key); + mUI.updateProModeText(mMode, cc[mIndex].toString()); + invalidate(); } private void removeViews() { diff --git a/version.mk b/version.mk index ae04a1a52..bf9ff6367 100755 --- a/version.mk +++ b/version.mk @@ -45,7 +45,7 @@ base_version_build := 015 ##################################################### ##################################################### # Collect automatic version code parameters -ifneq "" "$(filter eng.%,$(BUILD_NUMBER))" +ifneq "" "$(filter eng.%,$(BUILD_NUMBER_FROM_FILE))" # This is an eng build base_version_buildtype := 0 else @@ -84,8 +84,8 @@ version_code_package := $(base_version_major)$(base_version_minor)$(base_version # - For eng build (t=0): M.m.bbb eng.$(USER)-hh # - For build server (t=1): M.m.bbb (nnnnnn-hh) # where nnnnnn is the build number from the build server (no zero-padding) -# On eng builds, the BUILD_NUMBER has the user and timestamp inline -ifneq "" "$(filter eng.%,$(BUILD_NUMBER))" +# On eng builds, the BUILD_NUMBER_FROM_FILE has the user and timestamp inline +ifneq "" "$(filter eng.%,$(BUILD_NUMBER_FROM_FILE))" git_hash := $(shell git --git-dir $(LOCAL_PATH)/.git log -n 1 --pretty=format:%h) date_string := $$(date +%m%d%y_%H%M%S) version_name_package := $(base_version_major).$(base_version_minor).$(base_version_build) (eng.$(USER).$(git_hash).$(date_string)-$(base_version_arch)$(base_version_density)) |