Merge changes I5f3b98aa,I6077d014,I276dbb46
* changes:
sourcedr: Remove incomplete sourcedr
sourcedr: Add missing __init__.py
sourcedr: Move sub-projects to parent directory
diff --git a/vndk/tools/definition-tool/vndk_definition_tool.py b/vndk/tools/definition-tool/vndk_definition_tool.py
index 6ef54b1..3f572bc 100755
--- a/vndk/tools/definition-tool/vndk_definition_tool.py
+++ b/vndk/tools/definition-tool/vndk_definition_tool.py
@@ -2694,6 +2694,13 @@
libnames = _build_lib_names_dict(graph)
results = []
+ if str is bytes:
+ def decode(string): # PY2
+ return string.decode('mutf-8').encode('utf-8')
+ else:
+ def decode(string): # PY3
+ return string.decode('mutf-8')
+
for ap, path in _enumerate_paths(system_dirs, vendor_dirs):
# Read the dex file from various file formats
try:
@@ -2704,7 +2711,7 @@
strings = set()
for string in dex_string_iter:
try:
- strings.add(string.decode('mutf-8'))
+ strings.add(decode(string))
except UnicodeSurrogateDecodeError:
pass
except FileNotFoundError: