Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0593fda6 authored by Etienne Ruffieux's avatar Etienne Ruffieux Committed by Automerger Merge Worker
Browse files

Merge "[API Review] Add new GetUuidsList method" am: 0bf8d23c

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2020197

Change-Id: Icee1b536f12e6d3002a36d43248bf67e63648a11
parents 6c638fcf 0bf8d23c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ package android.bluetooth {
    method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public long getDiscoveryEndMillis();
    method @NonNull @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public java.util.List<android.bluetooth.BluetoothDevice> getMostRecentlyConnectedDevices();
    method @NonNull @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public java.util.List<java.lang.Integer> getSupportedProfiles();
    method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.os.ParcelUuid[] getUuids();
    method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public java.util.List<android.os.ParcelUuid> getUuidsList();
    method public boolean isBleScanAlwaysAvailable();
    method public boolean isLeEnabled();
    method @NonNull public static String nameForState(int);
+13 −2
Original line number Diff line number Diff line
@@ -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];
@@ -1467,6 +1466,18 @@ public final class BluetoothAdapter {
        return new ParcelUuid[0];
    }

    /**
     * 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.