blob: bea32abd06cdc361b4616bb6aa6a608df698b62e [file] [log] [blame]
Jaikumar Ganesh2af07762010-08-24 17:36:13 -07001/*
Joseph Pirozzo54d4b662016-09-01 14:19:28 -07002 * Copyright (C) 2010-2016 The Android Open Source Project
Jaikumar Ganesh2af07762010-08-24 17:36:13 -07003 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17
18package android.bluetooth;
19
Tor Norbye27ce6cf2015-04-23 17:10:21 -070020import android.Manifest;
Stanley Tnga76ec8b2019-03-14 16:18:29 -070021import android.annotation.IntDef;
Tor Norbye27ce6cf2015-04-23 17:10:21 -070022import android.annotation.RequiresPermission;
Rahul Sabniseeccce52019-11-19 14:54:25 -080023import android.annotation.SuppressLint;
Selim Gurun9e6b35b2018-01-09 14:35:19 -080024import android.annotation.SystemApi;
Artur Satayev3625be42019-12-10 17:47:52 +000025import android.compat.annotation.UnsupportedAppUsage;
Mathew Inwood049f0f52020-11-04 09:29:36 +000026import android.os.Build;
Tor Norbye27ce6cf2015-04-23 17:10:21 -070027
Stanley Tnga76ec8b2019-03-14 16:18:29 -070028import java.lang.annotation.Retention;
29import java.lang.annotation.RetentionPolicy;
Jaikumar Ganeshd8fc4dd2010-10-18 16:41:53 -070030import java.util.List;
Jaikumar Ganesh2af07762010-08-24 17:36:13 -070031
32/**
33 * Public APIs for the Bluetooth Profiles.
34 *
35 * <p> Clients should call {@link BluetoothAdapter#getProfileProxy},
36 * to get the Profile Proxy. Each public profile implements this
37 * interface.
38 */
39public interface BluetoothProfile {
40
41 /**
42 * Extra for the connection state intents of the individual profiles.
43 *
44 * This extra represents the current connection state of the profile of the
45 * Bluetooth device.
46 */
Rahul Sabniseeccce52019-11-19 14:54:25 -080047 @SuppressLint("ActionValue")
Ajay Panickerbfcc00d2018-03-16 04:00:27 -070048 String EXTRA_STATE = "android.bluetooth.profile.extra.STATE";
Jaikumar Ganesh2af07762010-08-24 17:36:13 -070049
50 /**
51 * Extra for the connection state intents of the individual profiles.
52 *
53 * This extra represents the previous connection state of the profile of the
54 * Bluetooth device.
55 */
Rahul Sabniseeccce52019-11-19 14:54:25 -080056 @SuppressLint("ActionValue")
Ajay Panickerbfcc00d2018-03-16 04:00:27 -070057 String EXTRA_PREVIOUS_STATE =
Jack He910201b2017-08-22 16:06:54 -070058 "android.bluetooth.profile.extra.PREVIOUS_STATE";
Jaikumar Ganesh2af07762010-08-24 17:36:13 -070059
60 /** The profile is in disconnected state */
Ajay Panickerbfcc00d2018-03-16 04:00:27 -070061 int STATE_DISCONNECTED = 0;
Jaikumar Ganesh2af07762010-08-24 17:36:13 -070062 /** The profile is in connecting state */
Ajay Panickerbfcc00d2018-03-16 04:00:27 -070063 int STATE_CONNECTING = 1;
Jaikumar Ganesh2af07762010-08-24 17:36:13 -070064 /** The profile is in connected state */
Ajay Panickerbfcc00d2018-03-16 04:00:27 -070065 int STATE_CONNECTED = 2;
Jaikumar Ganesh2af07762010-08-24 17:36:13 -070066 /** The profile is in disconnecting state */
Ajay Panickerbfcc00d2018-03-16 04:00:27 -070067 int STATE_DISCONNECTING = 3;
Jaikumar Ganesh2af07762010-08-24 17:36:13 -070068
Stanley Tnga76ec8b2019-03-14 16:18:29 -070069 /** @hide */
70 @IntDef({
71 STATE_DISCONNECTED,
72 STATE_CONNECTING,
73 STATE_CONNECTED,
74 STATE_DISCONNECTING,
75 })
76 @Retention(RetentionPolicy.SOURCE)
77 public @interface BtProfileState {}
78
Jaikumar Ganesh2af07762010-08-24 17:36:13 -070079 /**
80 * Headset and Handsfree profile
81 */
Ajay Panickerbfcc00d2018-03-16 04:00:27 -070082 int HEADSET = 1;
Jaikumar Ganesh97f8ec42011-02-23 10:22:15 -080083
Jaikumar Ganesh2af07762010-08-24 17:36:13 -070084 /**
85 * A2DP profile.
86 */
Ajay Panickerbfcc00d2018-03-16 04:00:27 -070087 int A2DP = 2;
Jaikumar Ganesh97f8ec42011-02-23 10:22:15 -080088
Jaikumar Ganeshad5d9c02011-02-18 14:52:32 -080089 /**
Jaikumar Ganeshbf981ca2011-04-01 16:33:09 -070090 * Health Profile
Jack He8bb9c7d2019-01-03 16:23:41 -080091 *
92 * @deprecated Health Device Profile (HDP) and MCAP protocol are no longer used. New
93 * apps should use Bluetooth Low Energy based solutions such as {@link BluetoothGatt},
94 * {@link BluetoothAdapter#listenUsingL2capChannel()}, or
95 * {@link BluetoothDevice#createL2capChannel(int)}
Jaikumar Ganeshbf981ca2011-04-01 16:33:09 -070096 */
Jack He8bb9c7d2019-01-03 16:23:41 -080097 @Deprecated
Ajay Panickerbfcc00d2018-03-16 04:00:27 -070098 int HEALTH = 3;
Jaikumar Ganeshbf981ca2011-04-01 16:33:09 -070099
100 /**
Hansong Zhangf0761582017-10-20 15:55:59 -0700101 * HID Host
Jack He910201b2017-08-22 16:06:54 -0700102 *
Jaikumar Ganeshad5d9c02011-02-18 14:52:32 -0800103 * @hide
104 */
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700105 int HID_HOST = 4;
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700106
107 /**
Jaikumar Ganesh97f8ec42011-02-23 10:22:15 -0800108 * PAN Profile
Jack He910201b2017-08-22 16:06:54 -0700109 *
Jaikumar Ganesh97f8ec42011-02-23 10:22:15 -0800110 * @hide
111 */
Rahul Sabniseeccce52019-11-19 14:54:25 -0800112 @SystemApi
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700113 int PAN = 5;
Jaikumar Ganesh97f8ec42011-02-23 10:22:15 -0800114
115 /**
Jaikumar Ganesh53178422011-08-19 10:26:32 -0700116 * PBAP
Jack He910201b2017-08-22 16:06:54 -0700117 *
Jaikumar Ganesh53178422011-08-19 10:26:32 -0700118 * @hide
119 */
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700120 int PBAP = 6;
Jaikumar Ganesh53178422011-08-19 10:26:32 -0700121
122 /**
Ganesh Ganapathi Batta40b98952013-02-05 15:28:33 -0800123 * GATT
Ganesh Ganapathi Batta40b98952013-02-05 15:28:33 -0800124 */
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700125 int GATT = 7;
Ganesh Ganapathi Batta40b98952013-02-05 15:28:33 -0800126
127 /**
128 * GATT_SERVER
Ganesh Ganapathi Batta40b98952013-02-05 15:28:33 -0800129 */
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700130 int GATT_SERVER = 8;
Ganesh Ganapathi Batta40b98952013-02-05 15:28:33 -0800131
132 /**
Matthew Xiece145222013-07-18 17:31:50 -0700133 * MAP Profile
Jack He910201b2017-08-22 16:06:54 -0700134 *
Matthew Xiece145222013-07-18 17:31:50 -0700135 * @hide
136 */
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700137 int MAP = 9;
Matthew Xiece145222013-07-18 17:31:50 -0700138
Casper Bonded8355fb2015-03-19 10:36:45 +0100139 /*
140 * SAP Profile
141 * @hide
142 */
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700143 int SAP = 10;
Casper Bonded8355fb2015-03-19 10:36:45 +0100144
Matthew Xiece145222013-07-18 17:31:50 -0700145 /**
Mike Lockwooda5e51db2014-05-21 10:08:50 -0700146 * A2DP Sink Profile
Jack He910201b2017-08-22 16:06:54 -0700147 *
Mike Lockwooda5e51db2014-05-21 10:08:50 -0700148 * @hide
149 */
Rahul Sabnis07f48032020-01-21 15:11:22 -0800150 @SystemApi
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700151 int A2DP_SINK = 11;
Mike Lockwooda5e51db2014-05-21 10:08:50 -0700152
153 /**
Mike Lockwood517b04f2014-06-02 16:20:37 -0700154 * AVRCP Controller Profile
Jack He910201b2017-08-22 16:06:54 -0700155 *
Mike Lockwood517b04f2014-06-02 16:20:37 -0700156 * @hide
157 */
Rahul Sabnis07f48032020-01-21 15:11:22 -0800158 @SystemApi
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700159 int AVRCP_CONTROLLER = 12;
160
161 /**
162 * AVRCP Target Profile
163 *
164 * @hide
165 */
166 int AVRCP = 13;
Mike Lockwood517b04f2014-06-02 16:20:37 -0700167
168 /**
Mike Lockwoodf48a7272014-06-12 11:23:40 -0700169 * Headset Client - HFP HF Role
Jack He910201b2017-08-22 16:06:54 -0700170 *
Hemant Gupta67a995a2013-08-19 19:03:51 +0530171 * @hide
172 */
Rahul Sabnis07f48032020-01-21 15:11:22 -0800173 @SystemApi
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700174 int HEADSET_CLIENT = 16;
Hemant Gupta67a995a2013-08-19 19:03:51 +0530175
176 /**
Joseph Pirozzo6f56b0f2016-03-04 13:02:54 -0800177 * PBAP Client
Jack He910201b2017-08-22 16:06:54 -0700178 *
Joseph Pirozzo6f56b0f2016-03-04 13:02:54 -0800179 * @hide
180 */
Rahul Sabnis07f48032020-01-21 15:11:22 -0800181 @SystemApi
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700182 int PBAP_CLIENT = 17;
Joseph Pirozzo6f56b0f2016-03-04 13:02:54 -0800183
184 /**
Joseph Pirozzo54d4b662016-09-01 14:19:28 -0700185 * MAP Messaging Client Equipment (MCE)
Jack He910201b2017-08-22 16:06:54 -0700186 *
Joseph Pirozzo54d4b662016-09-01 14:19:28 -0700187 * @hide
188 */
Joseph Pirozzo1db9bd42021-01-21 11:22:44 -0800189 @SystemApi
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700190 int MAP_CLIENT = 18;
Joseph Pirozzo54d4b662016-09-01 14:19:28 -0700191
192 /**
Hansong Zhangf0761582017-10-20 15:55:59 -0700193 * HID Device
Hemant Gupta7d82a612014-04-18 11:22:45 +0530194 */
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700195 int HID_DEVICE = 19;
Hemant Gupta7d82a612014-04-18 11:22:45 +0530196
197 /**
Myles Watson31318972018-01-05 13:54:34 -0800198 * Object Push Profile (OPP)
199 *
200 * @hide
201 */
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700202 int OPP = 20;
Myles Watson31318972018-01-05 13:54:34 -0800203
204 /**
Jakub Pawlowski3f238732017-11-22 11:02:34 -0800205 * Hearing Aid Device
206 *
Jakub Pawlowski3f238732017-11-22 11:02:34 -0800207 */
208 int HEARING_AID = 21;
209
210 /**
Grzegorz Kołodziejczyk3b98ee12020-11-16 11:43:45 +0000211 * LE Audio Device
212 *
Grzegorz Kołodziejczyk3b98ee12020-11-16 11:43:45 +0000213 */
214 int LE_AUDIO = 22;
215
216 /**
Łukasz Rymanowski1b3ac772021-01-26 06:39:08 +0000217 * Volume Control profile
218 *
Jakub Pawlowski3d3c6962021-06-18 00:15:47 +0200219 * @hide
Łukasz Rymanowski1b3ac772021-01-26 06:39:08 +0000220 */
Jakub Pawlowski3d3c6962021-06-18 00:15:47 +0200221 @SystemApi
Łukasz Rymanowski1b3ac772021-01-26 06:39:08 +0000222 int VOLUME_CONTROL = 23;
223
224 /**
Jakub Tyszkowskibedd8312021-03-01 13:02:25 +0000225 * @hide
226 * Media Control Profile server
227 *
228 */
229 int MCP_SERVER = 24;
230
231 /**
Bryce Leeff5093b2016-10-09 12:54:42 -0700232 * Max profile ID. This value should be updated whenever a new profile is added to match
233 * the largest value assigned to a profile.
Jack He910201b2017-08-22 16:06:54 -0700234 *
Bryce Leeff5093b2016-10-09 12:54:42 -0700235 * @hide
236 */
Jakub Tyszkowskibedd8312021-03-01 13:02:25 +0000237 int MAX_PROFILE_ID = 24;
Bryce Leeff5093b2016-10-09 12:54:42 -0700238
239 /**
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700240 * Default priority for devices that we try to auto-connect to and
241 * and allow incoming connections for the profile
Jack He910201b2017-08-22 16:06:54 -0700242 *
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700243 * @hide
244 **/
Mathew Inwood049f0f52020-11-04 09:29:36 +0000245 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700246 int PRIORITY_AUTO_CONNECT = 1000;
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700247
248 /**
Jack He910201b2017-08-22 16:06:54 -0700249 * Default priority for devices that allow incoming
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700250 * and outgoing connections for the profile
Jack He910201b2017-08-22 16:06:54 -0700251 *
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700252 * @hide
Rahul Sabnise8bac9b2019-11-27 18:09:33 -0800253 * @deprecated Replaced with {@link #CONNECTION_POLICY_ALLOWED}
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700254 **/
Rahul Sabnise8bac9b2019-11-27 18:09:33 -0800255 @Deprecated
Selim Gurun9e6b35b2018-01-09 14:35:19 -0800256 @SystemApi
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700257 int PRIORITY_ON = 100;
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700258
259 /**
260 * Default priority for devices that does not allow incoming
261 * connections and outgoing connections for the profile.
Jack He910201b2017-08-22 16:06:54 -0700262 *
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700263 * @hide
Rahul Sabnise8bac9b2019-11-27 18:09:33 -0800264 * @deprecated Replaced with {@link #CONNECTION_POLICY_FORBIDDEN}
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700265 **/
Rahul Sabnise8bac9b2019-11-27 18:09:33 -0800266 @Deprecated
Selim Gurun9e6b35b2018-01-09 14:35:19 -0800267 @SystemApi
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700268 int PRIORITY_OFF = 0;
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700269
270 /**
271 * Default priority when not set or when the device is unpaired
Jack He910201b2017-08-22 16:06:54 -0700272 *
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700273 * @hide
Jack He910201b2017-08-22 16:06:54 -0700274 */
Mathew Inwood7d543892018-08-01 15:07:20 +0100275 @UnsupportedAppUsage
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700276 int PRIORITY_UNDEFINED = -1;
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700277
Rahul Sabnise8bac9b2019-11-27 18:09:33 -0800278 /** @hide */
279 @IntDef(prefix = "CONNECTION_POLICY_", value = {CONNECTION_POLICY_ALLOWED,
280 CONNECTION_POLICY_FORBIDDEN, CONNECTION_POLICY_UNKNOWN})
281 @Retention(RetentionPolicy.SOURCE)
282 public @interface ConnectionPolicy{}
283
284 /**
285 * Default connection policy for devices that allow incoming and outgoing connections
286 * for the profile
287 *
288 * @hide
289 **/
290 @SystemApi
291 int CONNECTION_POLICY_ALLOWED = 100;
292
293 /**
294 * Default connection policy for devices that do not allow incoming or outgoing connections
295 * for the profile.
296 *
297 * @hide
298 **/
299 @SystemApi
300 int CONNECTION_POLICY_FORBIDDEN = 0;
301
302 /**
303 * Default connection policy when not set or when the device is unpaired
304 *
305 * @hide
306 */
307 @SystemApi
308 int CONNECTION_POLICY_UNKNOWN = -1;
309
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700310 /**
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700311 * Get connected devices for this specific profile.
312 *
313 * <p> Return the set of devices which are in state {@link #STATE_CONNECTED}
314 *
Jaikumar Ganeshd8fc4dd2010-10-18 16:41:53 -0700315 * @return List of devices. The list will be empty on error.
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700316 */
Tor Norbye27ce6cf2015-04-23 17:10:21 -0700317 @RequiresPermission(Manifest.permission.BLUETOOTH)
Jaikumar Ganeshd8fc4dd2010-10-18 16:41:53 -0700318 public List<BluetoothDevice> getConnectedDevices();
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700319
320 /**
Jaikumar Ganeshb3427572011-01-25 16:03:13 -0800321 * Get a list of devices that match any of the given connection
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700322 * states.
323 *
Jaikumar Ganeshb3427572011-01-25 16:03:13 -0800324 * <p> If none of the devices match any of the given states,
325 * an empty list will be returned.
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700326 *
Jack He910201b2017-08-22 16:06:54 -0700327 * @param states Array of states. States can be one of {@link #STATE_CONNECTED}, {@link
328 * #STATE_CONNECTING}, {@link #STATE_DISCONNECTED}, {@link #STATE_DISCONNECTING},
Jaikumar Ganeshd8fc4dd2010-10-18 16:41:53 -0700329 * @return List of devices. The list will be empty on error.
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700330 */
Tor Norbye27ce6cf2015-04-23 17:10:21 -0700331 @RequiresPermission(Manifest.permission.BLUETOOTH)
Jaikumar Ganeshd8fc4dd2010-10-18 16:41:53 -0700332 public List<BluetoothDevice> getDevicesMatchingConnectionStates(int[] states);
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700333
334 /**
335 * Get the current connection state of the profile
336 *
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700337 * @param device Remote bluetooth device.
Jack He910201b2017-08-22 16:06:54 -0700338 * @return State of the profile connection. One of {@link #STATE_CONNECTED}, {@link
339 * #STATE_CONNECTING}, {@link #STATE_DISCONNECTED}, {@link #STATE_DISCONNECTING}
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700340 */
Tor Norbye27ce6cf2015-04-23 17:10:21 -0700341 @RequiresPermission(Manifest.permission.BLUETOOTH)
Stanley Tnga76ec8b2019-03-14 16:18:29 -0700342 @BtProfileState int getConnectionState(BluetoothDevice device);
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700343
344 /**
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700345 * An interface for notifying BluetoothProfile IPC clients when they have
346 * been connected or disconnected to the service.
347 */
348 public interface ServiceListener {
349 /**
350 * Called to notify the client when the proxy object has been
351 * connected to the service.
Jack He910201b2017-08-22 16:06:54 -0700352 *
Jack He8bb9c7d2019-01-03 16:23:41 -0800353 * @param profile - One of {@link #HEADSET} or {@link #A2DP}
354 * @param proxy - One of {@link BluetoothHeadset} or {@link BluetoothA2dp}
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700355 */
356 public void onServiceConnected(int profile, BluetoothProfile proxy);
357
358 /**
359 * Called to notify the client that this proxy object has been
360 * disconnected from the service.
Jack He910201b2017-08-22 16:06:54 -0700361 *
Jack He8bb9c7d2019-01-03 16:23:41 -0800362 * @param profile - One of {@link #HEADSET} or {@link #A2DP}
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700363 */
364 public void onServiceDisconnected(int profile);
365 }
Jack He93df9402017-12-11 13:11:20 -0800366
367 /**
368 * Convert an integer value of connection state into human readable string
369 *
370 * @param connectionState - One of {@link #STATE_DISCONNECTED}, {@link #STATE_CONNECTING},
371 * {@link #STATE_CONNECTED}, or {@link #STATE_DISCONNECTED}
372 * @return a string representation of the connection state, STATE_UNKNOWN if the state
373 * is not defined
374 * @hide
375 */
376 static String getConnectionStateName(int connectionState) {
377 switch (connectionState) {
378 case STATE_DISCONNECTED:
379 return "STATE_DISCONNECTED";
380 case STATE_CONNECTING:
381 return "STATE_CONNECTING";
382 case STATE_CONNECTED:
383 return "STATE_CONNECTED";
384 case STATE_DISCONNECTING:
385 return "STATE_DISCONNECTING";
386 default:
387 return "STATE_UNKNOWN";
388 }
389 }
Ugo Yue5216182019-07-22 15:56:23 +0800390
391 /**
392 * Convert an integer value of profile ID into human readable string
393 *
394 * @param profile profile ID
395 * @return profile name as String, UNKOWN_PROFILE if the profile ID is not defined.
396 * @hide
397 */
398 static String getProfileName(int profile) {
399 switch(profile) {
400 case HEADSET:
401 return "HEADSET";
402 case A2DP:
403 return "A2DP";
404 case HID_HOST:
405 return "HID_HOST";
406 case PAN:
407 return "PAN";
408 case PBAP:
409 return "PBAP";
410 case GATT:
411 return "GATT";
412 case GATT_SERVER:
413 return "GATT_SERVER";
414 case MAP:
415 return "MAP";
416 case SAP:
417 return "SAP";
418 case A2DP_SINK:
419 return "A2DP_SINK";
420 case AVRCP_CONTROLLER:
421 return "AVRCP_CONTROLLER";
422 case AVRCP:
423 return "AVRCP";
424 case HEADSET_CLIENT:
425 return "HEADSET_CLIENT";
426 case PBAP_CLIENT:
427 return "PBAP_CLIENT";
428 case MAP_CLIENT:
429 return "MAP_CLIENT";
430 case HID_DEVICE:
431 return "HID_DEVICE";
432 case OPP:
433 return "OPP";
434 case HEARING_AID:
435 return "HEARING_AID";
436 default:
437 return "UNKNOWN_PROFILE";
438 }
439 }
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700440}