From 5c67b950b2f61d02b390e714c9f5310420d14d4a Mon Sep 17 00:00:00 2001 From: Shuzhen Wang Date: Tue, 7 Dec 2021 03:09:34 +0000 Subject: [PATCH] Camera: Update JPEG size override condition for MPC13 The JPEG size override is done only when the android.os.Build.VERSION_CDOES.MEDIA_PERFORMANCE_CLASS is set to 31 or larger, and not necessarily for every MPC13 devices. Bug: 209622756 Test: Build Change-Id: I4d76db1780e0d777e8da68a06829ce0e424905d5 --- .../hardware/camera2/CameraCharacteristics.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/core/java/android/hardware/camera2/CameraCharacteristics.java b/core/java/android/hardware/camera2/CameraCharacteristics.java index 9f77a7e72e704..0b02a919b2d95 100644 --- a/core/java/android/hardware/camera2/CameraCharacteristics.java +++ b/core/java/android/hardware/camera2/CameraCharacteristics.java @@ -2632,7 +2632,8 @@ public final class CameraCharacteristics extends CameraMetadata * *

For applications targeting SDK version 31 or newer, if the mobile device declares to be - * {@link android.os.Build.VERSION_CDOES.MEDIA_PERFORMANCE_CLASS media performance class} S, + * media performance class 12 or higher by setting + * {@link android.os.Build.VERSION_CDOES.MEDIA_PERFORMANCE_CLASS } to be 31 or larger, * the primary camera devices (first rear/front camera in the camera ID list) will not * support JPEG sizes smaller than 1080p. If the application configures a JPEG stream * smaller than 1080p, the camera device will round up the JPEG image size to at least @@ -2705,9 +2706,11 @@ public final class CameraCharacteristics extends CameraMetadata * *

For applications targeting SDK version 31 or newer, if the mobile device doesn't declare - * to be media performance class S, or if the camera device isn't a primary rear/front - * camera, the minimum required output stream configurations are the same as for applications - * targeting SDK version older than 31.

+ * to be media performance class 12 or better by setting + * {@link android.os.Build.VERSION_CDOES.MEDIA_PERFORMANCE_CLASS } to be 31 or larger, + * or if the camera device isn't a primary rear/front camera, the minimum required output + * stream configurations are the same as for applications targeting SDK version older than + * 31.

*

Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for additional * mandatory stream configurations on a per-capability basis.

*

Exception on 176x144 (QCIF) resolution: camera devices usually have a fixed capability for