blob: e2336be887e2d18e1df6b54b1c2fa379b7591d41 [file] [log] [blame]
Vasu Norie5fb9112017-11-17 10:23:02 -08001package com.android.car;
2
3import android.bluetooth.BluetoothDevice;
4import android.bluetooth.BluetoothProfile;
5
6/**
7 * Some potentially useful static methods.
8 */
9public class Utils {
10 static final Boolean DBG = false;
11
12 static String getDeviceDebugInfo(BluetoothDevice device) {
13 return "(name = " + device.getName() + ", addr = " + device.getAddress() + ")";
14 }
15
16 static String getProfileName(int profile) {
17 switch(profile) {
18 case BluetoothProfile.A2DP_SINK:
19 return "A2DP_SINK";
20 case BluetoothProfile.HEADSET_CLIENT:
21 return "HFP";
22 case BluetoothProfile.PBAP_CLIENT:
23 return "PBAP";
24 case BluetoothProfile.MAP_CLIENT:
25 return "MAP";
26 case BluetoothProfile.AVRCP_CONTROLLER:
27 return "AVRCP";
28 default:
29 return profile + "";
30
31 }
32 }
33}