diff options
author | Rahul Sabnis <rahulsabnis@google.com> | 2020-01-22 14:26:35 -0800 |
---|---|---|
committer | Rahul Sabnis <rahulsabnis@google.com> | 2020-01-22 23:08:21 +0000 |
commit | 745310e2c9cdf886b71ffa7ad1b2404f9d0252f7 (patch) | |
tree | 7f43e6e0c8b2d2c426d44fbb0f3bc8607b379230 /framework/java/android/bluetooth/BluetoothMap.java | |
parent | c7e0fc83d0ed9759157cf2d602e1a11fb680d860 (diff) |
Use @ConnectionPolicy annotation more consistently in classes with
methods setConnectionPolicy and getConnectionPolicy
Bug: 147669289
Test: Manual
Change-Id: I2b9b0391a02d01623c1cd253f2da12b2baaea599
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothMap.java')
-rw-r--r-- | framework/java/android/bluetooth/BluetoothMap.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/framework/java/android/bluetooth/BluetoothMap.java b/framework/java/android/bluetooth/BluetoothMap.java index 4674706742..1c62faa97e 100644 --- a/framework/java/android/bluetooth/BluetoothMap.java +++ b/framework/java/android/bluetooth/BluetoothMap.java @@ -340,7 +340,8 @@ public final class BluetoothMap implements BluetoothProfile { */ @SystemApi @RequiresPermission(Manifest.permission.BLUETOOTH_ADMIN) - public boolean setConnectionPolicy(@Nullable BluetoothDevice device, int connectionPolicy) { + public boolean setConnectionPolicy(@Nullable BluetoothDevice device, + @ConnectionPolicy int connectionPolicy) { if (DBG) log("setConnectionPolicy(" + device + ", " + connectionPolicy + ")"); final IBluetoothMap service = getService(); if (service != null && isEnabled() && isValidDevice(device)) { @@ -388,7 +389,7 @@ public final class BluetoothMap implements BluetoothProfile { */ @SystemApi @RequiresPermission(Manifest.permission.BLUETOOTH) - public int getConnectionPolicy(@Nullable BluetoothDevice device) { + public @ConnectionPolicy int getConnectionPolicy(@Nullable BluetoothDevice device) { if (VDBG) log("getConnectionPolicy(" + device + ")"); final IBluetoothMap service = getService(); if (service != null && isEnabled() && isValidDevice(device)) { |