diff options
| author | Stanley Tng <stng@google.com> | 2019-03-12 10:19:49 -0700 |
|---|---|---|
| committer | Stanley Tng <stng@google.com> | 2019-03-13 02:27:38 +0000 |
| commit | 97341da0637968913729cc2a398a9cf2a7cb3d2f (patch) | |
| tree | 7c3a5219275e4e88a31ef9685bef4458dbb57b1f /core/java/android/bluetooth/BluetoothAdapter.java | |
| parent | a5fe44c6b538c2a86cb18a10bf9e947085b6e3bf (diff) | |
Add @NonNull annotations to LE CoC APIs
Added NonNull annotations to the 4 LE Connection-oriented channel API in
BluetoothDevice and BluetoothAdapter.
Bug: 126701988
Bug: 126701989
Test: Compile only
Change-Id: I2d4dc8fbd06e30c782123e01f8481d249e40ee02
Diffstat (limited to 'core/java/android/bluetooth/BluetoothAdapter.java')
| -rw-r--r-- | core/java/android/bluetooth/BluetoothAdapter.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/java/android/bluetooth/BluetoothAdapter.java b/core/java/android/bluetooth/BluetoothAdapter.java index ab8c196edccd..b8a741ab2b72 100644 --- a/core/java/android/bluetooth/BluetoothAdapter.java +++ b/core/java/android/bluetooth/BluetoothAdapter.java @@ -19,6 +19,7 @@ package android.bluetooth; import android.Manifest; import android.annotation.IntDef; +import android.annotation.NonNull; import android.annotation.RequiresPermission; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; @@ -3057,7 +3058,7 @@ public final class BluetoothAdapter { * permissions, or unable to start this CoC */ @RequiresPermission(Manifest.permission.BLUETOOTH) - public BluetoothServerSocket listenUsingL2capChannel() + public @NonNull BluetoothServerSocket listenUsingL2capChannel() throws IOException { BluetoothServerSocket socket = new BluetoothServerSocket(BluetoothSocket.TYPE_L2CAP_LE, true, true, @@ -3115,7 +3116,7 @@ public final class BluetoothAdapter { * permissions, or unable to start this CoC */ @RequiresPermission(Manifest.permission.BLUETOOTH) - public BluetoothServerSocket listenUsingInsecureL2capChannel() + public @NonNull BluetoothServerSocket listenUsingInsecureL2capChannel() throws IOException { BluetoothServerSocket socket = new BluetoothServerSocket(BluetoothSocket.TYPE_L2CAP_LE, false, false, |
