diff options
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothAdapter.java')
-rw-r--r-- | framework/java/android/bluetooth/BluetoothAdapter.java | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/framework/java/android/bluetooth/BluetoothAdapter.java b/framework/java/android/bluetooth/BluetoothAdapter.java index c5d550aed7..716d808a11 100644 --- a/framework/java/android/bluetooth/BluetoothAdapter.java +++ b/framework/java/android/bluetooth/BluetoothAdapter.java @@ -1440,11 +1440,10 @@ public final class BluetoothAdapter { * @return the UUIDs supported by the local Bluetooth Adapter. * @hide */ - @SystemApi + @UnsupportedAppUsage @RequiresLegacyBluetoothPermission @RequiresBluetoothConnectPermission @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) - @SuppressLint(value = {"ArrayReturn", "NullableCollection"}) public @NonNull ParcelUuid[] getUuids() { if (getState() != STATE_ON) { return new ParcelUuid[0]; @@ -1468,6 +1467,18 @@ public final class BluetoothAdapter { } /** + * Get the UUIDs supported by the local Bluetooth adapter. + * + * @return a list of the UUIDs supported by the local Bluetooth Adapter. + * @hide + */ + @SystemApi + @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) + public @NonNull List<ParcelUuid> getUuidsList() { + return Arrays.asList(getUuids()); + } + + /** * Set the friendly Bluetooth name of the local Bluetooth adapter. * <p>This name is visible to remote Bluetooth devices. * <p>Valid Bluetooth names are a maximum of 248 bytes using UTF-8 |