[API Review] Replace usage of getUuids by new SystemApi

Bug: 223253153
Test: build
Tag: #feature
Change-Id: I8b75a774cb05863b340de0fff83130e7ab9d3891
This commit is contained in:
Etienne Ruffieux
2022-03-10 14:18:39 +00:00
parent ececa85c9e
commit facf209f74
2 changed files with 8 additions and 2 deletions

View File

@@ -751,7 +751,10 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
ParcelUuid[] uuids = mDevice.getUuids();
if (uuids == null) return false;
ParcelUuid[] localUuids = mLocalAdapter.getUuids();
List<ParcelUuid> uuidsList = mLocalAdapter.getUuidsList();
ParcelUuid[] localUuids = new ParcelUuid[uuidsList.size()];
uuidsList.toArray(localUuids);
if (localUuids == null) return false;
/*

View File

@@ -124,7 +124,10 @@ public class LocalBluetoothAdapter {
}
public ParcelUuid[] getUuids() {
return mAdapter.getUuids();
List<ParcelUuid> uuidsList = mAdapter.getUuidsList();
ParcelUuid[] uuidsArray = new ParcelUuid[uuidsList.size()];
uuidsList.toArray(uuidsArray);
return uuidsArray;
}
public boolean isDiscovering() {