Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cbd37391 authored by Emilian Peev's avatar Emilian Peev
Browse files

Camera: Allow synthetic extension metadata

Synthetic metadata such as 'STATISTICS_FACES'
could be of value to extension clients.
Allow extension implementations to advertise support
for synthetic keys.

Bug: 235330843
Test:
atest -c -d
cts/tests/camera/src/android/hardware/camera2/cts/CameraExtensionCharacteristicsTest.java
atest -c -d
cts/tests/camera/src/android/hardware/camera2/cts/CameraExtensionSessionTest.java

Change-Id: I80133e4559610ecad714afa93400c00b2b6685fa
parent d79cb124
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -854,7 +854,7 @@ public final class CameraExtensionCharacteristics {
                Class<CaptureRequest.Key<?>> crKeyTyped = (Class<CaptureRequest.Key<?>>) crKey;
                Class<CaptureRequest.Key<?>> crKeyTyped = (Class<CaptureRequest.Key<?>>) crKey;


                ret.addAll(requestChars.getAvailableKeyList(CaptureRequest.class, crKeyTyped,
                ret.addAll(requestChars.getAvailableKeyList(CaptureRequest.class, crKeyTyped,
                        requestKeys, /*includeSynthetic*/ false));
                        requestKeys, /*includeSynthetic*/ true));
            }
            }


            // Jpeg quality and orientation must always be supported
            // Jpeg quality and orientation must always be supported
@@ -929,7 +929,7 @@ public final class CameraExtensionCharacteristics {
                Class<CaptureResult.Key<?>> crKeyTyped = (Class<CaptureResult.Key<?>>)crKey;
                Class<CaptureResult.Key<?>> crKeyTyped = (Class<CaptureResult.Key<?>>)crKey;


                ret.addAll(resultChars.getAvailableKeyList(CaptureResult.class, crKeyTyped,
                ret.addAll(resultChars.getAvailableKeyList(CaptureResult.class, crKeyTyped,
                        resultKeys, /*includeSynthetic*/ false));
                        resultKeys, /*includeSynthetic*/ true));


                // Jpeg quality, orientation and sensor timestamp must always be supported
                // Jpeg quality, orientation and sensor timestamp must always be supported
                if (!ret.contains(CaptureResult.JPEG_QUALITY)) {
                if (!ret.contains(CaptureResult.JPEG_QUALITY)) {