Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion src/launchpad/artifacts/android/manifest/proto_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,21 @@ def _get_optional_attr_value(

# Special handling for string references
if value.startswith("@"):
return ProtoXmlUtils._get_resource_by_key_from_proto_resource_files(value, proto_res_tables)
resolved = ProtoXmlUtils._get_resource_by_key_from_proto_resource_files(value, proto_res_tables)
if resolved is not None:
return resolved

# Key-based lookup failed, fall back to compiled_item ref ID
logger.debug(f"key-based lookup failed for {value}, trying compiled_item ref")
if (
attribute.HasField("compiled_item")
and attribute.compiled_item.HasField("ref")
and attribute.compiled_item.ref.id
):
return ProtoXmlUtils._get_resource_by_id_from_proto_resource_files(
attribute.compiled_item.ref.id, proto_res_tables
)
return None

return str(value)

Expand Down
Loading