Merge "Check for null Parcels array in hasNonMidiUuids." into tm-dev am: a7b858cd2d am: 37b2a1faf1

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17570954

Change-Id: I42dfa21a339c9f9313d8f7f850fee4b14a8a3f61
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Paul Mclean
2022-04-04 21:31:06 +00:00
committed by Automerger Merge Worker

View File

@@ -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;