summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/util
diff options
context:
space:
mode:
authormingwax <mingwax@codeaurora.org>2017-04-28 13:36:54 +0800
committermingwax <mingwax@codeaurora.org>2017-07-04 10:38:20 +0800
commit45916b7512c08097ee53ab38c08fc979026fbe3c (patch)
treeaa640fff276360cb34552a0306b8806b04e81244 /src/com/android/camera/util
parent2b2d7f4c6cffdc6ad6bc0b6ef459271291c99aea (diff)
downloadandroid_packages_apps_Snap-45916b7512c08097ee53ab38c08fc979026fbe3c.tar.gz
android_packages_apps_Snap-45916b7512c08097ee53ab38c08fc979026fbe3c.tar.bz2
android_packages_apps_Snap-45916b7512c08097ee53ab38c08fc979026fbe3c.zip
SnapdragonCamera: Pass device mount orientation to Clearsight JNI
1. Add persist system property to config device mount orientation 2. Pass device mount orientation to Clearsight JNI 3. Recalculate the size of the buffer YUV. CRs-Fixed: 2039320 Change-Id: Ie3c13ccd3d261df4cad310aa6235f548263b3ca1
Diffstat (limited to 'src/com/android/camera/util')
-rw-r--r--src/com/android/camera/util/PersistUtil.java31
1 files changed, 26 insertions, 5 deletions
diff --git a/src/com/android/camera/util/PersistUtil.java b/src/com/android/camera/util/PersistUtil.java
index 89c58131a..3b80a9b2e 100644
--- a/src/com/android/camera/util/PersistUtil.java
+++ b/src/com/android/camera/util/PersistUtil.java
@@ -32,6 +32,13 @@ import android.os.SystemProperties;
public class PersistUtil {
+ public static final int CAMERA2_DEBUG_DUMP_IMAGE = 1;
+ public static final int CAMERA2_DEBUG_DUMP_LOG = 2;
+ public static final int CAMERA2_DEBUG_DUMP_ALL = 100;
+
+ private static final int CAMERA_SENSOR_HORIZONTAL_ALIGNED = 0;
+ private static final int CAMERA_SENSOR_VERTICAL_ALIGNED = 1;
+
private static final int PERSIST_MEMORY_LIMIT =
SystemProperties.getInt("persist.vendor.camera.perf.memlimit", 60);
private static final boolean PERSIST_SKIP_MEMORY_CHECK =
@@ -58,11 +65,13 @@ public class PersistUtil {
SystemProperties.get("persist.vendor.camera.stm_smooth", "0");
private static final int PERSIST_CAMERA_STILLMORE_NUM_REQUIRED_IMAGE =
SystemProperties.getInt("persist.vendor.camera.stm_img_nums", 5);
-
-
- public static final int CAMERA2_DEBUG_DUMP_IMAGE = 1;
- public static final int CAMERA2_DEBUG_DUMP_LOG = 2;
- public static final int CAMERA2_DEBUG_DUMP_ALL = 100;
+ private static final String PERSIST_CAMERA_CS_BRINTENSITY_KEY =
+ SystemProperties.get("persist.vendor.camera.sensor.brinten", "0.0");
+ private static final String PERSIST_CAMERA_CS_SMOOTH_KEY =
+ SystemProperties.get("persist.vendor.camera.sensor.smooth", "0.5");
+ private static final int PERSIST_CAMERA_SENSOR_ALIGN_KEY =
+ SystemProperties.getInt("persist.vendor.camera.sensor.align",
+ CAMERA_SENSOR_HORIZONTAL_ALIGNED);
public static int getMemoryLimit() {
return PERSIST_MEMORY_LIMIT;
@@ -117,4 +126,16 @@ public class PersistUtil {
public static int getCancelTouchFocusDelay() {
return PERSIST_CAMERA_CANCEL_TOUCHFOCUS_DELAY;
}
+
+ public static float getDualCameraBrIntensity() {
+ return Float.parseFloat(PERSIST_CAMERA_CS_BRINTENSITY_KEY);
+ }
+
+ public static float getDualCameraSmoothingIntensity() {
+ return Float.parseFloat(PERSIST_CAMERA_CS_SMOOTH_KEY);
+ }
+
+ public static boolean getDualCameraSensorAlign() {
+ return PERSIST_CAMERA_SENSOR_ALIGN_KEY == CAMERA_SENSOR_VERTICAL_ALIGNED;
+ }
}