summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAbhijit Trivedi <abhijitt@quicinc.com>2018-12-19 13:47:28 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2018-12-19 13:47:28 -0800
commitc48104739d7221ff3c617f34f2d6c63be5888288 (patch)
tree3ef499ebbf2912dc94af1227431786a022fbbb63 /src
parent86687556325f18c44f4d07110d4fe87e9d1ab0cb (diff)
parentea20f809cf13eec7c9535e8571f0c2b5d61a1be1 (diff)
downloadandroid_packages_apps_Snap-c48104739d7221ff3c617f34f2d6c63be5888288.tar.gz
android_packages_apps_Snap-c48104739d7221ff3c617f34f2d6c63be5888288.tar.bz2
android_packages_apps_Snap-c48104739d7221ff3c617f34f2d6c63be5888288.zip
Merge "SnapdragonCamera: Set burst shotFps controlled by setprop" into camera-SnapdragonCamera.lnx.2.0
Diffstat (limited to 'src')
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java11
-rwxr-xr-xsrc/com/android/camera/util/PersistUtil.java11
2 files changed, 16 insertions, 6 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index 0c4106675..b2ebc34be 100755
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -2409,8 +2409,11 @@ public class CaptureModule implements CameraModule, PhotoController,
private void captureStillPictureForLongshot(CaptureRequest.Builder captureBuilder, int id) throws CameraAccessException{
List<CaptureRequest> burstList = new ArrayList<>();
+ boolean isBurstShotFpsEnable = PersistUtil.isBurstShotFpsEnabled();
for (int i = 0; i < MAX_IMAGEREADERS*2; i++) {
- burstList.add(mPreviewRequestBuilder[id].build());
+ if (isBurstShotFpsEnable) {
+ burstList.add(mPreviewRequestBuilder[id].build());
+ }
burstList.add(captureBuilder.build());
}
mCaptureSession[id].captureBurst(burstList, mLongshotCallBack, mCaptureCallbackHandler);
@@ -4239,7 +4242,7 @@ public class CaptureModule implements CameraModule, PhotoController,
mVideoSnapshotSize = getMaxPictureSizeLiveshot();
}
- String videoSnapshot = getVideoSnapshotSize();
+ String videoSnapshot = PersistUtil.getVideoSnapshotSize();
String[] sourceStrArray = videoSnapshot.split("x");
if (sourceStrArray != null && sourceStrArray.length >= 2) {
int width = Integer.parseInt(sourceStrArray[0]);
@@ -4281,10 +4284,6 @@ public class CaptureModule implements CameraModule, PhotoController,
return optimalSize;
}
- private String getVideoSnapshotSize(){
- return SystemProperties.get("persist.sys.camera.video.snapshotsize", "");
- }
-
private boolean isVideoSize1080P(Size size) {
return (size.getHeight() == 1080 && size.getWidth() == 1920);
}
diff --git a/src/com/android/camera/util/PersistUtil.java b/src/com/android/camera/util/PersistUtil.java
index afa82c527..bbb33a489 100755
--- a/src/com/android/camera/util/PersistUtil.java
+++ b/src/com/android/camera/util/PersistUtil.java
@@ -50,6 +50,8 @@ public class PersistUtil {
SystemProperties.getInt("persist.sys.camera.longshot.shotnum", 60);
private static final String PERSIST_CAMERA_PREVIEW_SIZE =
SystemProperties.get("persist.sys.camera.preview.size", "");
+ private static final String PERSIST_CAMERA_VIDEO_SNAPSHOTSIZE =
+ SystemProperties.get("persist.sys.camera.video.snapshotsize", "");
private static final String PERSIST_CAMERA_VIDEO_SIZE =
SystemProperties.get("persist.sys.camera.video.size", "");
private static final boolean PERSIST_CAMERA_CAMERA2 =
@@ -121,6 +123,8 @@ public class PersistUtil {
SystemProperties.get("persist.sys.camera.display.umax", "");
private static final String PERSIST_DISPLAY_LMAX =
SystemProperties.get("persist.sys.camera.display.lmax", "");
+ private static final boolean PERSIST_BURST_SHOT_FPS_ENABLED =
+ SystemProperties.getBoolean("persist.sys.camera.burst.shot.fps", false);
public static int getMemoryLimit() {
return PERSIST_MEMORY_LIMIT;
@@ -150,6 +154,10 @@ public class PersistUtil {
return result;
}
+ public static String getVideoSnapshotSize(){
+ return PERSIST_CAMERA_VIDEO_SNAPSHOTSIZE;
+ }
+
public static Point getCameraVideoSize() {
Point result = null;
if (PERSIST_CAMERA_VIDEO_SIZE != null) {
@@ -311,4 +319,7 @@ public class PersistUtil {
return PERSIST_DISPLAY_LMAX;
}
+ public static boolean isBurstShotFpsEnabled() {
+ return PERSIST_BURST_SHOT_FPS_ENABLED;
+ }
}