Loading
USB MIDI: Fix incorrect timestamps
Timestamp is calculated before waiting for USB data. When USB data comes in, the timestamp from when it starts to wait is used. This makes the timestamp very inaccurate. The fix is to move "timestamp = System.nanoTime()" after getting the USB response. Bug: 267519645 Test: Connect phone with MIDI Scope app to USB MIDI 2.0 keyboard Test: Play notes on the keyboard and verify timestamps look reasonable Change-Id: Ic3bccd89b65787badf3139964983572f83d99eaa