diff options
| author | junjiez <junjiez@codeaurora.org> | 2019-04-11 10:16:09 +0800 |
|---|---|---|
| committer | junjiez <junjiez@codeaurora.org> | 2019-04-16 16:54:40 +0800 |
| commit | 155fc5a6d6670f152c991034996fcb116feba1e8 (patch) | |
| tree | 42788d9853f754bd5567fc5140f3d4a0bea8648d /src/com/android/camera/CaptureModule.java | |
| parent | 4dd8df2bf518f72f8b2ddf18fb9ef9778d08f764 (diff) | |
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: 2436119
Diffstat (limited to 'src/com/android/camera/CaptureModule.java')
| -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 18e200832..f9989ea18 100755 --- a/src/com/android/camera/CaptureModule.java +++ b/src/com/android/camera/CaptureModule.java @@ -2471,7 +2471,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*2 : 1; + int imageCount = mLongshotActive? PersistUtil.getLongshotShotLimit(): 1; HeifWriter writer = createHEIFEncoder(path,mPictureSize.getWidth(),mPictureSize.getHeight(), orientation,imageCount,quality); if (writer != null) { @@ -2641,20 +2641,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*2; i++) { + for (int i = 0; i < PersistUtil.getLongshotShotLimit(); i++) { if (isBurstShotFpsEnable) { mPreviewRequestBuilder[id].setTag("preview"); burstList.add(mPreviewRequestBuilder[id].build()); |
