summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Stanley Tng <stng@google.com> 2019-03-18 14:36:27 -0700
committer android-build-merger <android-build-merger@google.com> 2019-03-18 14:36:27 -0700
commit5c85ed092a07e816f2d1da5d4856a80e12b679c5 (patch)
treebd944a69d53fab2129fc4fc79a0409439be0bf65
parent3c007364420826a033a99b827143344066e1b45b (diff)
parent72f589aafd1382a29139d65c821a4fa1e4c5bd37 (diff)
Merge "Cleanup annontations for Hearing Aids Profile API" am: f6b3f6a8d8 am: 73f7fd85cb
am: 72f589aafd Change-Id: I1bc62eb19c3d1bd3fd6d959163aaf9e44ab0d217
-rw-r--r--core/java/android/bluetooth/BluetoothHearingAid.java10
-rw-r--r--core/java/android/bluetooth/BluetoothProfile.java2
2 files changed, 5 insertions, 7 deletions
diff --git a/core/java/android/bluetooth/BluetoothHearingAid.java b/core/java/android/bluetooth/BluetoothHearingAid.java
index b4eaab20c5bc..d6edb90ca27b 100644
--- a/core/java/android/bluetooth/BluetoothHearingAid.java
+++ b/core/java/android/bluetooth/BluetoothHearingAid.java
@@ -22,7 +22,6 @@ import android.annotation.Nullable;
import android.annotation.RequiresPermission;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
-import android.annotation.UnsupportedAppUsage;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -92,7 +91,6 @@ public final class BluetoothHearingAid implements BluetoothProfile {
* @hide
*/
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
- @UnsupportedAppUsage
public static final String ACTION_ACTIVE_DEVICE_CHANGED =
"android.bluetooth.hearingaid.profile.action.ACTIVE_DEVICE_CHANGED";
@@ -324,7 +322,8 @@ public final class BluetoothHearingAid implements BluetoothProfile {
/**
* {@inheritDoc}
*/
- @Override public @NonNull List<BluetoothDevice> getDevicesMatchingConnectionStates(
+ @Override
+ public @NonNull List<BluetoothDevice> getDevicesMatchingConnectionStates(
@NonNull int[] states) {
if (VDBG) log("getDevicesMatchingStates()");
try {
@@ -346,7 +345,8 @@ public final class BluetoothHearingAid implements BluetoothProfile {
* {@inheritDoc}
*/
@Override
- public int getConnectionState(@NonNull BluetoothDevice device) {
+ public @BluetoothProfile.BtProfileState int getConnectionState(
+ @NonNull BluetoothDevice device) {
if (VDBG) log("getState(" + device + ")");
try {
mServiceLock.readLock().lock();
@@ -386,7 +386,6 @@ public final class BluetoothHearingAid implements BluetoothProfile {
* @return false on immediate error, true otherwise
* @hide
*/
- @UnsupportedAppUsage
public boolean setActiveDevice(@Nullable BluetoothDevice device) {
if (DBG) log("setActiveDevice(" + device + ")");
try {
@@ -418,7 +417,6 @@ public final class BluetoothHearingAid implements BluetoothProfile {
* @hide
*/
@RequiresPermission(Manifest.permission.BLUETOOTH)
- @UnsupportedAppUsage
public List<BluetoothDevice> getActiveDevices() {
if (VDBG) log("getActiveDevices()");
try {
diff --git a/core/java/android/bluetooth/BluetoothProfile.java b/core/java/android/bluetooth/BluetoothProfile.java
index ef775967f8a7..dabe0fdac39a 100644
--- a/core/java/android/bluetooth/BluetoothProfile.java
+++ b/core/java/android/bluetooth/BluetoothProfile.java
@@ -276,7 +276,7 @@ public interface BluetoothProfile {
* #STATE_CONNECTING}, {@link #STATE_DISCONNECTED}, {@link #STATE_DISCONNECTING}
*/
@RequiresPermission(Manifest.permission.BLUETOOTH)
- public int getConnectionState(BluetoothDevice device);
+ @BtProfileState int getConnectionState(BluetoothDevice device);
/**
* An interface for notifying BluetoothProfile IPC clients when they have