summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothHearingAid.java
diff options
context:
space:
mode:
authorStanley Tng <stng@google.com>2019-02-28 12:22:45 -0800
committerStanley Tng <stng@google.com>2019-03-06 17:17:40 +0000
commitc85bd85a57fd22f12ee2f311c4965f77ded76e80 (patch)
tree7cb6bd1ac2116d585afdd99dc521446e675cf1bc /framework/java/android/bluetooth/BluetoothHearingAid.java
parentf5ae691e1747f65e9322ce40d51726d783ecd68f (diff)
Add @NonNull annotations to Hearing Aids Profile APIs
Bug: 126699327 Bug: 119617521 Test: Ran with CTS tests for Hearing Aids Profile, android.bluetooth.cts.HearingAidProfileTest Change-Id: If83052a68c867d839e263f490592b80bef513a01
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothHearingAid.java')
-rw-r--r--framework/java/android/bluetooth/BluetoothHearingAid.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/framework/java/android/bluetooth/BluetoothHearingAid.java b/framework/java/android/bluetooth/BluetoothHearingAid.java
index 23a8159de4..c5a0bbd2f8 100644
--- a/framework/java/android/bluetooth/BluetoothHearingAid.java
+++ b/framework/java/android/bluetooth/BluetoothHearingAid.java
@@ -17,6 +17,7 @@
package android.bluetooth;
import android.Manifest;
+import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.RequiresPermission;
import android.annotation.SdkConstant;
@@ -302,7 +303,7 @@ public final class BluetoothHearingAid implements BluetoothProfile {
* {@inheritDoc}
*/
@Override
- public List<BluetoothDevice> getConnectedDevices() {
+ public @NonNull List<BluetoothDevice> getConnectedDevices() {
if (VDBG) log("getConnectedDevices()");
try {
mServiceLock.readLock().lock();
@@ -322,8 +323,8 @@ public final class BluetoothHearingAid implements BluetoothProfile {
/**
* {@inheritDoc}
*/
- @Override
- public List<BluetoothDevice> getDevicesMatchingConnectionStates(int[] states) {
+ @Override public @NonNull List<BluetoothDevice> getDevicesMatchingConnectionStates(
+ @NonNull int[] states) {
if (VDBG) log("getDevicesMatchingStates()");
try {
mServiceLock.readLock().lock();
@@ -344,7 +345,7 @@ public final class BluetoothHearingAid implements BluetoothProfile {
* {@inheritDoc}
*/
@Override
- public int getConnectionState(BluetoothDevice device) {
+ public int getConnectionState(@NonNull BluetoothDevice device) {
if (VDBG) log("getState(" + device + ")");
try {
mServiceLock.readLock().lock();