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

Commit e37fbfec authored by Jag Saund's avatar Jag Saund
Browse files

Camera Extensions - Disable Synthetic Keys for Get

- using synthetic keys for the get api includes camera characteristic
  keys that are unsupported or may lead to undefined behaviors
- it is safer to not include synthetic keys

Test: atest
Bug: 325544977
Change-Id: I0774e9e36fc2b308085f9f1d501ac2ee504178f6
parent c12aae9d
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -874,8 +874,11 @@ public final class CameraExtensionCharacteristics {
                Class<CameraCharacteristics.Key<?>> keyTyped =
                        (Class<CameraCharacteristics.Key<?>>) key;

                // Do not include synthetic keys. Including synthetic keys leads to undefined
                // behavior. This causes inclusion of capabilities that may not be supported in
                // camera extensions.
                ret.addAll(chars.getAvailableKeyList(CameraCharacteristics.class, keyTyped, keys,
                        /*includeSynthetic*/ true));
                        /*includeSynthetic*/ false));
            }
        } catch (RemoteException e) {
            Log.e(TAG, "Failed to query the extension for all available keys! Extension "