Skip to content

Commit

Permalink
Merge "Revert "tp: remove deprecated function call"" into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Buyu Xiao authored and Gerrit Code Review committed Dec 2, 2024
2 parents 21dcdf3 + 0658eab commit 8a41b7a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/perfetto/trace_processor/protos.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ def __init__(self, platform_delegate: PlatformDelegate):

def create_message_factory(message_type):
message_desc = self.descriptor_pool.FindMessageTypeByName(message_type)
return message_factory.GetMessageClass(message_desc)
if hasattr(message_factory, 'GetMessageClass'):
return message_factory.GetMessageClass(message_desc)
# AOSP is stil using the old libprotobuf to create message classes.
return message_factory.MessageFactory().GetPrototype(message_desc)

# Create proto messages to correctly communicate with the RPC API by sending
# and receiving data as protos
Expand Down

0 comments on commit 8a41b7a

Please sign in to comment.