Pass a string as const reference to avoid a copy

WriteToBuf copies a string into a buffer so it is just sufficient to
send it by reference to avoid copy

Bug: 259258187
Test: art/test.py
Change-Id: I96dc4eb0019d90971169214a643a234202b4e1cb
2 files changed