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

Commit 5d90d6db authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Always return nonNull in BluetoothAdapter.getUuids" am: 714973f3

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

Change-Id: I7367cdf6640ce5e9fc63615b17e8de18bdffa2dd
parents 67c8895e 714973f3
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 @Nullable @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.os.ParcelUuid[] getUuids();
    method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.os.ParcelUuid[] getUuids();
    method public boolean isBleScanAlwaysAvailable();
    method public boolean isLeEnabled();
    method @NonNull public static String nameForState(int);
+3 −3
Original line number Diff line number Diff line
@@ -1438,9 +1438,9 @@ public final class BluetoothAdapter {
    @RequiresBluetoothConnectPermission
    @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT)
    @SuppressLint(value = {"ArrayReturn", "NullableCollection"})
    public @Nullable ParcelUuid[] getUuids() {
    public @NonNull ParcelUuid[] getUuids() {
        if (getState() != STATE_ON) {
            return null;
            return new ParcelUuid[0];
        }
        try {
            mServiceLock.readLock().lock();
@@ -1457,7 +1457,7 @@ public final class BluetoothAdapter {
        } finally {
            mServiceLock.readLock().unlock();
        }
        return null;
        return new ParcelUuid[0];
    }

    /**