blob: 7f96958a618e018593fc31fdd67589640dd92bce [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
Jaikumar Ganesh2af07762010-08-24 17:36:13 -070017package android.bluetooth;
18
Stanley Tnga76ec8b2019-03-14 16:18:29 -070019import android.annotation.IntDef;
Jeff Sharkey5ba8bfc2021-04-16 09:53:23 -060020import android.annotation.RequiresNoPermission;
Rahul Sabniseeccce52019-11-19 14:54:25 -080021import android.annotation.SuppressLint;
Selim Gurun9e6b35b2018-01-09 14:35:19 -080022import android.annotation.SystemApi;
Artur Satayev3625be42019-12-10 17:47:52 +000023import android.compat.annotation.UnsupportedAppUsage;
Mathew Inwood049f0f52020-11-04 09:29:36 +000024import android.os.Build;
Tor Norbye27ce6cf2015-04-23 17:10:21 -070025
Stanley Tnga76ec8b2019-03-14 16:18:29 -070026import java.lang.annotation.Retention;
27import java.lang.annotation.RetentionPolicy;
Jaikumar Ganeshd8fc4dd2010-10-18 16:41:53 -070028import java.util.List;
Jaikumar Ganesh2af07762010-08-24 17:36:13 -070029
30/**
31 * Public APIs for the Bluetooth Profiles.
32 *
33 * <p> Clients should call {@link BluetoothAdapter#getProfileProxy},
34 * to get the Profile Proxy. Each public profile implements this
35 * interface.
36 */
37public interface BluetoothProfile {
38
39 /**
40 * Extra for the connection state intents of the individual profiles.
41 *
42 * This extra represents the current connection state of the profile of the
43 * Bluetooth device.
44 */
Rahul Sabniseeccce52019-11-19 14:54:25 -080045 @SuppressLint("ActionValue")
Ajay Panickerbfcc00d2018-03-16 04:00:27 -070046 String EXTRA_STATE = "android.bluetooth.profile.extra.STATE";
Jaikumar Ganesh2af07762010-08-24 17:36:13 -070047
48 /**
49 * Extra for the connection state intents of the individual profiles.
50 *
51 * This extra represents the previous connection state of the profile of the
52 * Bluetooth device.
53 */
Rahul Sabniseeccce52019-11-19 14:54:25 -080054 @SuppressLint("ActionValue")
Ajay Panickerbfcc00d2018-03-16 04:00:27 -070055 String EXTRA_PREVIOUS_STATE =
Jack He910201b2017-08-22 16:06:54 -070056 "android.bluetooth.profile.extra.PREVIOUS_STATE";
Jaikumar Ganesh2af07762010-08-24 17:36:13 -070057
58 /** The profile is in disconnected state */
Ajay Panickerbfcc00d2018-03-16 04:00:27 -070059 int STATE_DISCONNECTED = 0;
Jaikumar Ganesh2af07762010-08-24 17:36:13 -070060 /** The profile is in connecting state */
Ajay Panickerbfcc00d2018-03-16 04:00:27 -070061 int STATE_CONNECTING = 1;
Jaikumar Ganesh2af07762010-08-24 17:36:13 -070062 /** The profile is in connected state */
Ajay Panickerbfcc00d2018-03-16 04:00:27 -070063 int STATE_CONNECTED = 2;
Jaikumar Ganesh2af07762010-08-24 17:36:13 -070064 /** The profile is in disconnecting state */
Ajay Panickerbfcc00d2018-03-16 04:00:27 -070065 int STATE_DISCONNECTING = 3;
Jaikumar Ganesh2af07762010-08-24 17:36:13 -070066
Stanley Tnga76ec8b2019-03-14 16:18:29 -070067 /** @hide */
68 @IntDef({
69 STATE_DISCONNECTED,
70 STATE_CONNECTING,
71 STATE_CONNECTED,
72 STATE_DISCONNECTING,
73 })
74 @Retention(RetentionPolicy.SOURCE)
75 public @interface BtProfileState {}
76
Jaikumar Ganesh2af07762010-08-24 17:36:13 -070077 /**
78 * Headset and Handsfree profile
79 */
Ajay Panickerbfcc00d2018-03-16 04:00:27 -070080 int HEADSET = 1;
Jaikumar Ganesh97f8ec42011-02-23 10:22:15 -080081
Jaikumar Ganesh2af07762010-08-24 17:36:13 -070082 /**
83 * A2DP profile.
84 */
Ajay Panickerbfcc00d2018-03-16 04:00:27 -070085 int A2DP = 2;
Jaikumar Ganesh97f8ec42011-02-23 10:22:15 -080086
Jaikumar Ganeshad5d9c02011-02-18 14:52:32 -080087 /**
Jaikumar Ganeshbf981ca2011-04-01 16:33:09 -070088 * Health Profile
Jack He8bb9c7d2019-01-03 16:23:41 -080089 *
90 * @deprecated Health Device Profile (HDP) and MCAP protocol are no longer used. New
91 * apps should use Bluetooth Low Energy based solutions such as {@link BluetoothGatt},
92 * {@link BluetoothAdapter#listenUsingL2capChannel()}, or
93 * {@link BluetoothDevice#createL2capChannel(int)}
Jaikumar Ganeshbf981ca2011-04-01 16:33:09 -070094 */
Jack He8bb9c7d2019-01-03 16:23:41 -080095 @Deprecated
Ajay Panickerbfcc00d2018-03-16 04:00:27 -070096 int HEALTH = 3;
Jaikumar Ganeshbf981ca2011-04-01 16:33:09 -070097
98 /**
Hansong Zhangf0761582017-10-20 15:55:59 -070099 * HID Host
Jack He910201b2017-08-22 16:06:54 -0700100 *
Jaikumar Ganeshad5d9c02011-02-18 14:52:32 -0800101 * @hide
102 */
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700103 int HID_HOST = 4;
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700104
105 /**
Jaikumar Ganesh97f8ec42011-02-23 10:22:15 -0800106 * PAN Profile
Jack He910201b2017-08-22 16:06:54 -0700107 *
Jaikumar Ganesh97f8ec42011-02-23 10:22:15 -0800108 * @hide
109 */
Rahul Sabniseeccce52019-11-19 14:54:25 -0800110 @SystemApi
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700111 int PAN = 5;
Jaikumar Ganesh97f8ec42011-02-23 10:22:15 -0800112
113 /**
Jaikumar Ganesh53178422011-08-19 10:26:32 -0700114 * PBAP
Jack He910201b2017-08-22 16:06:54 -0700115 *
Jaikumar Ganesh53178422011-08-19 10:26:32 -0700116 * @hide
117 */
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700118 int PBAP = 6;
Jaikumar Ganesh53178422011-08-19 10:26:32 -0700119
120 /**
Ganesh Ganapathi Batta40b98952013-02-05 15:28:33 -0800121 * GATT
Ganesh Ganapathi Batta40b98952013-02-05 15:28:33 -0800122 */
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700123 int GATT = 7;
Ganesh Ganapathi Batta40b98952013-02-05 15:28:33 -0800124
125 /**
126 * GATT_SERVER
Ganesh Ganapathi Batta40b98952013-02-05 15:28:33 -0800127 */
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700128 int GATT_SERVER = 8;
Ganesh Ganapathi Batta40b98952013-02-05 15:28:33 -0800129
130 /**
Matthew Xiece145222013-07-18 17:31:50 -0700131 * MAP Profile
Jack He910201b2017-08-22 16:06:54 -0700132 *
Matthew Xiece145222013-07-18 17:31:50 -0700133 * @hide
134 */
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700135 int MAP = 9;
Matthew Xiece145222013-07-18 17:31:50 -0700136
Casper Bonded8355fb2015-03-19 10:36:45 +0100137 /*
138 * SAP Profile
139 * @hide
140 */
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700141 int SAP = 10;
Casper Bonded8355fb2015-03-19 10:36:45 +0100142
Matthew Xiece145222013-07-18 17:31:50 -0700143 /**
Mike Lockwooda5e51db2014-05-21 10:08:50 -0700144 * A2DP Sink Profile
Jack He910201b2017-08-22 16:06:54 -0700145 *
Mike Lockwooda5e51db2014-05-21 10:08:50 -0700146 * @hide
147 */
Rahul Sabnis07f48032020-01-21 15:11:22 -0800148 @SystemApi
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700149 int A2DP_SINK = 11;
Mike Lockwooda5e51db2014-05-21 10:08:50 -0700150
151 /**
Mike Lockwood517b04f2014-06-02 16:20:37 -0700152 * AVRCP Controller Profile
Jack He910201b2017-08-22 16:06:54 -0700153 *
Mike Lockwood517b04f2014-06-02 16:20:37 -0700154 * @hide
155 */
Rahul Sabnis07f48032020-01-21 15:11:22 -0800156 @SystemApi
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700157 int AVRCP_CONTROLLER = 12;
158
159 /**
160 * AVRCP Target Profile
161 *
162 * @hide
163 */
164 int AVRCP = 13;
Mike Lockwood517b04f2014-06-02 16:20:37 -0700165
166 /**
Mike Lockwoodf48a7272014-06-12 11:23:40 -0700167 * Headset Client - HFP HF Role
Jack He910201b2017-08-22 16:06:54 -0700168 *
Hemant Gupta67a995a2013-08-19 19:03:51 +0530169 * @hide
170 */
Rahul Sabnis07f48032020-01-21 15:11:22 -0800171 @SystemApi
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700172 int HEADSET_CLIENT = 16;
Hemant Gupta67a995a2013-08-19 19:03:51 +0530173
174 /**
Joseph Pirozzo6f56b0f2016-03-04 13:02:54 -0800175 * PBAP Client
Jack He910201b2017-08-22 16:06:54 -0700176 *
Joseph Pirozzo6f56b0f2016-03-04 13:02:54 -0800177 * @hide
178 */
Rahul Sabnis07f48032020-01-21 15:11:22 -0800179 @SystemApi
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700180 int PBAP_CLIENT = 17;
Joseph Pirozzo6f56b0f2016-03-04 13:02:54 -0800181
182 /**
Joseph Pirozzo54d4b662016-09-01 14:19:28 -0700183 * MAP Messaging Client Equipment (MCE)
Jack He910201b2017-08-22 16:06:54 -0700184 *
Joseph Pirozzo54d4b662016-09-01 14:19:28 -0700185 * @hide
186 */
Joseph Pirozzo1db9bd42021-01-21 11:22:44 -0800187 @SystemApi
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700188 int MAP_CLIENT = 18;
Joseph Pirozzo54d4b662016-09-01 14:19:28 -0700189
190 /**
Hansong Zhangf0761582017-10-20 15:55:59 -0700191 * HID Device
Hemant Gupta7d82a612014-04-18 11:22:45 +0530192 */
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700193 int HID_DEVICE = 19;
Hemant Gupta7d82a612014-04-18 11:22:45 +0530194
195 /**
Myles Watson31318972018-01-05 13:54:34 -0800196 * Object Push Profile (OPP)
197 *
198 * @hide
199 */
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700200 int OPP = 20;
Myles Watson31318972018-01-05 13:54:34 -0800201
202 /**
Jakub Pawlowski3f238732017-11-22 11:02:34 -0800203 * Hearing Aid Device
204 *
Jakub Pawlowski3f238732017-11-22 11:02:34 -0800205 */
206 int HEARING_AID = 21;
207
208 /**
Grzegorz Kołodziejczyk3b98ee12020-11-16 11:43:45 +0000209 * LE Audio Device
210 *
Grzegorz Kołodziejczyk3b98ee12020-11-16 11:43:45 +0000211 */
212 int LE_AUDIO = 22;
213
214 /**
Łukasz Rymanowski1b3ac772021-01-26 06:39:08 +0000215 * Volume Control profile
216 *
Jakub Pawlowski807fd1c2021-06-18 00:09:00 +0200217 * @hide
Łukasz Rymanowski1b3ac772021-01-26 06:39:08 +0000218 */
Jakub Pawlowski807fd1c2021-06-18 00:09:00 +0200219 @SystemApi
Łukasz Rymanowski1b3ac772021-01-26 06:39:08 +0000220 int VOLUME_CONTROL = 23;
221
222 /**
Jakub Tyszkowskibedd8312021-03-01 13:02:25 +0000223 * @hide
224 * Media Control Profile server
225 *
226 */
227 int MCP_SERVER = 24;
228
229 /**
Łukasz Rymanowskifd45c862021-08-23 12:01:47 +0000230 * Coordinated Set Identification Profile set coordinator
231 *
232 */
233 int CSIP_SET_COORDINATOR = 25;
234
235 /**
Qasim Javed2eb043e2021-11-04 12:57:33 -0700236 * LE Audio Broadcast Source
237 *
238 * @hide
239 */
240 int LE_AUDIO_BROADCAST = 26;
241
242 /**
Bryce Leeff5093b2016-10-09 12:54:42 -0700243 * Max profile ID. This value should be updated whenever a new profile is added to match
244 * the largest value assigned to a profile.
Jack He910201b2017-08-22 16:06:54 -0700245 *
Bryce Leeff5093b2016-10-09 12:54:42 -0700246 * @hide
247 */
Qasim Javed2eb043e2021-11-04 12:57:33 -0700248 int MAX_PROFILE_ID = 26;
Bryce Leeff5093b2016-10-09 12:54:42 -0700249
250 /**
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700251 * Default priority for devices that we try to auto-connect to and
252 * and allow incoming connections for the profile
Jack He910201b2017-08-22 16:06:54 -0700253 *
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700254 * @hide
255 **/
Mathew Inwood049f0f52020-11-04 09:29:36 +0000256 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700257 int PRIORITY_AUTO_CONNECT = 1000;
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700258
259 /**
Jack He910201b2017-08-22 16:06:54 -0700260 * Default priority for devices that allow incoming
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700261 * 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_ALLOWED}
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_ON = 100;
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700269
270 /**
271 * Default priority for devices that does not allow incoming
272 * connections and outgoing connections for the profile.
Jack He910201b2017-08-22 16:06:54 -0700273 *
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700274 * @hide
Rahul Sabnise8bac9b2019-11-27 18:09:33 -0800275 * @deprecated Replaced with {@link #CONNECTION_POLICY_FORBIDDEN}
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700276 **/
Rahul Sabnise8bac9b2019-11-27 18:09:33 -0800277 @Deprecated
Selim Gurun9e6b35b2018-01-09 14:35:19 -0800278 @SystemApi
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700279 int PRIORITY_OFF = 0;
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700280
281 /**
282 * Default priority when not set or when the device is unpaired
Jack He910201b2017-08-22 16:06:54 -0700283 *
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700284 * @hide
Jack He910201b2017-08-22 16:06:54 -0700285 */
Mathew Inwood7d543892018-08-01 15:07:20 +0100286 @UnsupportedAppUsage
Ajay Panickerbfcc00d2018-03-16 04:00:27 -0700287 int PRIORITY_UNDEFINED = -1;
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700288
Rahul Sabnise8bac9b2019-11-27 18:09:33 -0800289 /** @hide */
290 @IntDef(prefix = "CONNECTION_POLICY_", value = {CONNECTION_POLICY_ALLOWED,
291 CONNECTION_POLICY_FORBIDDEN, CONNECTION_POLICY_UNKNOWN})
292 @Retention(RetentionPolicy.SOURCE)
293 public @interface ConnectionPolicy{}
294
295 /**
296 * Default connection policy for devices that allow incoming and outgoing connections
297 * for the profile
298 *
299 * @hide
300 **/
301 @SystemApi
302 int CONNECTION_POLICY_ALLOWED = 100;
303
304 /**
305 * Default connection policy for devices that do not allow incoming or outgoing connections
306 * for the profile.
307 *
308 * @hide
309 **/
310 @SystemApi
311 int CONNECTION_POLICY_FORBIDDEN = 0;
312
313 /**
314 * Default connection policy when not set or when the device is unpaired
315 *
316 * @hide
317 */
318 @SystemApi
319 int CONNECTION_POLICY_UNKNOWN = -1;
320
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700321 /**
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700322 * Get connected devices for this specific profile.
323 *
324 * <p> Return the set of devices which are in state {@link #STATE_CONNECTED}
325 *
Jaikumar Ganeshd8fc4dd2010-10-18 16:41:53 -0700326 * @return List of devices. The list will be empty on error.
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700327 */
Jaikumar Ganeshd8fc4dd2010-10-18 16:41:53 -0700328 public List<BluetoothDevice> getConnectedDevices();
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700329
330 /**
Jaikumar Ganeshb3427572011-01-25 16:03:13 -0800331 * Get a list of devices that match any of the given connection
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700332 * states.
333 *
Jaikumar Ganeshb3427572011-01-25 16:03:13 -0800334 * <p> If none of the devices match any of the given states,
335 * an empty list will be returned.
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700336 *
Jack He910201b2017-08-22 16:06:54 -0700337 * @param states Array of states. States can be one of {@link #STATE_CONNECTED}, {@link
338 * #STATE_CONNECTING}, {@link #STATE_DISCONNECTED}, {@link #STATE_DISCONNECTING},
Jaikumar Ganeshd8fc4dd2010-10-18 16:41:53 -0700339 * @return List of devices. The list will be empty on error.
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700340 */
Jaikumar Ganeshd8fc4dd2010-10-18 16:41:53 -0700341 public List<BluetoothDevice> getDevicesMatchingConnectionStates(int[] states);
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700342
343 /**
344 * Get the current connection state of the profile
345 *
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700346 * @param device Remote bluetooth device.
Jack He910201b2017-08-22 16:06:54 -0700347 * @return State of the profile connection. One of {@link #STATE_CONNECTED}, {@link
348 * #STATE_CONNECTING}, {@link #STATE_DISCONNECTED}, {@link #STATE_DISCONNECTING}
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700349 */
Stanley Tnga76ec8b2019-03-14 16:18:29 -0700350 @BtProfileState int getConnectionState(BluetoothDevice device);
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700351
352 /**
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700353 * An interface for notifying BluetoothProfile IPC clients when they have
354 * been connected or disconnected to the service.
355 */
356 public interface ServiceListener {
357 /**
358 * Called to notify the client when the proxy object has been
359 * connected to the service.
Jack He910201b2017-08-22 16:06:54 -0700360 *
Jack He8bb9c7d2019-01-03 16:23:41 -0800361 * @param profile - One of {@link #HEADSET} or {@link #A2DP}
362 * @param proxy - One of {@link BluetoothHeadset} or {@link BluetoothA2dp}
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700363 */
Jeff Sharkey5ba8bfc2021-04-16 09:53:23 -0600364 @RequiresNoPermission
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700365 public void onServiceConnected(int profile, BluetoothProfile proxy);
366
367 /**
368 * Called to notify the client that this proxy object has been
369 * disconnected from the service.
Jack He910201b2017-08-22 16:06:54 -0700370 *
Jack He8bb9c7d2019-01-03 16:23:41 -0800371 * @param profile - One of {@link #HEADSET} or {@link #A2DP}
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700372 */
Jeff Sharkey5ba8bfc2021-04-16 09:53:23 -0600373 @RequiresNoPermission
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700374 public void onServiceDisconnected(int profile);
375 }
Jack He93df9402017-12-11 13:11:20 -0800376
377 /**
378 * Convert an integer value of connection state into human readable string
379 *
380 * @param connectionState - One of {@link #STATE_DISCONNECTED}, {@link #STATE_CONNECTING},
381 * {@link #STATE_CONNECTED}, or {@link #STATE_DISCONNECTED}
382 * @return a string representation of the connection state, STATE_UNKNOWN if the state
383 * is not defined
384 * @hide
385 */
386 static String getConnectionStateName(int connectionState) {
387 switch (connectionState) {
388 case STATE_DISCONNECTED:
389 return "STATE_DISCONNECTED";
390 case STATE_CONNECTING:
391 return "STATE_CONNECTING";
392 case STATE_CONNECTED:
393 return "STATE_CONNECTED";
394 case STATE_DISCONNECTING:
395 return "STATE_DISCONNECTING";
396 default:
397 return "STATE_UNKNOWN";
398 }
399 }
Ugo Yue5216182019-07-22 15:56:23 +0800400
401 /**
402 * Convert an integer value of profile ID into human readable string
403 *
404 * @param profile profile ID
405 * @return profile name as String, UNKOWN_PROFILE if the profile ID is not defined.
406 * @hide
407 */
408 static String getProfileName(int profile) {
409 switch(profile) {
410 case HEADSET:
411 return "HEADSET";
412 case A2DP:
413 return "A2DP";
414 case HID_HOST:
415 return "HID_HOST";
416 case PAN:
417 return "PAN";
418 case PBAP:
419 return "PBAP";
420 case GATT:
421 return "GATT";
422 case GATT_SERVER:
423 return "GATT_SERVER";
424 case MAP:
425 return "MAP";
426 case SAP:
427 return "SAP";
428 case A2DP_SINK:
429 return "A2DP_SINK";
430 case AVRCP_CONTROLLER:
431 return "AVRCP_CONTROLLER";
432 case AVRCP:
433 return "AVRCP";
434 case HEADSET_CLIENT:
435 return "HEADSET_CLIENT";
436 case PBAP_CLIENT:
437 return "PBAP_CLIENT";
438 case MAP_CLIENT:
439 return "MAP_CLIENT";
440 case HID_DEVICE:
441 return "HID_DEVICE";
442 case OPP:
443 return "OPP";
444 case HEARING_AID:
445 return "HEARING_AID";
446 default:
447 return "UNKNOWN_PROFILE";
448 }
449 }
Jaikumar Ganesh2af07762010-08-24 17:36:13 -0700450}