From 96345c8413e2336bc424844ae386a4eb9e49aecc Mon Sep 17 00:00:00 2001 From: xianming wang Date: Mon, 27 Aug 2018 11:22:18 +0800 Subject: SnapdragonCamera: Completed the EIS and video HDR function Completed the EIS and video HDR function. CRs-Fixed: 2308543 Change-Id: I92e5671e0009c48c45376d39ba8554b1fb756f61 --- src/com/android/camera/CaptureModule.java | 27 +++++++++++++++++++++++---- src/com/android/camera/ui/ProMode.java | 22 ++++++++++------------ 2 files changed, 33 insertions(+), 16 deletions(-) diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java index cf5ebdbb1..3a69a03c5 100755 --- a/src/com/android/camera/CaptureModule.java +++ b/src/com/android/camera/CaptureModule.java @@ -4024,7 +4024,7 @@ public class CaptureModule implements CameraModule, PhotoController, } }; - private void configureCameraSessionWithParameters(CameraDevice camera, + private void configureCameraSessionWithParameters(int cameraId, List outputSurfaces, CameraCaptureSession.StateCallback listener, Handler handler, CaptureRequest initialRequest) throws CameraAccessException { List outConfigurations = new ArrayList<>(outputSurfaces.size()); @@ -4033,13 +4033,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 +4066,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 +4192,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() { -- cgit v1.2.3 From 6eed2ca62fbaeb5b3e9684ade3d1dfb29f6f295b Mon Sep 17 00:00:00 2001 From: Rajshekar Eashwarappa Date: Wed, 12 Dec 2018 19:07:00 +0530 Subject: SnapdragonCamera: Check for fixed focus 1. Check whether the lens is fixed focus or variable focus 2. If the lens is fixed focus then just check for AE state and trigger snapshot, as AF state will always be 0 for fixed focus lens 3. For varialbe focus lenses check for both AF & AE state before trigger of Snapshot. Change-Id: Iafeae46bd4283d336e4686be0a055cf31297c8c5 --- src/com/android/camera/CaptureModule.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java index 3a69a03c5..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); -- cgit v1.2.3 From 4fc685f3217532da4d5d7bc0f2c8b289d1036c35 Mon Sep 17 00:00:00 2001 From: jinwu Date: Thu, 27 Dec 2018 17:35:51 +0800 Subject: change to BUILD_NUMBER_FROM_FILE Change-Id: Ic21f10e0568dc7637da676d6fa40e9062e4af6e9 --- version.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)) -- cgit v1.2.3