Merge "[API Review] Replace usage of getUuids by new SystemApi"

This commit is contained in:
Etienne Ruffieux
2022-03-17 09:44:51 +00:00
committed by Gerrit Code Review
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() {