summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2019-02-10 06:52:31 -0800
committerLinux Build Service Account <lnxbuild@localhost>2019-02-10 06:52:31 -0800
commit3f64df28512b6d30787383262bc4ab27c9152e35 (patch)
tree124eb6d458a85554d475b38c5915cf42060b00dc
parent3853cc83a73ac0fac77adac9ecba346e8731cc09 (diff)
parent4fc685f3217532da4d5d7bc0f2c8b289d1036c35 (diff)
downloadandroid_packages_apps_Snap-3f64df28512b6d30787383262bc4ab27c9152e35.tar.gz
android_packages_apps_Snap-3f64df28512b6d30787383262bc4ab27c9152e35.tar.bz2
android_packages_apps_Snap-3f64df28512b6d30787383262bc4ab27c9152e35.zip
Merge 4fc685f3217532da4d5d7bc0f2c8b289d1036c35 on remote branch
Change-Id: I5e65bd3c1a28ab899ddee188137a53ec18501c10
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java36
-rwxr-xr-xsrc/com/android/camera/ui/ProMode.java22
-rwxr-xr-xversion.mk6
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))