diff options
author | Etienne Ruffieux <eruffieux@google.com> | 2021-11-16 18:07:50 +0000 |
---|---|---|
committer | Etienne Ruffieux <eruffieux@google.com> | 2021-11-22 16:44:54 +0000 |
commit | 5f48e31cc2a3ba3c19d4c992965a6251159b41c5 (patch) | |
tree | 6ee6533929a0e4f3022fc77acffaf26f79464d51 /framework/java/android/bluetooth/BluetoothClass.java | |
parent | 92fa473e52fb872a9479f327de3b43cc93d158f7 (diff) |
Made BluetoothClass#doesClassMatch public.
Removed UnsupportedAppUsage annotation, added SuppressLint
annotation to SettingsLib usage.
CTS-Coverage-Bug: 205159131
Tag: #feature
Bug: 195158535
Test: Make
Change-Id: Ie26f3b627ec725dc6abf4a1a0d01628ccbb2df77
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothClass.java')
-rwxr-xr-x | framework/java/android/bluetooth/BluetoothClass.java | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/framework/java/android/bluetooth/BluetoothClass.java b/framework/java/android/bluetooth/BluetoothClass.java index 7fe18a0704..69525b5434 100755 --- a/framework/java/android/bluetooth/BluetoothClass.java +++ b/framework/java/android/bluetooth/BluetoothClass.java @@ -17,6 +17,7 @@ package android.bluetooth; import android.annotation.Nullable; +import android.annotation.SystemApi; import android.annotation.TestApi; import android.compat.annotation.UnsupportedAppUsage; import android.os.Build; @@ -327,21 +328,26 @@ public final class BluetoothClass implements Parcelable { return Arrays.copyOfRange(bytes, 1, bytes.length); } - /** @hide */ - @UnsupportedAppUsage public static final int PROFILE_HEADSET = 0; - /** @hide */ - @UnsupportedAppUsage + public static final int PROFILE_A2DP = 1; + /** @hide */ + @SystemApi public static final int PROFILE_OPP = 2; - /** @hide */ + public static final int PROFILE_HID = 3; + /** @hide */ + @SystemApi public static final int PROFILE_PANU = 4; + /** @hide */ + @SystemApi public static final int PROFILE_NAP = 5; + /** @hide */ + @SystemApi public static final int PROFILE_A2DP_SINK = 6; /** @@ -350,11 +356,9 @@ public final class BluetoothClass implements Parcelable { * given class bits might support specified profile. It is not accurate for all * devices. It tries to err on the side of false positives. * - * @param profile The profile to be checked - * @return True if this device might support specified profile. - * @hide + * @param profile the profile to be checked + * @return whether this device supports specified profile */ - @UnsupportedAppUsage public boolean doesClassMatch(int profile) { if (profile == PROFILE_A2DP) { if (hasService(Service.RENDER)) { |