diff --git a/core/java/android/hardware/camera2/CameraDevice.java b/core/java/android/hardware/camera2/CameraDevice.java index 73735edbb2bac..0f1b39c01289d 100644 --- a/core/java/android/hardware/camera2/CameraDevice.java +++ b/core/java/android/hardware/camera2/CameraDevice.java @@ -892,9 +892,9 @@ public abstract class CameraDevice implements AutoCloseable { *
* For the maximum size column, PREVIEW refers to the best size match to the device's screen diff --git a/core/java/android/hardware/camera2/params/MandatoryStreamCombination.java b/core/java/android/hardware/camera2/params/MandatoryStreamCombination.java index a3bc66546a6a1..e5b9cdb74d3b9 100644 --- a/core/java/android/hardware/camera2/params/MandatoryStreamCombination.java +++ b/core/java/android/hardware/camera2/params/MandatoryStreamCombination.java @@ -1265,43 +1265,43 @@ public final class MandatoryStreamCombination { private static StreamCombinationTemplate sPreviewStabilizedStreamCombinations[] = { // 1 stream combinations new StreamCombinationTemplate(new StreamTemplate [] { - new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.RECORD)}, + new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.s1440p)}, "Stabilized preview, GPU video processing, or no-preview stabilized recording"), new StreamCombinationTemplate(new StreamTemplate [] { - new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.RECORD)}, + new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.s1440p)}, "Stabilized preview, GPU video processing, or no-preview stabilized recording"), //2 stream combinations new StreamCombinationTemplate(new StreamTemplate [] { new StreamTemplate(ImageFormat.JPEG, SizeThreshold.MAXIMUM), - new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.PREVIEW)}, + new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.s1440p)}, "Standard JPEG still imaging with stabilized preview"), new StreamCombinationTemplate(new StreamTemplate [] { new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.MAXIMUM), - new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.PREVIEW)}, + new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.s1440p)}, "Standard YUV still imaging with stabilized preview"), new StreamCombinationTemplate(new StreamTemplate [] { new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.MAXIMUM), - new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.PREVIEW)}, + new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.s1440p)}, "Standard YUV still imaging with stabilized in-app image processing stream"), new StreamCombinationTemplate(new StreamTemplate [] { new StreamTemplate(ImageFormat.JPEG, SizeThreshold.MAXIMUM), - new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.PREVIEW)}, + new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.s1440p)}, "Standard JPEG still imaging with stabilized in-app image processing stream"), new StreamCombinationTemplate(new StreamTemplate [] { - new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.RECORD), + new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.s1440p), new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.PREVIEW)}, "High-resolution video recording with preview both streams stabilized"), new StreamCombinationTemplate(new StreamTemplate [] { - new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.RECORD), + new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.s1440p), new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.PREVIEW)}, "High-resolution video recording with preview both streams stabilized"), new StreamCombinationTemplate(new StreamTemplate [] { - new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.RECORD), + new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.s1440p), new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.PREVIEW)}, "High-resolution video recording with preview both streams stabilized"), new StreamCombinationTemplate(new StreamTemplate [] { - new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.RECORD), + new StreamTemplate(ImageFormat.YUV_420_888, SizeThreshold.s1440p), new StreamTemplate(ImageFormat.PRIVATE, SizeThreshold.PREVIEW)}, "High-resolution video recording with preview both streams stabilized"), }; @@ -1430,7 +1430,7 @@ public final class MandatoryStreamCombination { StreamCombinationTemplate []chosenStreamCombinations = sPreviewStabilizedStreamCombinations; - if (mIsPreviewStabilizationSupported) { + if (!mIsPreviewStabilizationSupported) { Log.v(TAG, "Device does not support preview stabilization"); return null; }