summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothHidHost.java
diff options
context:
space:
mode:
authorRahul Sabnis <rahulsabnis@google.com>2020-01-22 14:26:35 -0800
committerRahul Sabnis <rahulsabnis@google.com>2020-01-22 23:08:21 +0000
commit745310e2c9cdf886b71ffa7ad1b2404f9d0252f7 (patch)
tree7f43e6e0c8b2d2c426d44fbb0f3bc8607b379230 /framework/java/android/bluetooth/BluetoothHidHost.java
parentc7e0fc83d0ed9759157cf2d602e1a11fb680d860 (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/BluetoothHidHost.java')
-rw-r--r--framework/java/android/bluetooth/BluetoothHidHost.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/framework/java/android/bluetooth/BluetoothHidHost.java b/framework/java/android/bluetooth/BluetoothHidHost.java
index c1233b800a..26e3e271bf 100644
--- a/framework/java/android/bluetooth/BluetoothHidHost.java
+++ b/framework/java/android/bluetooth/BluetoothHidHost.java
@@ -416,7 +416,8 @@ public final class BluetoothHidHost 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 IBluetoothHidHost service = getService();
if (service != null && isEnabled() && isValidDevice(device)) {
@@ -464,7 +465,7 @@ public final class BluetoothHidHost 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 IBluetoothHidHost service = getService();
if (service != null && isEnabled() && isValidDevice(device)) {