camera_metadata: Add visibility support, and a HAL2 tag
- Add a visibility property which controls whether a tag is available
only to the system, hidden in managed code, or public in managed code.
- Add a HAL2 tag to indicate HAL2.x-only tags
- Fix output/inputStream tags to be arrays.
Change-Id: I856d0b1bf413eefd58914e5b85b08331a4bf4536
diff --git a/camera/docs/metadata_model.py b/camera/docs/metadata_model.py
index daf171c..6b70288 100644
--- a/camera/docs/metadata_model.py
+++ b/camera/docs/metadata_model.py
@@ -936,6 +936,12 @@
container: The container attribute from <entry container="array">, or None.
container_sizes: A sequence of size strings or None if container is None.
enum: An Enum instance if the enum attribute is true, None otherwise.
+ visibility: The visibility of this entry ('system', 'hidden', 'public')
+ across the system. System entries are only visible in native code
+ headers. Hidden entries are marked @hide in managed code, while
+ public entries are visible in the Android SDK.
+ applied_visibility: As visibility, but always valid, defaulting to 'system'
+ if no visibility is given for an entry.
tuple_values: A sequence of strings describing the tuple values,
None if container is not 'tuple'.
description: A string description, or None.
@@ -981,6 +987,8 @@
notes: A string with the notes for the entry
tag_ids: A list of tag ID strings, e.g. ['BC', 'V1']
type_notes: A string with the notes for the type
+ visibility: A string describing the visibility, eg 'system', 'hidden',
+ 'public'
"""
if kwargs.get('type') is None:
@@ -1005,6 +1013,14 @@
return self._kind
@property
+ def visibility(self):
+ return self._visibility
+
+ @property
+ def applied_visibility(self):
+ return self._visibility or 'system'
+
+ @property
def name_short(self):
return self.get_name_minimal()
@@ -1102,6 +1118,8 @@
else:
self._enum = None
+ self._visibility = kwargs.get('visibility')
+
self._property_keys = kwargs
def merge(self):
@@ -1294,6 +1312,7 @@
'tuple_values',
'type',
'type_notes',
+ 'visibility'
]
for p in props_common: