diff options
| author | 2019-12-13 18:50:48 +0000 | |
|---|---|---|
| committer | 2019-12-13 18:50:48 +0000 | |
| commit | 4c1644cdf0fa1c292540901137fc7c68f2a070f7 (patch) | |
| tree | 53a1cbdf5d9794caf59bf5e33e97d825e837b78f | |
| parent | d6bc078add4d43139c5ebb4aee7aa22c5ecde91f (diff) | |
| parent | 1099497d45afc158835d9f1a4c6432b4b32ac7e6 (diff) | |
Merge "Resolve BluetoothHearingAid API usages by Settings" am: a83641557b am: 1099497d45
Change-Id: I4708867d2e125bfa1adc27cf18817a5e7d90046d
| -rwxr-xr-x | api/system-current.txt | 2 | ||||
| -rw-r--r-- | core/java/android/bluetooth/BluetoothHearingAid.java | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/api/system-current.txt b/api/system-current.txt index 5725763ba6c2..0e714d7f1875 100755 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -1395,7 +1395,9 @@ package android.bluetooth { } public final class BluetoothHearingAid implements android.bluetooth.BluetoothProfile { + method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH) public java.util.List<android.bluetooth.BluetoothDevice> getActiveDevices(); method @RequiresPermission(android.Manifest.permission.BLUETOOTH) public int getConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH) public long getHiSyncId(@Nullable android.bluetooth.BluetoothDevice); method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADMIN) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int); } diff --git a/core/java/android/bluetooth/BluetoothHearingAid.java b/core/java/android/bluetooth/BluetoothHearingAid.java index ead8429e4a75..b4521c623ec2 100644 --- a/core/java/android/bluetooth/BluetoothHearingAid.java +++ b/core/java/android/bluetooth/BluetoothHearingAid.java @@ -335,9 +335,9 @@ public final class BluetoothHearingAid implements BluetoothProfile { * is not active, it will be null on that position. Returns empty list on error. * @hide */ - @UnsupportedAppUsage + @SystemApi @RequiresPermission(Manifest.permission.BLUETOOTH) - public List<BluetoothDevice> getActiveDevices() { + public @NonNull List<BluetoothDevice> getActiveDevices() { if (VDBG) log("getActiveDevices()"); final IBluetoothHearingAid service = getService(); try { @@ -559,8 +559,9 @@ public final class BluetoothHearingAid implements BluetoothProfile { * @return the CustomerId of the device * @hide */ + @SystemApi @RequiresPermission(Manifest.permission.BLUETOOTH) - public long getHiSyncId(BluetoothDevice device) { + public long getHiSyncId(@Nullable BluetoothDevice device) { if (VDBG) { log("getCustomerId(" + device + ")"); } |