summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Martins <bgcngm@gmail.com>2019-02-26 23:10:34 +0000
committerBruno Martins <bgcngm@gmail.com>2019-03-01 22:04:56 +0000
commit39f672bedd8263930d5595b4f7fbc371ef7aba4a (patch)
treea3e672b3d23ff9e634738b3b274d280d14dd6701
parent0b449ed17e510e47ac281ac1d636847464ab8b72 (diff)
parent3f64df28512b6d30787383262bc4ab27c9152e35 (diff)
downloadandroid_packages_apps_Snap-39f672bedd8263930d5595b4f7fbc371ef7aba4a.zip
android_packages_apps_Snap-39f672bedd8263930d5595b4f7fbc371ef7aba4a.tar.gz
android_packages_apps_Snap-39f672bedd8263930d5595b4f7fbc371ef7aba4a.tar.bz2
Merge tag 'LA.UM.7.3.r1-06900-sdm845.0' into HEAD
"LA.UM.7.3.r1-06900-sdm845.0" Change-Id: I4e8868d30070d938f48d98858a484607555649f3
-rw-r--r--assets/dependency.json6
-rwxr-xr-xres/values/camera2arrays.xml2
-rwxr-xr-xres/values/qcomstrings.xml2
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java49
-rwxr-xr-xsrc/com/android/camera/SettingsManager.java6
-rwxr-xr-xsrc/com/android/camera/ui/ProMode.java22
-rwxr-xr-xversion.mk8
7 files changed, 64 insertions, 31 deletions
diff --git a/assets/dependency.json b/assets/dependency.json
index 2a63390..3ded5af 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/res/values/camera2arrays.xml b/res/values/camera2arrays.xml
index 5a7fe9a..24a4571 100755
--- a/res/values/camera2arrays.xml
+++ b/res/values/camera2arrays.xml
@@ -1056,12 +1056,14 @@ for time lapse recording -->
<item>@string/pref_camera2_eis_entry_disable</item>
<item>@string/pref_camera2_eis_entry_v2enable</item>
<item>@string/pref_camera2_eis_entry_v3enable</item>
+ <item>@string/pref_camera2_eis_entry_v3_set_when_pause</item>
</string-array>
<string-array name="pref_camera2_eis_entryvalues" translatable="false">
<item>@string/pref_camera2_eis_entry_value_disable</item>
<item>@string/pref_camera2_eis_entry_value_v2enable</item>
<item>@string/pref_camera2_eis_entry_value_v3enable</item>
+ <item>@string/pref_camera2_eis_entry_value_v3_set_when_pause</item>
</string-array>
<string-array name="pref_camera2_fovc_entries" translatable="false">
diff --git a/res/values/qcomstrings.xml b/res/values/qcomstrings.xml
index e894757..8e02293 100755
--- a/res/values/qcomstrings.xml
+++ b/res/values/qcomstrings.xml
@@ -1194,9 +1194,11 @@
<string name="pref_camera2_eis_default" translatable="false">disable</string>
<string name="pref_camera2_eis_entry_v2enable">V2</string>
<string name="pref_camera2_eis_entry_v3enable">V3</string>
+ <string name="pref_camera2_eis_entry_v3_set_when_pause">V3 and set when pause</string>
<string name="pref_camera2_eis_entry_disable">Disabled</string>
<string name="pref_camera2_eis_entry_value_v2enable" translatable="false">V2</string>
<string name="pref_camera2_eis_entry_value_v3enable" translatable="false">V3</string>
+ <string name="pref_camera2_eis_entry_value_v3_set_when_pause" translatable="false">V3SetWhenPause</string>
<string name="pref_camera2_eis_entry_value_disable" translatable="false">disable</string>
<string name="pref_camera2_fovc_title">Video FOVC</string>
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index ec781dd..6f6a32a 100755
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -1048,7 +1048,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);
@@ -4032,7 +4039,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());
@@ -4041,13 +4048,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);
@@ -4055,7 +4081,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();
@@ -4181,7 +4207,7 @@ public class CaptureModule implements CameraModule, PhotoController,
mSessionListener, mCameraHandler, initialRequest);
} else {
- configureCameraSessionWithParameters(mCameraDevice[cameraId], surfaces,
+ configureCameraSessionWithParameters(cameraId, surfaces,
mSessionListener, mCameraHandler, mVideoRequestBuilder.build());
}
} else {
@@ -4313,6 +4339,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();
@@ -4594,9 +4621,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);
@@ -4611,6 +4643,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");
@@ -4633,7 +4666,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);
@@ -5298,7 +5331,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);
diff --git a/src/com/android/camera/SettingsManager.java b/src/com/android/camera/SettingsManager.java
index 5170465..dd798bc 100755
--- a/src/com/android/camera/SettingsManager.java
+++ b/src/com/android/camera/SettingsManager.java
@@ -1786,11 +1786,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;
diff --git a/src/com/android/camera/ui/ProMode.java b/src/com/android/camera/ui/ProMode.java
index c5193bd..7a0dede 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 2ae76a3..bf9ff63 100755
--- a/version.mk
+++ b/version.mk
@@ -40,12 +40,12 @@
# 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
#####################################################
#####################################################
# 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))