summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothHearingAid.java
diff options
context:
space:
mode:
authorStanley Tng <stng@google.com>2019-03-14 16:18:29 -0700
committerStanley Tng <stng@google.com>2019-03-16 00:22:34 +0000
commita76ec8b43ba67a456f5112ab372f3e573761e4fe (patch)
treeec39d3e18c61281ed3c189819d1c92405cca4ce6 /framework/java/android/bluetooth/BluetoothHearingAid.java
parent4b7400c35ce4ff6d1c7fd4acf0ed4858c4b691ab (diff)
Cleanup annontations for Hearing Aids Profile API
Remove the @UnsupportedAppUsage and add the @IntDef for the Profile Connection States in the Hearing Aids Profile API. Also, the parent class BluetoothProfile has its Profile Connection States annontated. Bug: 128523382 Test: Compile only Change-Id: Ibd02516fa637ddb48d70a8dfacf607f047aec282
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothHearingAid.java')
-rw-r--r--framework/java/android/bluetooth/BluetoothHearingAid.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/framework/java/android/bluetooth/BluetoothHearingAid.java b/framework/java/android/bluetooth/BluetoothHearingAid.java
index c5a0bbd2f8..58ff2e14fd 100644
--- a/framework/java/android/bluetooth/BluetoothHearingAid.java
+++ b/framework/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;
@@ -91,7 +90,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";
@@ -323,7 +321,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 {
@@ -345,7 +344,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();
@@ -385,7 +385,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 {
@@ -417,7 +416,6 @@ public final class BluetoothHearingAid implements BluetoothProfile {
* @hide
*/
@RequiresPermission(Manifest.permission.BLUETOOTH)
- @UnsupportedAppUsage
public List<BluetoothDevice> getActiveDevices() {
if (VDBG) log("getActiveDevices()");
try {