diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2019-06-30 11:25:12 -0700 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2019-06-30 11:25:12 -0700 |
commit | 00b119ed5bd7f435845b2b140dca5a2889ee9fa3 (patch) | |
tree | 0742b8ad7b520a65d1d1b6efc5042f11f70bd81b | |
parent | 0230dc4938074f7c10dc8f9e9fffd031e60dacc3 (diff) | |
parent | 6e83a73e414f31044b692b3b7132b9b9c7d22ab2 (diff) | |
download | android_packages_apps_Snap-00b119ed5bd7f435845b2b140dca5a2889ee9fa3.tar.gz android_packages_apps_Snap-00b119ed5bd7f435845b2b140dca5a2889ee9fa3.tar.bz2 android_packages_apps_Snap-00b119ed5bd7f435845b2b140dca5a2889ee9fa3.zip |
Merge 6e83a73e414f31044b692b3b7132b9b9c7d22ab2 on remote branch
Change-Id: I88ee5412eef32164a41025146098966ee99806aa
-rwxr-xr-x | res/values/camera2arrays.xml | 2 | ||||
-rw-r--r-- | res/values/strings.xml | 2 | ||||
-rwxr-xr-x | src/com/android/camera/CameraHolder.java | 3 | ||||
-rw-r--r-- | src/com/android/camera/CaptureModule.java | 20 | ||||
-rwxr-xr-x | src/com/android/camera/imageprocessor/PostProcessor.java | 10 | ||||
-rwxr-xr-x | version.mk | 2 |
6 files changed, 28 insertions, 11 deletions
diff --git a/res/values/camera2arrays.xml b/res/values/camera2arrays.xml index 4083f4528..921303120 100755 --- a/res/values/camera2arrays.xml +++ b/res/values/camera2arrays.xml @@ -436,6 +436,7 @@ <!-- Camera Preferences Picture size dialog box entries --> <string-array name="pref_camera2_picturesize_entries" translatable="false"> <item>@string/pref_camera_picturesize_entry_48mp</item> + <item>@string/pref_camera_picturesize_entry_32mp</item> <item>@string/pref_camera_picturesize_entry_24mp</item> <item>@string/pref_camera_picturesize_entry_21mp</item> <item>5184 x 3880</item> @@ -475,6 +476,7 @@ driver --> <string-array name="pref_camera2_picturesize_entryvalues" translatable="false"> <item>8000x6000</item> + <item>6560x4928</item> <item>5656x4242</item> <item>5344x4008</item> <item>5184x3880</item> diff --git a/res/values/strings.xml b/res/values/strings.xml index b28f6319f..b69614d80 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -284,6 +284,8 @@ <string name="pref_camera_picturesize_title">Picture size</string> <!-- Settings screen, dialog choice for 48 megapixels picture size [CHAR LIMIT=20] --> <string name="pref_camera_picturesize_entry_48mp">48M pixels</string> + <!-- Settings screen, dialog choice for 32 megapixels picture size [CHAR LIMIT=20] --> + <string name="pref_camera_picturesize_entry_32mp">32M pixels</string> <!-- Settings screen, dialog choice for 24 megapixels picture size [CHAR LIMIT=20] --> <string name="pref_camera_picturesize_entry_24mp">24M pixels</string> <!-- Settings screen, dialog choice for 20 megapixels picture size [CHAR LIMIT=20] --> diff --git a/src/com/android/camera/CameraHolder.java b/src/com/android/camera/CameraHolder.java index 59b305bc6..d5167af5b 100755 --- a/src/com/android/camera/CameraHolder.java +++ b/src/com/android/camera/CameraHolder.java @@ -184,6 +184,9 @@ public class CameraHolder { int facing = characteristics.get(CameraCharacteristics.LENS_FACING); if (facing == CameraCharacteristics.LENS_FACING_FRONT) { CaptureModule.FRONT_ID = i; + mFrontCameraId = i; + } else if (mBackCameraId != -1) { + mBackCameraId = i; } mCharacteristics.add(i, characteristics); } diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java index 9e340a022..76f48a6d8 100644 --- a/src/com/android/camera/CaptureModule.java +++ b/src/com/android/camera/CaptureModule.java @@ -993,8 +993,6 @@ public class CaptureModule implements CameraModule, PhotoController, mCamerasOpened = false; if (null != mActivity) { - Toast.makeText(mActivity,"open camera error id =" + id, - Toast.LENGTH_LONG).show(); mActivity.finish(); } } @@ -1899,12 +1897,11 @@ public class CaptureModule implements CameraModule, PhotoController, private void takePicture() { Log.d(TAG, "takePicture"); mUI.enableShutter(false); - if ((mSettingsManager.isZSLInHALEnabled() && + if ((mSettingsManager.isZSLInHALEnabled() || isActionImageCapture()) && !isFlashOn(getMainCameraId()) && (mPreviewCaptureResult != null && mPreviewCaptureResult.get(CaptureResult.CONTROL_AE_STATE) != CameraMetadata.CONTROL_AE_STATE_FLASH_REQUIRED && - mPreviewCaptureResult.getRequest().get(CaptureRequest.CONTROL_AE_LOCK) != Boolean.TRUE)) || - isActionImageCapture()) { + mPreviewCaptureResult.getRequest().get(CaptureRequest.CONTROL_AE_LOCK) != Boolean.TRUE)) { takeZSLPictureInHAL(); } else { if (isBackCamera()) { @@ -2338,6 +2335,12 @@ public class CaptureModule implements CameraModule, PhotoController, } } + public void doShutterAnimation() { + if (mUI != null) { + mUI.doShutterAnimation(); + } + } + private CameraCaptureSession.CaptureCallback mLongshotCallBack= new CameraCaptureSession.CaptureCallback() { @Override public void onCaptureCompleted(CameraCaptureSession session, @@ -2751,6 +2754,7 @@ public class CaptureModule implements CameraModule, PhotoController, if (mLongshoting && (!mLongshotActive) && image.getTimestamp() > mLastLongshotTimestamp) { image.close(); + Log.d(TAG, "image duplicate mLastLongshotTimestamp "); return; } if (mSettingsManager.getSavePictureFormat() == SettingsManager.HEIF_FORMAT) { @@ -3545,17 +3549,13 @@ public class CaptureModule implements CameraModule, PhotoController, mFrameProcessor.onOpen(getFrameProcFilterId(), mPreviewSize); } - if(mPostProcessor.isZSLEnabled()) { + if(mPostProcessor.isZSLEnabled() && !isActionImageCapture()) { mChosenImageFormat = ImageFormat.PRIVATE; } else if(mPostProcessor.isFilterOn() || getFrameFilters().size() != 0 || mPostProcessor.isSelfieMirrorOn()) { mChosenImageFormat = ImageFormat.YUV_420_888; } else { mChosenImageFormat = ImageFormat.JPEG; } - // if intent action is ACTION_IMAGE_CAPTURE, use HAL-ZSL to capture - if (isActionImageCapture()) { - mChosenImageFormat = ImageFormat.JPEG; - } setUpCameraOutputs(mChosenImageFormat); } diff --git a/src/com/android/camera/imageprocessor/PostProcessor.java b/src/com/android/camera/imageprocessor/PostProcessor.java index e3d1c62a7..fe9f1c9d9 100755 --- a/src/com/android/camera/imageprocessor/PostProcessor.java +++ b/src/com/android/camera/imageprocessor/PostProcessor.java @@ -587,6 +587,16 @@ public class PostProcessor{ CaptureRequest request, TotalCaptureResult result) { Log.d(TAG, "reprocessImage onCaptureCompleted"); + if (mActivity != null) { + mActivity.runOnUiThread(new Runnable() { + @Override + public void run() { + if (mController != null) { + mController.doShutterAnimation(); + } + } + }); + } } @Override diff --git a/version.mk b/version.mk index e9ee12b8a..17953e460 100755 --- a/version.mk +++ b/version.mk @@ -40,7 +40,7 @@ # base_version_build is 3 digits and auto-increment for fixing CR. base_version_major := 2 base_version_minor := 02 -base_version_build := 031 +base_version_build := 032 ##################################################### ##################################################### |