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

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

Change-Id: Ic8f4672efbd7eddf2fa8f9da967d029d338502a0
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:10:54 +00:00
committed by Automerger Merge Worker

View File

@@ -685,6 +685,7 @@ public class MidiService extends IMidiManager.Stub {
private boolean hasNonMidiUuids(BluetoothDevice btDevice) { private boolean hasNonMidiUuids(BluetoothDevice btDevice) {
ParcelUuid[] uuidParcels = btDevice.getUuids(); ParcelUuid[] uuidParcels = btDevice.getUuids();
if (uuidParcels != null) {
// The assumption is that these services are indicative of devices that // The assumption is that these services are indicative of devices that
// ARE NOT MIDI devices. // ARE NOT MIDI devices.
for (ParcelUuid parcel : uuidParcels) { for (ParcelUuid parcel : uuidParcels) {
@@ -692,6 +693,7 @@ public class MidiService extends IMidiManager.Stub {
return true; return true;
} }
} }
}
return false; return false;
} }