summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Android Build Merger (Role) <noreply-android-build-merger@google.com> 2019-03-08 15:38:54 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-03-08 15:38:54 +0000
commit7338dc49bcf04847351b443d99cba59c27c07cea (patch)
tree5d1cc5dae1a962be5f31899420b13a84d2d9ce24
parent93b33592a16dfa64f0342468650c08ad2c982d5a (diff)
parent0c7376b588c26ab7dd83a84c9b0c1df3cb2da25b (diff)
Merge "Merge "Add @NonNull annotations to Hearing Aids Profile APIs" am: 6fa52c9b25 am: 1c5a742cb8 am: 4929093ff7"
-rw-r--r--api/current.txt6
-rw-r--r--core/java/android/bluetooth/BluetoothHearingAid.java9
2 files changed, 8 insertions, 7 deletions
diff --git a/api/current.txt b/api/current.txt
index 259bfb1f416b..a291a1001edf 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -8643,9 +8643,9 @@ package android.bluetooth {
}
public final class BluetoothHearingAid implements android.bluetooth.BluetoothProfile {
- method public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices();
- method public int getConnectionState(android.bluetooth.BluetoothDevice);
- method public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(int[]);
+ method @NonNull public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices();
+ method public int getConnectionState(@NonNull android.bluetooth.BluetoothDevice);
+ method @NonNull public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(@NonNull int[]);
field public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.hearingaid.profile.action.CONNECTION_STATE_CHANGED";
}
diff --git a/core/java/android/bluetooth/BluetoothHearingAid.java b/core/java/android/bluetooth/BluetoothHearingAid.java
index 82cc1bcf053c..b4eaab20c5bc 100644
--- a/core/java/android/bluetooth/BluetoothHearingAid.java
+++ b/core/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;
@@ -303,7 +304,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();
@@ -323,8 +324,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();
@@ -345,7 +346,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();