summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/util/PersistUtil.java
diff options
context:
space:
mode:
authormingwax <mingwax@codeaurora.org>2017-03-27 13:48:32 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2017-04-24 02:19:23 -0700
commit5d35734b41ca5a21e74ee8d10a217dc77257c17c (patch)
treeb23fbb6be4e5b2f23a05f2e42ccaf2ec1032b626 /src/com/android/camera/util/PersistUtil.java
parenta27f5779a51b581e60bd36b4af4ce5e32a005a3c (diff)
downloadandroid_packages_apps_Snap-5d35734b41ca5a21e74ee8d10a217dc77257c17c.tar.gz
android_packages_apps_Snap-5d35734b41ca5a21e74ee8d10a217dc77257c17c.tar.bz2
android_packages_apps_Snap-5d35734b41ca5a21e74ee8d10a217dc77257c17c.zip
SnapdragonCamera: add method nativeConfigureStillmore
(1) Add the method nativeConfigureStillMore, and can set the parameter: brColor态brIntensity态smoothingIntensity. (2) Add custom properties to control some of the parameters of stillmore. CRs-Fixed: 2013253 Change-Id: I62871f7d27f8f8c16514378bd06e945099c677e5
Diffstat (limited to 'src/com/android/camera/util/PersistUtil.java')
-rw-r--r--[-rwxr-xr-x]src/com/android/camera/util/PersistUtil.java36
1 files changed, 33 insertions, 3 deletions
diff --git a/src/com/android/camera/util/PersistUtil.java b/src/com/android/camera/util/PersistUtil.java
index 69860491e..c22df6263 100755..100644
--- a/src/com/android/camera/util/PersistUtil.java
+++ b/src/com/android/camera/util/PersistUtil.java
@@ -46,8 +46,16 @@ public class PersistUtil {
SystemProperties.getBoolean("persist.camera.zsl.disabled", false);
private static final int PERSIST_CAMERA_CANCEL_TOUCHFOCUS_DELAY =
SystemProperties.getInt("persist.camera.focus_delay", 5000);
- private static final int PERSIST_CAMERA2_DEBUG =
- SystemProperties.getInt("persist.camera2.debug", 0);
+ private static final int PERSIST_CAMERA_DEBUG =
+ SystemProperties.getInt("persist.camera.debug", 0);
+ private static final String PERSIST_CAMERA_STILLMORE_BRCOLR =
+ SystemProperties.get("persist.camera.stm_brcolor", "0.5");
+ private static final String PERSIST_CAMERA_STILLMORE_BRINTENSITY =
+ SystemProperties.get("persist.camera.stm_brintensity", "0.6");
+ private static final String PERSIST_CAMERA_STILLMORE_SMOOTHINGINTENSITY =
+ SystemProperties.get("persist.camera.stm_smooth", "0");
+ private static final int PERSIST_CAMERA_STILLMORE_NUM_REQUIRED_IMAGE =
+ SystemProperties.getInt("persist.camera.stm_img_nums", 5);
public static final int CAMERA2_DEBUG_DUMP_IMAGE = 1;
public static final int CAMERA2_DEBUG_DUMP_LOG = 2;
@@ -78,7 +86,29 @@ public class PersistUtil {
}
public static int getCamera2Debug() {
- return PERSIST_CAMERA2_DEBUG;
+ return PERSIST_CAMERA_DEBUG;
+ }
+
+ public static float getStillmoreBrColor(){
+ float brColor = Float.parseFloat(PERSIST_CAMERA_STILLMORE_BRCOLR);
+ return brColor = (brColor < 0 || brColor > 1) ? 0.5f : brColor;
+ }
+
+ public static float getStillmoreBrIntensity(){
+ float brIntensity = Float.parseFloat(PERSIST_CAMERA_STILLMORE_BRINTENSITY);
+ return brIntensity = (brIntensity < 0 || brIntensity > 1) ? 0.6f : brIntensity;
+ }
+
+ public static float getStillmoreSmoothingIntensity(){
+ float smoothingIntensity = Float.parseFloat(PERSIST_CAMERA_STILLMORE_SMOOTHINGINTENSITY);
+ return smoothingIntensity = (smoothingIntensity < 0 || smoothingIntensity > 1) ?
+ 0f : smoothingIntensity;
+ }
+
+ public static int getStillmoreNumRequiredImages() {
+ return (PERSIST_CAMERA_STILLMORE_NUM_REQUIRED_IMAGE < 3 ||
+ PERSIST_CAMERA_STILLMORE_NUM_REQUIRED_IMAGE > 5) ?
+ 5 : PERSIST_CAMERA_STILLMORE_NUM_REQUIRED_IMAGE;
}
public static int getCancelTouchFocusDelay() {