From 55a707849b3f86da4f94e250c51bafbbc7944ac7 Mon Sep 17 00:00:00 2001 From: jinwu Date: Wed, 22 Aug 2018 15:43:22 +0800 Subject: Add video start/stop logs for KPI Change-Id: I3854b199e77fe0a636465b6fce91895a49ac1c03 --- src/com/android/camera/CaptureModule.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java index 7b5403f8b..b8aa35973 100755 --- a/src/com/android/camera/CaptureModule.java +++ b/src/com/android/camera/CaptureModule.java @@ -4305,6 +4305,7 @@ public class CaptureModule implements CameraModule, PhotoController, requestAudioFocus(); try { mMediaRecorder.start(); // Recording is now started + Log.d(TAG, "StartRecordingVideo done."); } catch (RuntimeException e) { Toast.makeText(mActivity,"Could not start media recorder.\n " + "Can't start video recording.", Toast.LENGTH_LONG).show(); @@ -4603,6 +4604,7 @@ public class CaptureModule implements CameraModule, PhotoController, setEndOfStream(true, false); if (!ApiHelper.HAS_RESUME_SUPPORTED){ mMediaRecorder.start(); + Log.d(TAG, "StartRecordingVideo done."); } else { try { Method resumeRec = Class.forName("android.media.MediaRecorder").getMethod("resume"); -- cgit v1.2.3 From b1f0558be07bafe8d58982d1f508d372a54f66bc Mon Sep 17 00:00:00 2001 From: zhuw Date: Mon, 8 Oct 2018 17:20:45 +0800 Subject: Requirement from EIS team don't set endofstream when pause by default add switcher for setting vendor tags when pasue CRs-Fixed:2353032 Change-Id: I7da748cff85584d65818834180a5f9a843c1009d --- res/values/camera2arrays.xml | 2 ++ res/values/qcomstrings.xml | 2 ++ src/com/android/camera/CaptureModule.java | 11 ++++++++--- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/res/values/camera2arrays.xml b/res/values/camera2arrays.xml index e05303325..a75cf208f 100755 --- a/res/values/camera2arrays.xml +++ b/res/values/camera2arrays.xml @@ -1146,12 +1146,14 @@ for time lapse recording --> @string/pref_camera2_eis_entry_disable @string/pref_camera2_eis_entry_v2enable @string/pref_camera2_eis_entry_v3enable + @string/pref_camera2_eis_entry_v3_set_when_pause @string/pref_camera2_eis_entry_value_disable @string/pref_camera2_eis_entry_value_v2enable @string/pref_camera2_eis_entry_value_v3enable + @string/pref_camera2_eis_entry_value_v3_set_when_pause diff --git a/res/values/qcomstrings.xml b/res/values/qcomstrings.xml index 8d12e70f6..dfe75c811 100755 --- a/res/values/qcomstrings.xml +++ b/res/values/qcomstrings.xml @@ -1239,9 +1239,11 @@ disable V2 V3 + V3 and set when pause disable V2 V3 + V3SetWhenPause disable Video FOVC diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java index b8aa35973..cf5ebdbb1 100755 --- a/src/com/android/camera/CaptureModule.java +++ b/src/com/android/camera/CaptureModule.java @@ -4587,9 +4587,14 @@ public class CaptureModule implements CameraModule, PhotoController, Log.v(TAG, "pauseVideoRecording"); mMediaRecorderPausing = true; mRecordingTotalTime += SystemClock.uptimeMillis() - mRecordingStartTime; + String value = mSettingsManager.getValue(SettingsManager.KEY_EIS_VALUE); + boolean noNeedEndofStreamWhenPause = value != null && value.equals("V3"); // As EIS is not supported for HFR case (>=120 ) // and FOVC also currently don’t require this for >=120 case - if (mHighSpeedCapture && ((int)mHighSpeedFPSRange.getUpper() >= HIGH_SESSION_MAX_FPS)) { + // so use noNeedEndOfStreamInHFR to control + boolean noNeedEndOfStreamInHFR = mHighSpeedCapture && + ((int)mHighSpeedFPSRange.getUpper() >= HIGH_SESSION_MAX_FPS); + if (noNeedEndofStreamWhenPause || noNeedEndOfStreamInHFR) { mMediaRecorder.pause(); } else { setEndOfStream(false, false); @@ -4627,7 +4632,7 @@ public class CaptureModule implements CameraModule, PhotoController, } } else { // is pause or stopRecord - if (!(mMediaRecorderPausing && mStopRecPending) && (mCurrentSession != null)) { + if ((mMediaRecorderPausing || mStopRecPending) && (mCurrentSession != null)) { mCurrentSession.stopRepeating(); try { mVideoRequestBuilder.set(CaptureModule.recording_end_stream, (byte) 0x01); @@ -5288,7 +5293,7 @@ public class CaptureModule implements CameraModule, PhotoController, if (value != null) { if (value.equals("V2")) { mStreamConfigOptMode = STREAM_CONFIG_MODE_QTIEIS_REALTIME; - } else if (value.equals("V3")) { + } else if (value.equals("V3") || value.equals("V3SetWhenPause")) { mStreamConfigOptMode = STREAM_CONFIG_MODE_QTIEIS_LOOKAHEAD; } byte byteValue = (byte) (value.equals("disable") ? 0x00 : 0x01); -- cgit v1.2.3 From 40e3806ecd16a188c5b0e0a9f57e98eefe712bd6 Mon Sep 17 00:00:00 2001 From: xianming wang Date: Thu, 25 Oct 2018 15:38:35 +0800 Subject: SnapdragonCamera: SunSet and Landscape use HAL-ZSL mode SunSet and Landscape use HAL-ZSL mode as default. CRs-Fixed: 2358000 Change-Id: I60e03ca3ec084c3fa85c3504c73fd54daf9f6279 --- assets/dependency.json | 6 ++++-- src/com/android/camera/SettingsManager.java | 6 +----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/assets/dependency.json b/assets/dependency.json index 2a6339083..3ded5afb5 100644 --- a/assets/dependency.json +++ b/assets/dependency.json @@ -49,7 +49,8 @@ "pref_camera2_longshot_key":"off"} , "4": - {"pref_camera2_coloreffect_key":"0"} + {"pref_camera2_coloreffect_key":"0", + "pref_camera2_zsl_key":"hal-zsl"} , "5": {"pref_camera2_coloreffect_key":"0", @@ -62,7 +63,8 @@ {"pref_camera2_coloreffect_key":"0"} , "10": - {"pref_camera2_coloreffect_key":"0"} + {"pref_camera2_coloreffect_key":"0", + "pref_camera2_zsl_key":"hal-zsl"} , "13": {"pref_camera2_coloreffect_key":"0"} diff --git a/src/com/android/camera/SettingsManager.java b/src/com/android/camera/SettingsManager.java index 08488c9ee..b62573b76 100755 --- a/src/com/android/camera/SettingsManager.java +++ b/src/com/android/camera/SettingsManager.java @@ -1756,11 +1756,7 @@ public class SettingsManager implements ListMenu.SettingsListener { public boolean isZSLInAppEnabled(){ String value = getValue(KEY_ZSL); String appZSLValue = mContext.getString(R.string.pref_camera2_zsl_entryvalue_app_zsl); - if ( (value != null && value.equals(appZSLValue)) || - SettingsManager.SCENE_MODE_SUNSET_STRING.equals( - SettingsManager.getInstance().getValue(SettingsManager.KEY_SCENE_MODE)) || - SettingsManager.SCENE_MODE_LANDSCAPE_STRING.equals( - SettingsManager.getInstance().getValue(SettingsManager.KEY_SCENE_MODE))){ + if ( value != null && value.equals(appZSLValue)){ return true; }else{ return false; -- cgit v1.2.3 From 5455b09e9e1d76cba58624934e639564222ac994 Mon Sep 17 00:00:00 2001 From: zhuw Date: Thu, 13 Dec 2018 10:07:07 +0800 Subject: Change version to 015 change version to 015 Change-Id: I4e98a3f8717f0d85915587f71c8fbd488a8137a0 CRs-Fixed:2353032 --- version.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.mk b/version.mk index 2ae76a392..ae04a1a52 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 := 02 -base_version_build := 014 +base_version_build := 015 ##################################################### ##################################################### -- cgit v1.2.3 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