diff options
| author | Stanley Tng <stng@google.com> | 2019-03-12 23:37:09 -0700 |
|---|---|---|
| committer | android-build-merger <android-build-merger@google.com> | 2019-03-12 23:37:09 -0700 |
| commit | a3414b67fdaae543595e65e6e9116ebea355d79d (patch) | |
| tree | b8eb0ddf7208180655b65d533b4d58bba3e88dfb /framework/java/android/bluetooth/BluetoothDevice.java | |
| parent | d43beed21599dadb89b83628f982420b6f735f08 (diff) | |
| parent | 75ac4330213af65a9dccfb22a3f6cae3ebbd65c1 (diff) | |
Merge "Add @NonNull annotations to LE CoC APIs" am: 410693250e am: 76fb1286b7
am: 75ac433021
Change-Id: I674f926ff2822d311fd6f6a0cbf061a2e815b093
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothDevice.java')
| -rw-r--r-- | framework/java/android/bluetooth/BluetoothDevice.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/framework/java/android/bluetooth/BluetoothDevice.java b/framework/java/android/bluetooth/BluetoothDevice.java index f71841563a..fa2c9f8a52 100644 --- a/framework/java/android/bluetooth/BluetoothDevice.java +++ b/framework/java/android/bluetooth/BluetoothDevice.java @@ -17,6 +17,7 @@ package android.bluetooth; import android.Manifest; +import android.annotation.NonNull; import android.annotation.RequiresPermission; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; @@ -2182,7 +2183,7 @@ public final class BluetoothDevice implements Parcelable { * permissions */ @RequiresPermission(Manifest.permission.BLUETOOTH) - public BluetoothSocket createL2capChannel(int psm) throws IOException { + public @NonNull BluetoothSocket createL2capChannel(int psm) throws IOException { if (!isBluetoothEnabled()) { Log.e(TAG, "createL2capChannel: Bluetooth is not enabled"); throw new IOException(); @@ -2221,7 +2222,7 @@ public final class BluetoothDevice implements Parcelable { * permissions */ @RequiresPermission(Manifest.permission.BLUETOOTH) - public BluetoothSocket createInsecureL2capChannel(int psm) throws IOException { + public @NonNull BluetoothSocket createInsecureL2capChannel(int psm) throws IOException { if (!isBluetoothEnabled()) { Log.e(TAG, "createInsecureL2capChannel: Bluetooth is not enabled"); throw new IOException(); |
