summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward Jee <edjee@google.com>2013-08-16 04:07:49 -0700
committerEdward Jee <edjee@google.com>2013-08-23 01:17:07 +0000
commit922d41b6ef202eac65991d27c43d74c828256f0d (patch)
tree3d53a4b7c7454aa3b52ab655994e77db37279a11
parent0ccb7d117fa13933cb0d7820387e00f3d1aff18d (diff)
downloadframeworks_base-922d41b6ef202eac65991d27c43d74c828256f0d.zip
frameworks_base-922d41b6ef202eac65991d27c43d74c828256f0d.tar.gz
frameworks_base-922d41b6ef202eac65991d27c43d74c828256f0d.tar.bz2
Enables AT+ANDROID command in Bluetooth HFP.
Adds another vendor-specific command AT+ANDROID in Bluetooth Hands-Free Profile. And creates an API function that sends an unsolicited result code +ANDROID . Bug: 8736189 Change-Id: I4757c410d31b97511c92f66d71035eb929f9fd29
-rw-r--r--api/current.txt132
-rw-r--r--core/java/android/bluetooth/BluetoothAssignedNumbers.java650
-rw-r--r--core/java/android/bluetooth/BluetoothHeadset.java45
-rwxr-xr-xcore/java/android/bluetooth/IBluetoothHeadset.aidl3
4 files changed, 830 insertions, 0 deletions
diff --git a/api/current.txt b/api/current.txt
index dc081ac..3248403 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -4784,68 +4784,165 @@ package android.bluetooth {
}
public class BluetoothAssignedNumbers {
+ field public static final int AAMP_OF_AMERICA = 190; // 0xbe
field public static final int ACCEL_SEMICONDUCTOR = 74; // 0x4a
+ field public static final int ACE_SENSOR = 188; // 0xbc
+ field public static final int ADIDAS = 195; // 0xc3
+ field public static final int ADVANCED_PANMOBIL_SYSTEMS = 145; // 0x91
+ field public static final int AIROHA_TECHNOLOGY = 148; // 0x94
field public static final int ALCATEL = 36; // 0x24
+ field public static final int ALPWISE = 154; // 0x9a
+ field public static final int AMICCOM_ELECTRONICS = 192; // 0xc0
+ field public static final int APLIX = 189; // 0xbd
field public static final int APPLE = 76; // 0x4c
field public static final int APT_LICENSING = 79; // 0x4f
+ field public static final int ARCHOS = 207; // 0xcf
+ field public static final int ARP_DEVICES = 168; // 0xa8
field public static final int ATHEROS_COMMUNICATIONS = 69; // 0x45
field public static final int ATMEL = 19; // 0x13
+ field public static final int AUSTCO_COMMUNICATION_SYSTEMS = 213; // 0xd5
+ field public static final int AUTONET_MOBILE = 127; // 0x7f
field public static final int AVAGO = 78; // 0x4e
field public static final int AVM_BERLIN = 31; // 0x1f
+ field public static final int A_AND_D_ENGINEERING = 105; // 0x69
+ field public static final int A_AND_R_CAMBRIDGE = 124; // 0x7c
field public static final int BANDSPEED = 32; // 0x20
+ field public static final int BAND_XI_INTERNATIONAL = 100; // 0x64
+ field public static final int BDE_TECHNOLOGY = 180; // 0xb4
+ field public static final int BEATS_ELECTRONICS = 204; // 0xcc
+ field public static final int BEAUTIFUL_ENTERPRISE = 108; // 0x6c
+ field public static final int BEKEY = 178; // 0xb2
field public static final int BELKIN_INTERNATIONAL = 92; // 0x5c
+ field public static final int BINAURIC = 203; // 0xcb
+ field public static final int BIOSENTRONICS = 219; // 0xdb
field public static final int BLUEGIGA = 71; // 0x47
+ field public static final int BLUERADIOS = 133; // 0x85
field public static final int BLUETOOTH_SIG = 63; // 0x3f
+ field public static final int BLUETREK_TECHNOLOGIES = 151; // 0x97
+ field public static final int BOSE = 158; // 0x9e
+ field public static final int BRIARTEK = 109; // 0x6d
field public static final int BROADCOM = 15; // 0xf
+ field public static final int CAEN_RFID = 170; // 0xaa
field public static final int CAMBRIDGE_SILICON_RADIO = 10; // 0xa
field public static final int CATC = 52; // 0x34
+ field public static final int CINETIX = 175; // 0xaf
+ field public static final int CLARINOX_TECHNOLOGIES = 179; // 0xb3
+ field public static final int COLORFY = 156; // 0x9c
field public static final int COMMIL = 51; // 0x33
field public static final int CONEXANT_SYSTEMS = 28; // 0x1c
+ field public static final int CONNECTBLUE = 113; // 0x71
field public static final int CONTINENTAL_AUTOMOTIVE = 75; // 0x4b
field public static final int CONWISE_TECHNOLOGY = 66; // 0x42
+ field public static final int CREATIVE_TECHNOLOGY = 118; // 0x76
field public static final int C_TECHNOLOGIES = 38; // 0x26
+ field public static final int DANLERS = 225; // 0xe1
+ field public static final int DELORME_PUBLISHING_COMPANY = 128; // 0x80
+ field public static final int DEXCOM = 208; // 0xd0
+ field public static final int DIALOG_SEMICONDUCTOR = 210; // 0xd2
field public static final int DIGIANSWER = 12; // 0xc
field public static final int ECLIPSE = 53; // 0x35
+ field public static final int ECOTEST = 136; // 0x88
+ field public static final int ELGATO_SYSTEMS = 206; // 0xce
field public static final int EM_MICROELECTRONIC_MARIN = 90; // 0x5a
+ field public static final int EQUINOX_AG = 134; // 0x86
field public static final int ERICSSON_TECHNOLOGY = 0; // 0x0
+ field public static final int EVLUMA = 201; // 0xc9
field public static final int FREE2MOVE = 83; // 0x53
+ field public static final int FUNAI_ELECTRIC = 144; // 0x90
+ field public static final int GARMIN_INTERNATIONAL = 135; // 0x87
field public static final int GCT_SEMICONDUCTOR = 45; // 0x2d
+ field public static final int GELO = 200; // 0xc8
+ field public static final int GENEQ = 194; // 0xc2
+ field public static final int GENERAL_MOTORS = 104; // 0x68
field public static final int GENNUM = 59; // 0x3b
+ field public static final int GEOFORCE = 157; // 0x9d
+ field public static final int GIBSON_GUITARS = 98; // 0x62
+ field public static final int GN_NETCOM = 103; // 0x67
+ field public static final int GN_RESOUND = 137; // 0x89
+ field public static final int GOOGLE = 224; // 0xe0
+ field public static final int GREEN_THROTTLE_GAMES = 172; // 0xac
+ field public static final int GROUP_SENSE = 115; // 0x73
+ field public static final int HANLYNN_TECHNOLOGIES = 123; // 0x7b
field public static final int HARMAN_INTERNATIONAL = 87; // 0x57
+ field public static final int HEWLETT_PACKARD = 101; // 0x65
field public static final int HITACHI = 41; // 0x29
+ field public static final int HOSIDEN = 221; // 0xdd
field public static final int IBM = 3; // 0x3
field public static final int INFINEON_TECHNOLOGIES = 9; // 0x9
+ field public static final int INGENIEUR_SYSTEMGRUPPE_ZAHN = 171; // 0xab
field public static final int INTEGRATED_SILICON_SOLUTION = 65; // 0x41
field public static final int INTEGRATED_SYSTEM_SOLUTION = 57; // 0x39
field public static final int INTEL = 2; // 0x2
field public static final int INVENTEL = 30; // 0x1e
field public static final int IPEXTREME = 61; // 0x3d
+ field public static final int I_TECH_DYNAMIC_GLOBAL_DISTRIBUTION = 153; // 0x99
+ field public static final int JAWBONE = 138; // 0x8a
+ field public static final int JIANGSU_TOPPOWER_AUTOMOTIVE_ELECTRONICS = 155; // 0x9b
+ field public static final int JOHNSON_CONTROLS = 185; // 0xb9
field public static final int J_AND_M = 82; // 0x52
+ field public static final int KAWANTECH = 212; // 0xd4
field public static final int KC_TECHNOLOGY = 22; // 0x16
+ field public static final int KENSINGTON_COMPUTER_PRODUCTS_GROUP = 160; // 0xa0
+ field public static final int LAIRD_TECHNOLOGIES = 119; // 0x77
+ field public static final int LESSWIRE = 121; // 0x79
+ field public static final int LG_ELECTRONICS = 196; // 0xc4
+ field public static final int LINAK = 164; // 0xa4
field public static final int LUCENT = 7; // 0x7
+ field public static final int LUDUS_HELSINKI = 132; // 0x84
field public static final int MACRONIX = 44; // 0x2c
+ field public static final int MAGNETI_MARELLI = 169; // 0xa9
field public static final int MANSELLA = 33; // 0x21
field public static final int MARVELL = 72; // 0x48
field public static final int MATSUSHITA_ELECTRIC = 58; // 0x3a
+ field public static final int MC10 = 202; // 0xca
field public static final int MEDIATEK = 70; // 0x46
+ field public static final int MESO_INTERNATIONAL = 182; // 0xb6
+ field public static final int META_WATCH = 163; // 0xa3
field public static final int MEWTEL_TECHNOLOGY = 47; // 0x2f
+ field public static final int MICOMMAND = 99; // 0x63
+ field public static final int MICROCHIP_TECHNOLOGY = 205; // 0xcd
field public static final int MICROSOFT = 6; // 0x6
+ field public static final int MINDTREE = 106; // 0x6a
+ field public static final int MISFIT_WEARABLES = 223; // 0xdf
field public static final int MITEL_SEMICONDUCTOR = 16; // 0x10
field public static final int MITSUBISHI_ELECTRIC = 20; // 0x14
field public static final int MOBILIAN_CORPORATION = 55; // 0x37
+ field public static final int MONSTER = 112; // 0x70
field public static final int MOTOROLA = 8; // 0x8
+ field public static final int MSTAR_SEMICONDUCTOR = 122; // 0x7a
+ field public static final int MUZIK = 222; // 0xde
field public static final int NEC = 34; // 0x22
+ field public static final int NEC_LIGHTING = 149; // 0x95
field public static final int NEWLOGIC = 23; // 0x17
+ field public static final int NIKE = 120; // 0x78
+ field public static final int NINE_SOLUTIONS = 102; // 0x66
field public static final int NOKIA_MOBILE_PHONES = 1; // 0x1
field public static final int NORDIC_SEMICONDUCTOR = 89; // 0x59
field public static final int NORWOOD_SYSTEMS = 46; // 0x2e
+ field public static final int ODM_TECHNOLOGY = 150; // 0x96
+ field public static final int OMEGAWAVE = 174; // 0xae
+ field public static final int ONSET_COMPUTER = 197; // 0xc5
field public static final int OPEN_INTERFACE = 39; // 0x27
+ field public static final int OTL_DYNAMICS = 165; // 0xa5
+ field public static final int PANDA_OCEAN = 166; // 0xa6
field public static final int PARROT = 67; // 0x43
field public static final int PARTHUS_TECHNOLOGIES = 14; // 0xe
+ field public static final int PASSIF_SEMICONDUCTOR = 176; // 0xb0
+ field public static final int PETER_SYSTEMTECHNIK = 173; // 0xad
field public static final int PHILIPS_SEMICONDUCTORS = 37; // 0x25
field public static final int PLANTRONICS = 85; // 0x55
+ field public static final int POLAR_ELECTRO = 107; // 0x6b
+ field public static final int POLAR_ELECTRO_EUROPE = 209; // 0xd1
+ field public static final int PROCTER_AND_GAMBLE = 220; // 0xdc
field public static final int QUALCOMM = 29; // 0x1d
+ field public static final int QUALCOMM_CONNECTED_EXPERIENCES = 216; // 0xd8
+ field public static final int QUALCOMM_INNOVATION_CENTER = 184; // 0xb8
+ field public static final int QUALCOMM_LABS = 140; // 0x8c
+ field public static final int QUALCOMM_TECHNOLOGIES = 215; // 0xd7
+ field public static final int QUINTIC = 142; // 0x8e
+ field public static final int QUUPPA = 199; // 0xc7
field public static final int RALINK_TECHNOLOGY = 91; // 0x5b
+ field public static final int RDA_MICROELECTRONICS = 97; // 0x61
field public static final int REALTEK_SEMICONDUCTOR = 93; // 0x5d
field public static final int RED_M = 50; // 0x32
field public static final int RENESAS_TECHNOLOGY = 54; // 0x36
@@ -4854,33 +4951,66 @@ package android.bluetooth {
field public static final int RIVIERAWAVES = 96; // 0x60
field public static final int ROHDE_AND_SCHWARZ = 25; // 0x19
field public static final int RTX_TELECOM = 21; // 0x15
+ field public static final int SAMSUNG_ELECTRONICS = 117; // 0x75
+ field public static final int SARIS_CYCLING_GROUP = 177; // 0xb1
+ field public static final int SEERS_TECHNOLOGY = 125; // 0x7d
field public static final int SEIKO_EPSON = 64; // 0x40
+ field public static final int SELFLY = 198; // 0xc6
+ field public static final int SEMILINK = 226; // 0xe2
+ field public static final int SENNHEISER_COMMUNICATIONS = 130; // 0x82
+ field public static final int SHANGHAI_SUPER_SMART_ELECTRONICS = 114; // 0x72
+ field public static final int SHENZHEN_EXCELSECU_DATA_TECHNOLOGY = 193; // 0xc1
field public static final int SIGNIA_TECHNOLOGIES = 27; // 0x1b
field public static final int SILICON_WAVE = 11; // 0xb
field public static final int SIRF_TECHNOLOGY = 80; // 0x50
field public static final int SOCKET_MOBILE = 68; // 0x44
field public static final int SONY_ERICSSON = 86; // 0x56
+ field public static final int SOUND_ID = 111; // 0x6f
+ field public static final int SPORTS_TRACKING_TECHNOLOGIES = 126; // 0x7e
+ field public static final int SR_MEDIZINELEKTRONIK = 161; // 0xa1
field public static final int STACCATO_COMMUNICATIONS = 77; // 0x4d
+ field public static final int STALMART_TECHNOLOGY = 191; // 0xbf
+ field public static final int STARKEY_LABORATORIES = 186; // 0xba
+ field public static final int STOLLMAN_E_PLUS_V = 143; // 0x8f
field public static final int STONESTREET_ONE = 94; // 0x5e
field public static final int ST_MICROELECTRONICS = 48; // 0x30
+ field public static final int SUMMIT_DATA_COMMUNICATIONS = 110; // 0x6e
+ field public static final int SUUNTO = 159; // 0x9f
+ field public static final int SWIRL_NETWORKS = 181; // 0xb5
field public static final int SYMBOL_TECHNOLOGIES = 42; // 0x2a
field public static final int SYNOPSYS = 49; // 0x31
field public static final int SYSTEMS_AND_CHIPS = 62; // 0x3e
+ field public static final int S_POWER_ELECTRONICS = 187; // 0xbb
+ field public static final int TAIXINGBANG_TECHNOLOGY = 211; // 0xd3
field public static final int TENOVIS = 43; // 0x2b
field public static final int TERAX = 56; // 0x38
field public static final int TEXAS_INSTRUMENTS = 13; // 0xd
+ field public static final int THINKOPTICS = 146; // 0x92
field public static final int THREECOM = 5; // 0x5
field public static final int THREE_DIJOY = 84; // 0x54
field public static final int THREE_DSP = 73; // 0x49
+ field public static final int TIMEKEEPING_SYSTEMS = 131; // 0x83
+ field public static final int TIMEX_GROUP_USA = 214; // 0xd6
+ field public static final int TOPCORN_POSITIONING_SYSTEMS = 139; // 0x8b
field public static final int TOSHIBA = 4; // 0x4
field public static final int TRANSILICA = 24; // 0x18
+ field public static final int TRELAB = 183; // 0xb7
field public static final int TTPCOM = 26; // 0x1a
+ field public static final int TXTR = 218; // 0xda
field public static final int TZERO_TECHNOLOGIES = 81; // 0x51
+ field public static final int UNIVERSAL_ELECTRONICS = 147; // 0x93
+ field public static final int VERTU = 162; // 0xa2
+ field public static final int VISTEON = 167; // 0xa7
field public static final int VIZIO = 88; // 0x58
+ field public static final int VOYETRA_TURTLE_BEACH = 217; // 0xd9
field public static final int WAVEPLUS_TECHNOLOGY = 35; // 0x23
field public static final int WICENTRIC = 95; // 0x5f
field public static final int WIDCOMM = 17; // 0x11
+ field public static final int WUXI_VIMICRO = 129; // 0x81
field public static final int ZEEVO = 18; // 0x12
+ field public static final int ZER01_TV = 152; // 0x98
+ field public static final int ZOMM = 116; // 0x74
+ field public static final int ZSCAN_SOFTWARE = 141; // 0x8d
}
public final class BluetoothClass implements android.os.Parcelable {
@@ -5176,6 +5306,7 @@ package android.bluetooth {
method public int getConnectionState(android.bluetooth.BluetoothDevice);
method public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(int[]);
method public boolean isAudioConnected(android.bluetooth.BluetoothDevice);
+ method public boolean sendVendorSpecificResultCode(android.bluetooth.BluetoothDevice, java.lang.String, java.lang.String);
method public boolean startVoiceRecognition(android.bluetooth.BluetoothDevice);
method public boolean stopVoiceRecognition(android.bluetooth.BluetoothDevice);
field public static final java.lang.String ACTION_AUDIO_STATE_CHANGED = "android.bluetooth.headset.profile.action.AUDIO_STATE_CHANGED";
@@ -5192,6 +5323,7 @@ package android.bluetooth {
field public static final int STATE_AUDIO_CONNECTED = 12; // 0xc
field public static final int STATE_AUDIO_CONNECTING = 11; // 0xb
field public static final int STATE_AUDIO_DISCONNECTED = 10; // 0xa
+ field public static final java.lang.String VENDOR_RESULT_CODE_COMMAND_ANDROID = "+ANDROID";
field public static final java.lang.String VENDOR_SPECIFIC_HEADSET_EVENT_COMPANY_ID_CATEGORY = "android.bluetooth.headset.intent.category.companyid";
}
diff --git a/core/java/android/bluetooth/BluetoothAssignedNumbers.java b/core/java/android/bluetooth/BluetoothAssignedNumbers.java
index 580e9ff..124bdc1 100644
--- a/core/java/android/bluetooth/BluetoothAssignedNumbers.java
+++ b/core/java/android/bluetooth/BluetoothAssignedNumbers.java
@@ -513,6 +513,656 @@ public class BluetoothAssignedNumbers {
public static final int RIVIERAWAVES = 0x0060;
/*
+ * RDA Microelectronics.
+ */
+ public static final int RDA_MICROELECTRONICS = 0x0061;
+
+ /*
+ * Gibson Guitars.
+ */
+ public static final int GIBSON_GUITARS = 0x0062;
+
+ /*
+ * MiCommand Inc.
+ */
+ public static final int MICOMMAND = 0x0063;
+
+ /*
+ * Band XI International, LLC.
+ */
+ public static final int BAND_XI_INTERNATIONAL = 0x0064;
+
+ /*
+ * Hewlett-Packard Company.
+ */
+ public static final int HEWLETT_PACKARD = 0x0065;
+
+ /*
+ * 9Solutions Oy.
+ */
+ public static final int NINE_SOLUTIONS = 0x0066;
+
+ /*
+ * GN Netcom A/S.
+ */
+ public static final int GN_NETCOM = 0x0067;
+
+ /*
+ * General Motors.
+ */
+ public static final int GENERAL_MOTORS = 0x0068;
+
+ /*
+ * A&D Engineering, Inc.
+ */
+ public static final int A_AND_D_ENGINEERING = 0x0069;
+
+ /*
+ * MindTree Ltd.
+ */
+ public static final int MINDTREE = 0x006A;
+
+ /*
+ * Polar Electro OY.
+ */
+ public static final int POLAR_ELECTRO = 0x006B;
+
+ /*
+ * Beautiful Enterprise Co., Ltd.
+ */
+ public static final int BEAUTIFUL_ENTERPRISE = 0x006C;
+
+ /*
+ * BriarTek, Inc.
+ */
+ public static final int BRIARTEK = 0x006D;
+
+ /*
+ * Summit Data Communications, Inc.
+ */
+ public static final int SUMMIT_DATA_COMMUNICATIONS = 0x006E;
+
+ /*
+ * Sound ID.
+ */
+ public static final int SOUND_ID = 0x006F;
+
+ /*
+ * Monster, LLC.
+ */
+ public static final int MONSTER = 0x0070;
+
+ /*
+ * connectBlue AB.
+ */
+ public static final int CONNECTBLUE = 0x0071;
+
+ /*
+ * ShangHai Super Smart Electronics Co. Ltd.
+ */
+ public static final int SHANGHAI_SUPER_SMART_ELECTRONICS = 0x0072;
+
+ /*
+ * Group Sense Ltd.
+ */
+ public static final int GROUP_SENSE = 0x0073;
+
+ /*
+ * Zomm, LLC.
+ */
+ public static final int ZOMM = 0x0074;
+
+ /*
+ * Samsung Electronics Co. Ltd.
+ */
+ public static final int SAMSUNG_ELECTRONICS = 0x0075;
+
+ /*
+ * Creative Technology Ltd.
+ */
+ public static final int CREATIVE_TECHNOLOGY = 0x0076;
+
+ /*
+ * Laird Technologies.
+ */
+ public static final int LAIRD_TECHNOLOGIES = 0x0077;
+
+ /*
+ * Nike, Inc.
+ */
+ public static final int NIKE = 0x0078;
+
+ /*
+ * lesswire AG.
+ */
+ public static final int LESSWIRE = 0x0079;
+
+ /*
+ * MStar Semiconductor, Inc.
+ */
+ public static final int MSTAR_SEMICONDUCTOR = 0x007A;
+
+ /*
+ * Hanlynn Technologies.
+ */
+ public static final int HANLYNN_TECHNOLOGIES = 0x007B;
+
+ /*
+ * A & R Cambridge.
+ */
+ public static final int A_AND_R_CAMBRIDGE = 0x007C;
+
+ /*
+ * Seers Technology Co. Ltd.
+ */
+ public static final int SEERS_TECHNOLOGY = 0x007D;
+
+ /*
+ * Sports Tracking Technologies Ltd.
+ */
+ public static final int SPORTS_TRACKING_TECHNOLOGIES = 0x007E;
+
+ /*
+ * Autonet Mobile.
+ */
+ public static final int AUTONET_MOBILE = 0x007F;
+
+ /*
+ * DeLorme Publishing Company, Inc.
+ */
+ public static final int DELORME_PUBLISHING_COMPANY = 0x0080;
+
+ /*
+ * WuXi Vimicro.
+ */
+ public static final int WUXI_VIMICRO = 0x0081;
+
+ /*
+ * Sennheiser Communications A/S.
+ */
+ public static final int SENNHEISER_COMMUNICATIONS = 0x0082;
+
+ /*
+ * TimeKeeping Systems, Inc.
+ */
+ public static final int TIMEKEEPING_SYSTEMS = 0x0083;
+
+ /*
+ * Ludus Helsinki Ltd.
+ */
+ public static final int LUDUS_HELSINKI = 0x0084;
+
+ /*
+ * BlueRadios, Inc.
+ */
+ public static final int BLUERADIOS = 0x0085;
+
+ /*
+ * equinox AG.
+ */
+ public static final int EQUINOX_AG = 0x0086;
+
+ /*
+ * Garmin International, Inc.
+ */
+ public static final int GARMIN_INTERNATIONAL = 0x0087;
+
+ /*
+ * Ecotest.
+ */
+ public static final int ECOTEST = 0x0088;
+
+ /*
+ * GN ReSound A/S.
+ */
+ public static final int GN_RESOUND = 0x0089;
+
+ /*
+ * Jawbone.
+ */
+ public static final int JAWBONE = 0x008A;
+
+ /*
+ * Topcorn Positioning Systems, LLC.
+ */
+ public static final int TOPCORN_POSITIONING_SYSTEMS = 0x008B;
+
+ /*
+ * Qualcomm Labs, Inc.
+ */
+ public static final int QUALCOMM_LABS = 0x008C;
+
+ /*
+ * Zscan Software.
+ */
+ public static final int ZSCAN_SOFTWARE = 0x008D;
+
+ /*
+ * Quintic Corp.
+ */
+ public static final int QUINTIC = 0x008E;
+
+ /*
+ * Stollman E+V GmbH.
+ */
+ public static final int STOLLMAN_E_PLUS_V = 0x008F;
+
+ /*
+ * Funai Electric Co., Ltd.
+ */
+ public static final int FUNAI_ELECTRIC = 0x0090;
+
+ /*
+ * Advanced PANMOBIL Systems GmbH & Co. KG.
+ */
+ public static final int ADVANCED_PANMOBIL_SYSTEMS = 0x0091;
+
+ /*
+ * ThinkOptics, Inc.
+ */
+ public static final int THINKOPTICS = 0x0092;
+
+ /*
+ * Universal Electronics, Inc.
+ */
+ public static final int UNIVERSAL_ELECTRONICS = 0x0093;
+
+ /*
+ * Airoha Technology Corp.
+ */
+ public static final int AIROHA_TECHNOLOGY = 0x0094;
+
+ /*
+ * NEC Lighting, Ltd.
+ */
+ public static final int NEC_LIGHTING = 0x0095;
+
+ /*
+ * ODM Technology, Inc.
+ */
+ public static final int ODM_TECHNOLOGY = 0x0096;
+
+ /*
+ * Bluetrek Technologies Limited.
+ */
+ public static final int BLUETREK_TECHNOLOGIES = 0x0097;
+
+ /*
+ * zer01.tv GmbH.
+ */
+ public static final int ZER01_TV = 0x0098;
+
+ /*
+ * i.Tech Dynamic Global Distribution Ltd.
+ */
+ public static final int I_TECH_DYNAMIC_GLOBAL_DISTRIBUTION = 0x0099;
+
+ /*
+ * Alpwise.
+ */
+ public static final int ALPWISE = 0x009A;
+
+ /*
+ * Jiangsu Toppower Automotive Electronics Co., Ltd.
+ */
+ public static final int JIANGSU_TOPPOWER_AUTOMOTIVE_ELECTRONICS = 0x009B;
+
+ /*
+ * Colorfy, Inc.
+ */
+ public static final int COLORFY = 0x009C;
+
+ /*
+ * Geoforce Inc.
+ */
+ public static final int GEOFORCE = 0x009D;
+
+ /*
+ * Bose Corporation.
+ */
+ public static final int BOSE = 0x009E;
+
+ /*
+ * Suunto Oy.
+ */
+ public static final int SUUNTO = 0x009F;
+
+ /*
+ * Kensington Computer Products Group.
+ */
+ public static final int KENSINGTON_COMPUTER_PRODUCTS_GROUP = 0x00A0;
+
+ /*
+ * SR-Medizinelektronik.
+ */
+ public static final int SR_MEDIZINELEKTRONIK = 0x00A1;
+
+ /*
+ * Vertu Corporation Limited.
+ */
+ public static final int VERTU = 0x00A2;
+
+ /*
+ * Meta Watch Ltd.
+ */
+ public static final int META_WATCH = 0x00A3;
+
+ /*
+ * LINAK A/S.
+ */
+ public static final int LINAK = 0x00A4;
+
+ /*
+ * OTL Dynamics LLC.
+ */
+ public static final int OTL_DYNAMICS = 0x00A5;
+
+ /*
+ * Panda Ocean Inc.
+ */
+ public static final int PANDA_OCEAN = 0x00A6;
+
+ /*
+ * Visteon Corporation.
+ */
+ public static final int VISTEON = 0x00A7;
+
+ /*
+ * ARP Devices Limited.
+ */
+ public static final int ARP_DEVICES = 0x00A8;
+
+ /*
+ * Magneti Marelli S.p.A.
+ */
+ public static final int MAGNETI_MARELLI = 0x00A9;
+
+ /*
+ * CAEN RFID srl.
+ */
+ public static final int CAEN_RFID = 0x00AA;
+
+ /*
+ * Ingenieur-Systemgruppe Zahn GmbH.
+ */
+ public static final int INGENIEUR_SYSTEMGRUPPE_ZAHN = 0x00AB;
+
+ /*
+ * Green Throttle Games.
+ */
+ public static final int GREEN_THROTTLE_GAMES = 0x00AC;
+
+ /*
+ * Peter Systemtechnik GmbH.
+ */
+ public static final int PETER_SYSTEMTECHNIK = 0x00AD;
+
+ /*
+ * Omegawave Oy.
+ */
+ public static final int OMEGAWAVE = 0x00AE;
+
+ /*
+ * Cinetix.
+ */
+ public static final int CINETIX = 0x00AF;
+
+ /*
+ * Passif Semiconductor Corp.
+ */
+ public static final int PASSIF_SEMICONDUCTOR = 0x00B0;
+
+ /*
+ * Saris Cycling Group, Inc.
+ */
+ public static final int SARIS_CYCLING_GROUP = 0x00B1;
+
+ /*
+ * Bekey A/S.
+ */
+ public static final int BEKEY = 0x00B2;
+
+ /*
+ * Clarinox Technologies Pty. Ltd.
+ */
+ public static final int CLARINOX_TECHNOLOGIES = 0x00B3;
+
+ /*
+ * BDE Technology Co., Ltd.
+ */
+ public static final int BDE_TECHNOLOGY = 0x00B4;
+
+ /*
+ * Swirl Networks.
+ */
+ public static final int SWIRL_NETWORKS = 0x00B5;
+
+ /*
+ * Meso international.
+ */
+ public static final int MESO_INTERNATIONAL = 0x00B6;
+
+ /*
+ * TreLab Ltd.
+ */
+ public static final int TRELAB = 0x00B7;
+
+ /*
+ * Qualcomm Innovation Center, Inc. (QuIC).
+ */
+ public static final int QUALCOMM_INNOVATION_CENTER = 0x00B8;
+
+ /*
+ * Johnson Controls, Inc.
+ */
+ public static final int JOHNSON_CONTROLS = 0x00B9;
+
+ /*
+ * Starkey Laboratories Inc.
+ */
+ public static final int STARKEY_LABORATORIES = 0x00BA;
+
+ /*
+ * S-Power Electronics Limited.
+ */
+ public static final int S_POWER_ELECTRONICS = 0x00BB;
+
+ /*
+ * Ace Sensor Inc.
+ */
+ public static final int ACE_SENSOR = 0x00BC;
+
+ /*
+ * Aplix Corporation.
+ */
+ public static final int APLIX = 0x00BD;
+
+ /*
+ * AAMP of America.
+ */
+ public static final int AAMP_OF_AMERICA = 0x00BE;
+
+ /*
+ * Stalmart Technology Limited.
+ */
+ public static final int STALMART_TECHNOLOGY = 0x00BF;
+
+ /*
+ * AMICCOM Electronics Corporation.
+ */
+ public static final int AMICCOM_ELECTRONICS = 0x00C0;
+
+ /*
+ * Shenzhen Excelsecu Data Technology Co.,Ltd.
+ */
+ public static final int SHENZHEN_EXCELSECU_DATA_TECHNOLOGY = 0x00C1;
+
+ /*
+ * Geneq Inc.
+ */
+ public static final int GENEQ = 0x00C2;
+
+ /*
+ * adidas AG.
+ */
+ public static final int ADIDAS = 0x00C3;
+
+ /*
+ * LG Electronics.
+ */
+ public static final int LG_ELECTRONICS = 0x00C4;
+
+ /*
+ * Onset Computer Corporation.
+ */
+ public static final int ONSET_COMPUTER = 0x00C5;
+
+ /*
+ * Selfly BV.
+ */
+ public static final int SELFLY = 0x00C6;
+
+ /*
+ * Quuppa Oy.
+ */
+ public static final int QUUPPA = 0x00C7;
+
+ /*
+ * GeLo Inc.
+ */
+ public static final int GELO = 0x00C8;
+
+ /*
+ * Evluma.
+ */
+ public static final int EVLUMA = 0x00C9;
+
+ /*
+ * MC10.
+ */
+ public static final int MC10 = 0x00CA;
+
+ /*
+ * Binauric SE.
+ */
+ public static final int BINAURIC = 0x00CB;
+
+ /*
+ * Beats Electronics.
+ */
+ public static final int BEATS_ELECTRONICS = 0x00CC;
+
+ /*
+ * Microchip Technology Inc.
+ */
+ public static final int MICROCHIP_TECHNOLOGY = 0x00CD;
+
+ /*
+ * Elgato Systems GmbH.
+ */
+ public static final int ELGATO_SYSTEMS = 0x00CE;
+
+ /*
+ * ARCHOS SA.
+ */
+ public static final int ARCHOS = 0x00CF;
+
+ /*
+ * Dexcom, Inc.
+ */
+ public static final int DEXCOM = 0x00D0;
+
+ /*
+ * Polar Electro Europe B.V.
+ */
+ public static final int POLAR_ELECTRO_EUROPE = 0x00D1;
+
+ /*
+ * Dialog Semiconductor B.V.
+ */
+ public static final int DIALOG_SEMICONDUCTOR = 0x00D2;
+
+ /*
+ * Taixingbang Technology (HK) Co,. LTD.
+ */
+ public static final int TAIXINGBANG_TECHNOLOGY = 0x00D3;
+
+ /*
+ * Kawantech.
+ */
+ public static final int KAWANTECH = 0x00D4;
+
+ /*
+ * Austco Communication Systems.
+ */
+ public static final int AUSTCO_COMMUNICATION_SYSTEMS = 0x00D5;
+
+ /*
+ * Timex Group USA, Inc.
+ */
+ public static final int TIMEX_GROUP_USA = 0x00D6;
+
+ /*
+ * Qualcomm Technologies, Inc.
+ */
+ public static final int QUALCOMM_TECHNOLOGIES = 0x00D7;
+
+ /*
+ * Qualcomm Connected Experiences, Inc.
+ */
+ public static final int QUALCOMM_CONNECTED_EXPERIENCES = 0x00D8;
+
+ /*
+ * Voyetra Turtle Beach.
+ */
+ public static final int VOYETRA_TURTLE_BEACH = 0x00D9;
+
+ /*
+ * txtr GmbH.
+ */
+ public static final int TXTR = 0x00DA;
+
+ /*
+ * Biosentronics.
+ */
+ public static final int BIOSENTRONICS = 0x00DB;
+
+ /*
+ * Procter & Gamble.
+ */
+ public static final int PROCTER_AND_GAMBLE = 0x00DC;
+
+ /*
+ * Hosiden Corporation.
+ */
+ public static final int HOSIDEN = 0x00DD;
+
+ /*
+ * Muzik LLC.
+ */
+ public static final int MUZIK = 0x00DE;
+
+ /*
+ * Misfit Wearables Corp.
+ */
+ public static final int MISFIT_WEARABLES = 0x00DF;
+
+ /*
+ * Google.
+ */
+ public static final int GOOGLE = 0x00E0;
+
+ /*
+ * Danlers Ltd.
+ */
+ public static final int DANLERS = 0x00E1;
+
+ /*
+ * Semilink Inc.
+ */
+ public static final int SEMILINK = 0x00E2;
+
+ /*
* You can't instantiate one of these.
*/
private BluetoothAssignedNumbers() {
diff --git a/core/java/android/bluetooth/BluetoothHeadset.java b/core/java/android/bluetooth/BluetoothHeadset.java
index 5a5764d..49a1fb3 100644
--- a/core/java/android/bluetooth/BluetoothHeadset.java
+++ b/core/java/android/bluetooth/BluetoothHeadset.java
@@ -193,6 +193,11 @@ public final class BluetoothHeadset implements BluetoothProfile {
"android.bluetooth.headset.intent.category.companyid";
/**
+ * A vendor-specific command for unsolicited result code.
+ */
+ public static final String VENDOR_RESULT_CODE_COMMAND_ANDROID = "+ANDROID";
+
+ /**
* Headset state when SCO audio is not connected.
* This state can be one of
* {@link #EXTRA_STATE} or {@link #EXTRA_PREVIOUS_STATE} of
@@ -840,6 +845,46 @@ public final class BluetoothHeadset implements BluetoothProfile {
}
}
+ /**
+ * Sends a vendor-specific unsolicited result code to the headset.
+ *
+ * <p>The actual string to be sent is <code>command + ": " + arg</code>.
+ * For example, if {@code command} is {@link VENDOR_RESULT_CODE_COMMAND_ANDROID} and {@code arg}
+ * is {@code "0"}, the string <code>"+ANDROID: 0"</code> will be sent.
+ *
+ * <p>Currently only {@link VENDOR_RESULT_CODE_COMMAND_ANDROID} is allowed as {@code command}.
+ *
+ * <p>Requires {@link android.Manifest.permission#BLUETOOTH} permission.
+ *
+ * @param device Bluetooth headset.
+ * @param command A vendor-specific command.
+ * @param arg The argument that will be attached to the command.
+ * @return {@code false} if there is no headset connected, or if the command is not an allowed
+ * vendor-specific unsolicited result code, or on error. {@code true} otherwise.
+ * @throws IllegalArgumentException if {@code command} is {@code null}.
+ */
+ public boolean sendVendorSpecificResultCode(BluetoothDevice device, String command,
+ String arg) {
+ if (DBG) {
+ log("sendVendorSpecificResultCode()");
+ }
+ if (command == null) {
+ throw new IllegalArgumentException("command is null");
+ }
+ if (mService != null && isEnabled() &&
+ isValidDevice(device)) {
+ try {
+ return mService.sendVendorSpecificResultCode(device, command, arg);
+ } catch (RemoteException e) {
+ Log.e(TAG, Log.getStackTraceString(new Throwable()));
+ }
+ }
+ if (mService == null) {
+ Log.w(TAG, "Proxy not attached to service");
+ }
+ return false;
+ }
+
private ServiceConnection mConnection = new ServiceConnection() {
public void onServiceConnected(ComponentName className, IBinder service) {
if (DBG) Log.d(TAG, "Proxy object connected");
diff --git a/core/java/android/bluetooth/IBluetoothHeadset.aidl b/core/java/android/bluetooth/IBluetoothHeadset.aidl
index 285eea7..524ca6f 100755
--- a/core/java/android/bluetooth/IBluetoothHeadset.aidl
+++ b/core/java/android/bluetooth/IBluetoothHeadset.aidl
@@ -35,6 +35,9 @@ interface IBluetoothHeadset {
boolean startVoiceRecognition(in BluetoothDevice device);
boolean stopVoiceRecognition(in BluetoothDevice device);
boolean isAudioConnected(in BluetoothDevice device);
+ boolean sendVendorSpecificResultCode(in BluetoothDevice device,
+ in String command,
+ in String arg);
// APIs that can be made public in future
int getBatteryUsageHint(in BluetoothDevice device);