diff options
author | Tor Norbye <tnorbye@google.com> | 2015-04-23 17:10:21 -0700 |
---|---|---|
committer | Andre Eisenbach <eisenbach@google.com> | 2015-05-15 00:18:28 +0000 |
commit | 27ce6cfbe105e5c36e19b1f76bc9b8f29710b331 (patch) | |
tree | 508e37a1dbb58bf044a483f45e600afb3b00ada5 /framework/java/android/bluetooth/BluetoothManager.java | |
parent | 038eab23e3c2350e6c9d3eda2904edd6e1767022 (diff) |
Add bluetooth permission annotations
Change-Id: I5bc86f8ec6ea5c873f1e14dab0e0c47c5c9df7f7
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothManager.java')
-rw-r--r-- | framework/java/android/bluetooth/BluetoothManager.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/framework/java/android/bluetooth/BluetoothManager.java b/framework/java/android/bluetooth/BluetoothManager.java index b1618cf328..e355a1c0a5 100644 --- a/framework/java/android/bluetooth/BluetoothManager.java +++ b/framework/java/android/bluetooth/BluetoothManager.java @@ -16,6 +16,8 @@ package android.bluetooth; +import android.Manifest; +import android.annotation.RequiresPermission; import android.content.Context; import android.os.RemoteException; import android.util.Log; @@ -89,6 +91,7 @@ public final class BluetoothManager { * {@link BluetoothProfile#STATE_DISCONNECTED}, * {@link BluetoothProfile#STATE_DISCONNECTING} */ + @RequiresPermission(Manifest.permission.BLUETOOTH) public int getConnectionState(BluetoothDevice device, int profile) { if (DBG) Log.d(TAG,"getConnectionState()"); @@ -117,6 +120,7 @@ public final class BluetoothManager { * @param profile GATT or GATT_SERVER * @return List of devices. The list will be empty on error. */ + @RequiresPermission(Manifest.permission.BLUETOOTH) public List<BluetoothDevice> getConnectedDevices(int profile) { if (DBG) Log.d(TAG,"getConnectedDevices"); if (profile != BluetoothProfile.GATT && profile != BluetoothProfile.GATT_SERVER) { @@ -161,6 +165,7 @@ public final class BluetoothManager { * {@link BluetoothProfile#STATE_DISCONNECTING}, * @return List of devices. The list will be empty on error. */ + @RequiresPermission(Manifest.permission.BLUETOOTH) public List<BluetoothDevice> getDevicesMatchingConnectionStates(int profile, int[] states) { if (DBG) Log.d(TAG,"getDevicesMatchingConnectionStates"); |