Check for null Parcels array in hasNonMidiUuids.
Bug: 226555921 Test: build, install, connect BLE-MIDI controller. Change-Id: Ib86f9981eaaf1763c46a12dddefbf84d2542ebc5
This commit is contained in:
@@ -685,11 +685,13 @@ public class MidiService extends IMidiManager.Stub {
|
||||
|
||||
private boolean hasNonMidiUuids(BluetoothDevice btDevice) {
|
||||
ParcelUuid[] uuidParcels = btDevice.getUuids();
|
||||
// The assumption is that these services are indicative of devices that
|
||||
// ARE NOT MIDI devices.
|
||||
for (ParcelUuid parcel : uuidParcels) {
|
||||
if (mNonMidiUUIDs.contains(parcel)) {
|
||||
return true;
|
||||
if (uuidParcels != null) {
|
||||
// The assumption is that these services are indicative of devices that
|
||||
// ARE NOT MIDI devices.
|
||||
for (ParcelUuid parcel : uuidParcels) {
|
||||
if (mNonMidiUUIDs.contains(parcel)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user