Don't call setInterface when querying protocol

calculateDefaultMidiProtocol() is a function that figures out the block
type of a specific MIDI device. This function is used whenever a MIDI 2.0
device is added.

Currently, connection.setInterface() is always called in this function.
When a different interface is set, the MIDI 1.0 interface in ALSA just stops.
/dev/snd/midiC1D0 is no longer exposed.

The solution in this CL is that Android should not call
connection.setInterface() until the MIDI 2.0 interface has opened. This
means that querying protocol on startup should not use setInterface.

This way, the MIDI 1.0 interface should work up until the MIDI 2.0
interface is actually used.

Bug: 216178160
Test: MidiScope and MidiKeyboard
Change-Id: I53d7792d6d331abcddea2d1aedb394ff4dee0a9c
1 file changed