Merge "Add @NonNull annotations to LE CoC APIs" am: 8b57ab7989
am: 68e00291e0
Change-Id: If0de3820ab36ddeaeb57d332f332a84963c8ad5d
This commit is contained in:
@@ -7711,9 +7711,9 @@ package android.bluetooth {
|
||||
method public boolean isMultipleAdvertisementSupported();
|
||||
method public boolean isOffloadedFilteringSupported();
|
||||
method public boolean isOffloadedScanBatchingSupported();
|
||||
method @RequiresPermission(android.Manifest.permission.BLUETOOTH) public android.bluetooth.BluetoothServerSocket listenUsingInsecureL2capChannel() throws java.io.IOException;
|
||||
method @RequiresPermission(android.Manifest.permission.BLUETOOTH) @NonNull public android.bluetooth.BluetoothServerSocket listenUsingInsecureL2capChannel() throws java.io.IOException;
|
||||
method @RequiresPermission(android.Manifest.permission.BLUETOOTH) public android.bluetooth.BluetoothServerSocket listenUsingInsecureRfcommWithServiceRecord(String, java.util.UUID) throws java.io.IOException;
|
||||
method @RequiresPermission(android.Manifest.permission.BLUETOOTH) public android.bluetooth.BluetoothServerSocket listenUsingL2capChannel() throws java.io.IOException;
|
||||
method @RequiresPermission(android.Manifest.permission.BLUETOOTH) @NonNull public android.bluetooth.BluetoothServerSocket listenUsingL2capChannel() throws java.io.IOException;
|
||||
method @RequiresPermission(android.Manifest.permission.BLUETOOTH) public android.bluetooth.BluetoothServerSocket listenUsingRfcommWithServiceRecord(String, java.util.UUID) throws java.io.IOException;
|
||||
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADMIN) public boolean setName(String);
|
||||
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADMIN) public boolean startDiscovery();
|
||||
@@ -8081,9 +8081,9 @@ package android.bluetooth {
|
||||
method public android.bluetooth.BluetoothGatt connectGatt(android.content.Context, boolean, android.bluetooth.BluetoothGattCallback, int, int);
|
||||
method public android.bluetooth.BluetoothGatt connectGatt(android.content.Context, boolean, android.bluetooth.BluetoothGattCallback, int, int, android.os.Handler);
|
||||
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADMIN) public boolean createBond();
|
||||
method @RequiresPermission(android.Manifest.permission.BLUETOOTH) public android.bluetooth.BluetoothSocket createInsecureL2capChannel(int) throws java.io.IOException;
|
||||
method @RequiresPermission(android.Manifest.permission.BLUETOOTH) @NonNull public android.bluetooth.BluetoothSocket createInsecureL2capChannel(int) throws java.io.IOException;
|
||||
method @RequiresPermission(android.Manifest.permission.BLUETOOTH) public android.bluetooth.BluetoothSocket createInsecureRfcommSocketToServiceRecord(java.util.UUID) throws java.io.IOException;
|
||||
method @RequiresPermission(android.Manifest.permission.BLUETOOTH) public android.bluetooth.BluetoothSocket createL2capChannel(int) throws java.io.IOException;
|
||||
method @RequiresPermission(android.Manifest.permission.BLUETOOTH) @NonNull public android.bluetooth.BluetoothSocket createL2capChannel(int) throws java.io.IOException;
|
||||
method @RequiresPermission(android.Manifest.permission.BLUETOOTH) public android.bluetooth.BluetoothSocket createRfcommSocketToServiceRecord(java.util.UUID) throws java.io.IOException;
|
||||
method public int describeContents();
|
||||
method @RequiresPermission(android.Manifest.permission.BLUETOOTH) public boolean fetchUuidsWithSdp();
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user