summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothProfile.java
diff options
context:
space:
mode:
authorWilliam Escande <wescande@google.com>2022-01-27 13:42:05 +0100
committerWilliam Escande <wescande@google.com>2022-02-14 14:55:17 +0100
commit3f38e428430389fdfdf2475e62168aa72194ba8e (patch)
tree3498eb73a5cc49e5fed4396ff80da07759b07342 /framework/java/android/bluetooth/BluetoothProfile.java
parent61713020f5182615992661b1d18758a23b2639f9 (diff)
API Changes needed for apex to build
internal cherry-pick Bug: 216476895 Test: Compile Tag: #refactor Change-Id: I09108622038b174104457ca18ac6ec7949978f66 Merged-In: I09108622038b174104457ca18ac6ec7949978f66 CTS-Coverage-Bug: 217352944
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothProfile.java')
-rw-r--r--framework/java/android/bluetooth/BluetoothProfile.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/framework/java/android/bluetooth/BluetoothProfile.java b/framework/java/android/bluetooth/BluetoothProfile.java
index c29a671488..f3540c50ef 100644
--- a/framework/java/android/bluetooth/BluetoothProfile.java
+++ b/framework/java/android/bluetooth/BluetoothProfile.java
@@ -17,7 +17,9 @@
package android.bluetooth;
import android.annotation.IntDef;
+import android.annotation.NonNull;
import android.annotation.RequiresNoPermission;
+import android.annotation.RequiresPermission;
import android.annotation.SuppressLint;
import android.annotation.SystemApi;
import android.compat.annotation.UnsupportedAppUsage;
@@ -100,6 +102,7 @@ public interface BluetoothProfile {
*
* @hide
*/
+ @SystemApi
int HID_HOST = 4;
/**
@@ -115,6 +118,7 @@ public interface BluetoothProfile {
*
* @hide
*/
+ @SystemApi
int PBAP = 6;
/**
@@ -132,6 +136,7 @@ public interface BluetoothProfile {
*
* @hide
*/
+ @SystemApi
int MAP = 9;
/*
@@ -197,6 +202,7 @@ public interface BluetoothProfile {
*
* @hide
*/
+ @SystemApi
int OPP = 20;
/**
@@ -405,6 +411,9 @@ public interface BluetoothProfile {
* is not defined
* @hide
*/
+ @SystemApi
+ @NonNull
+ @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED)
static String getConnectionStateName(int connectionState) {
switch (connectionState) {
case STATE_DISCONNECTED:
@@ -427,6 +436,9 @@ public interface BluetoothProfile {
* @return profile name as String, UNKOWN_PROFILE if the profile ID is not defined.
* @hide
*/
+ @SystemApi
+ @NonNull
+ @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED)
static String getProfileName(int profile) {
switch(profile) {
case HEADSET: