diff options
author | junjiez <junjiez@codeaurora.org> | 2019-04-11 10:16:09 +0800 |
---|---|---|
committer | junjiez <junjiez@codeaurora.org> | 2019-04-11 13:36:38 +0800 |
commit | e83953e7bccda408d84fb6560d731cdc9761c682 (patch) | |
tree | 814d827ce07aabe7abe6e157b4d29873c5ee690e | |
parent | fef611529a3685652002d63e7e760644768f4501 (diff) | |
download | android_packages_apps_Snap-e83953e7bccda408d84fb6560d731cdc9761c682.tar.gz android_packages_apps_Snap-e83953e7bccda408d84fb6560d731cdc9761c682.tar.bz2 android_packages_apps_Snap-e83953e7bccda408d84fb6560d731cdc9761c682.zip |
SnapdraongCamera:Fix longshot count in nZSL
Send the max longshot count of capture
requests in a request list to avoid
sending more requests than expected.
Change-Id: Ie749f1605c171752b0610071e3b8e9f3ec561156
CRs-Fixed: 2431713
-rwxr-xr-x | src/com/android/camera/CaptureModule.java | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java index 213c44ce2..b53a52422 100755 --- a/src/com/android/camera/CaptureModule.java +++ b/src/com/android/camera/CaptureModule.java @@ -2244,7 +2244,7 @@ public class CaptureModule implements CameraModule, PhotoController, String value = mSettingsManager.getValue(SettingsManager.KEY_JPEG_QUALITY); int quality = getQualityNumber(value); int orientation = CameraUtil.getJpegRotation(id,mOrientation); - int imageCount = mLongshotActive? MAX_IMAGEREADERS*4 : 1; + int imageCount = mLongshotActive? PersistUtil.getLongshotShotLimit(): 1; HeifWriter writer = createHEIFEncoder(path,mPictureSize.getWidth(),mPictureSize.getHeight(), orientation,imageCount,quality); if (writer != null) { @@ -2414,20 +2414,17 @@ public class CaptureModule implements CameraModule, PhotoController, } } - if(mLongshotActive) { - captureStillPicture(getMainCameraId()); - } else { - mLongshoting = false; - mNumFramesArrived.getAndSet(0); - unlockFocus(getMainCameraId()); - } + + mLongshoting = false; + mNumFramesArrived.getAndSet(0); + unlockFocus(getMainCameraId()); } }; 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*4; i++) { + for (int i = 0; i < PersistUtil.getLongshotShotLimit(); i++) { if (isBurstShotFpsEnable) { mPreviewRequestBuilder[id].setTag("preview"); burstList.add(mPreviewRequestBuilder[id].build()); |