Robert Wu 2136d8d77e amidi: Don't create extra write buffer
When sendWithTimestamp is called, a ~1000 byte buffer is created
even if nothing is sent. This CL adds a check to the size to save
space in the buffer if it's not needed.

Bug: 216328047
Test: atest NativeMidiEchoTest
Change-Id: I0bfddb6ca7416c5df5e938bdd09a5f1efdacaf5c
2022-01-26 23:20:12 +00:00
..
2022-01-20 00:50:41 +00:00