summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzhuw <zhuw@codeaurora.org>2018-10-08 17:20:45 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2018-11-23 00:08:51 -0800
commitb1f0558be07bafe8d58982d1f508d372a54f66bc (patch)
tree517455b207e23daf82ece7d4300f6c4407cef62b
parent55a707849b3f86da4f94e250c51bafbbc7944ac7 (diff)
downloadandroid_packages_apps_Snap-b1f0558be07bafe8d58982d1f508d372a54f66bc.zip
android_packages_apps_Snap-b1f0558be07bafe8d58982d1f508d372a54f66bc.tar.gz
android_packages_apps_Snap-b1f0558be07bafe8d58982d1f508d372a54f66bc.tar.bz2
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
-rwxr-xr-xres/values/camera2arrays.xml2
-rwxr-xr-xres/values/qcomstrings.xml2
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java11
3 files changed, 12 insertions, 3 deletions
diff --git a/res/values/camera2arrays.xml b/res/values/camera2arrays.xml
index e053033..a75cf20 100755
--- a/res/values/camera2arrays.xml
+++ b/res/values/camera2arrays.xml
@@ -1146,12 +1146,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 8d12e70..dfe75c8 100755
--- a/res/values/qcomstrings.xml
+++ b/res/values/qcomstrings.xml
@@ -1239,9 +1239,11 @@
<string name="pref_camera2_eis_default" translatable="false">disable</string>
<string name="pref_camera2_eis_entry_v2enable" translatable="false">V2</string>
<string name="pref_camera2_eis_entry_v3enable" translatable="false">V3</string>
+ <string name="pref_camera2_eis_entry_v3_set_when_pause" translatable="false">V3 and set when pause</string>
<string name="pref_camera2_eis_entry_disable" translatable="false">disable</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" translatable="true">Video FOVC</string>
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index b8aa359..cf5ebdb 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);