OSDN Git Service

android-x86/system-bt.git
10 years agoMerge "need to save the BLE HID UUID to NVRAM" into klp-dev
Zhihai Xu [Wed, 6 Nov 2013 06:54:58 +0000 (06:54 +0000)]
Merge "need to save the BLE HID UUID to NVRAM" into klp-dev

10 years agoneed to save the BLE HID UUID to NVRAM
Zhihai Xu [Wed, 6 Nov 2013 02:06:54 +0000 (18:06 -0800)]
need to save the BLE HID UUID to NVRAM

need to save the BLE HID UUID to NVRAM.
otherwise we will miss the HID profile setting
in device profile list of the BLE HID device after reboot.

bug:11541617
Change-Id: I11e1c871768e999ec1f48396018c3be379cc1b7d

10 years agoMerge "Add toyota venza to the auto pair blacklist" into klp-dev
Matthew Xie [Wed, 6 Nov 2013 01:25:24 +0000 (01:25 +0000)]
Merge "Add toyota venza to the auto pair blacklist" into klp-dev

10 years agoMerge "Bluetooth: Send Error for Invalid AT Command." into klp-dev
Matthew Xie [Mon, 4 Nov 2013 22:11:14 +0000 (22:11 +0000)]
Merge "Bluetooth: Send Error for Invalid AT Command." into klp-dev

10 years agoMerge "A typo to set wrong max connection interval value when we create a BLE connect...
Zhihai Xu [Sun, 3 Nov 2013 03:42:28 +0000 (03:42 +0000)]
Merge "A typo to set wrong max connection interval value when we create a BLE connection." into klp-dev

10 years agoBluetooth: Send Error for Invalid AT Command.
Sunny Kapdi [Mon, 29 Jul 2013 05:29:37 +0000 (10:59 +0530)]
Bluetooth: Send Error for Invalid AT Command.

Some Headsets send HFP 1.6 cmds even when it is not
supported by DUT.Send error response in those cases.

bug 11450717

Change-Id: If7745959c00fd49bd737b41a49adba9e726aa5c7

10 years agoMerge "Unable to connect to a Motorola s705 until Bluetooth was toggled of and back...
Zhihai Xu [Sat, 2 Nov 2013 00:09:49 +0000 (00:09 +0000)]
Merge "Unable to connect to a Motorola s705 until Bluetooth was toggled of and back on" into klp-dev

10 years agoA typo to set wrong max connection interval value when we create a BLE connection.
Zhihai Xu [Fri, 25 Oct 2013 23:47:49 +0000 (16:47 -0700)]
A typo to set wrong max connection interval value when we create a BLE connection.

when we set the max connection interval value,
we should use BTM_BLE_CONN_INT_MAX_DEF instead of BTM_BLE_CONN_INT_MIN
bug:11390678

Change-Id: Ia3f6d5e9cb91b2e998d014ed4849eff8455af770

10 years agoFixes BLE HCI commands concurrency issue
Sunny Kapdi [Wed, 14 Aug 2013 02:43:49 +0000 (19:43 -0700)]
Fixes BLE HCI commands concurrency issue

Removes HCI LE Read Remote features command call
to prevent the concurrency between this command and
HCI LE start encryption command.

CRs-fixed: 517330

bug:11450568
Change-Id: I6445ab8095a4261c2a3f84acea1c546e6924f50d
Signed-off-by: Sunny Kapdi <sunnyk@codeaurora.org>
10 years agoMerge "Treat devices advertising random addr. as LE only" into klp-dev
Matthew Xie [Tue, 29 Oct 2013 22:51:35 +0000 (22:51 +0000)]
Merge "Treat devices advertising random addr. as LE only" into klp-dev

10 years agoTreat devices advertising random addr. as LE only
Andre Eisenbach [Fri, 25 Oct 2013 23:17:45 +0000 (16:17 -0700)]
Treat devices advertising random addr. as LE only

Some remote devices use random addresses, but are not setting the
"BR/EDR not supported" flag. Thus we try to connect to the device using
BR/EDR.

This patch ignores the ADV flags if the device is using a random
address and always makes the connection over the LE transport.

bug 11418071
Change-Id: I628775b819abd8f17745aaf98db4bb3c59166955

10 years agoMerge "Blacklist Devices that donot handle absolute volume well" into klp-dev
Matthew Xie [Thu, 24 Oct 2013 23:05:57 +0000 (23:05 +0000)]
Merge "Blacklist Devices that donot handle absolute volume well" into klp-dev

10 years agoBlacklist Devices that donot handle absolute volume well
Matthew Xie [Thu, 24 Oct 2013 08:09:52 +0000 (01:09 -0700)]
Blacklist Devices that donot handle absolute volume well

Use vendor prefix address, include hbs730 headset, passat carkit
bug 11124170

Change-Id: I80f634366ce332c55581d7b1e36641e5ce3ad346

10 years agoMerge "Do not deregister HH GATT IF in bta_gattc_disable for hid over GATT" into...
Zhihai Xu [Thu, 24 Oct 2013 01:25:32 +0000 (01:25 +0000)]
Merge "Do not deregister HH GATT IF in bta_gattc_disable for hid over GATT" into klp-dev

10 years agoMerge "LE: Only prepend valid HID report IDs" into klp-dev
Zhihai Xu [Wed, 23 Oct 2013 23:33:31 +0000 (23:33 +0000)]
Merge "LE: Only prepend valid HID report IDs" into klp-dev

10 years agoDo not deregister HH GATT IF in bta_gattc_disable for hid over GATT
Zhihai Xu [Tue, 22 Oct 2013 22:26:33 +0000 (15:26 -0700)]
Do not deregister HH GATT IF in bta_gattc_disable for hid over GATT

The root cause is bta_gattc_disable de-register the HH GATT IF
which cause  bta_hh_cleanup_disable called
before we receive BTA_HH_INT_CLOSE_EVT.
The fix is "don't deregister HH GATT IF  in bta_gattc_disable and
let HH module to de-register the HH GATT IF by bta_hh_le_deregister".
because HH GATT IF is a special GATT IF
which won't be exposed to uplayer and
HH GATT IF belong to BTA HH module, it should be managed by BTA HH.
bug:11284861

Change-Id: Ia14cd2be3f3548a4d1e2dcfbc89fa3a75d9651db

10 years agoLE: Only prepend valid HID report IDs
Andre Eisenbach [Tue, 22 Oct 2013 14:49:45 +0000 (07:49 -0700)]
LE: Only prepend valid HID report IDs

If a remote HOGP device does not supply a valid report ID, do not
prepend it to the HID report.

This fixes interop issues with various LE mice, where the cursor would
not move on screen as expected.
BLTH02618447

Bug:11342157
Change-Id: I7832bb091654a5625f37b1531bd80fad9bbe6a51

10 years agoMerge "Handle CL opening state in bta_jv_free_rfc_cb" into klp-dev
Matthew Xie [Sun, 20 Oct 2013 18:32:32 +0000 (18:32 +0000)]
Merge "Handle CL opening state in bta_jv_free_rfc_cb" into klp-dev

10 years agoHandle CL opening state in bta_jv_free_rfc_cb
Matthew Xie [Sun, 20 Oct 2013 08:04:06 +0000 (01:04 -0700)]
Handle CL opening state in bta_jv_free_rfc_cb

When the local device is openning an rfc channel and is being closed
before it's opened, we should close the channel instead of ignoring.
bug 11299049

Change-Id: I702500d489c8b3d3764e36340106433232a127c0

10 years agoBTU SIGSEGV on RFCOMM connect to Linux bluetooth dongle
Zhihai Xu [Thu, 17 Oct 2013 03:00:38 +0000 (20:00 -0700)]
BTU SIGSEGV on RFCOMM connect to Linux bluetooth dongle

fix a typo which cause the crash.

bug:11260131
Change-Id: I1cbe9f4d20be39f3ca13577687ac92b88b06e366

10 years agoWhen rfcomm incoming queue is not empty, waiting for app ready to drain the data
zzy [Tue, 8 Oct 2013 23:54:08 +0000 (16:54 -0700)]
When rfcomm incoming queue is not empty, waiting for app ready to drain the data

Fixed the issue that rfcomm inbound packets could be out of order when host
flow control is activating.
bug 11031800

Change-Id: Idc1eb6633bb070f1ab2b33a9751fd7d714764d45

10 years agoUnable to connect to a Motorola s705 until Bluetooth was toggled of and back on
Zhihai Xu [Mon, 7 Oct 2013 22:11:22 +0000 (15:11 -0700)]
Unable to connect to a Motorola s705 until Bluetooth was toggled of and back on

we should use the same role as the previous connection, if phone walk out of range,
and reconnect back from remote device.
bug:10648781

Change-Id: I6abd77067d26769067ba2fbd45d9e8f75cf7c764

10 years agoMerge "Remove MMS support from MAP SDP" into klp-dev
Matthew Xie [Thu, 10 Oct 2013 00:46:15 +0000 (00:46 +0000)]
Merge "Remove MMS support from MAP SDP" into klp-dev

10 years agoMerge "Interleave br/edr device discovery with BLE device scan for some targets"...
Matthew Xie [Wed, 9 Oct 2013 23:40:09 +0000 (23:40 +0000)]
Merge "Interleave br/edr device discovery with BLE device scan for some targets" into klp-dev

10 years agoInterleave br/edr device discovery with BLE device scan for some targets
Matthew Xie [Mon, 30 Sep 2013 19:44:10 +0000 (12:44 -0700)]
Interleave br/edr device discovery with BLE device scan for some targets

This change only applies to targets which do not support interleaved scan
in controller.
bug 8508849

Change-Id: Ia99faf92c942b4b33abfde2708eff25ec9cd5468

10 years agoadded filter remove api to control the # of child node for bt_config.xml
zzy [Sat, 28 Sep 2013 00:05:37 +0000 (17:05 -0700)]
added filter remove api to control the # of child node for bt_config.xml

Bug 10949832

Change-Id: I10589b9d0a0b4b8d7cbf66122c66bb2e99be04a1

10 years agoRemove MMS support from MAP SDP
Matthew Xie [Wed, 9 Oct 2013 21:20:56 +0000 (14:20 -0700)]
Remove MMS support from MAP SDP

When we support MMS in the future. Revert this patch.
bug 10296324

Change-Id: I9d65895d6cb55b3967efcddc2c37b3f95ba3ce38

10 years agoLE: Improved handling of illegal GATT PDUs
Andre Eisenbach [Wed, 2 Oct 2013 22:37:21 +0000 (15:37 -0700)]
LE: Improved handling of illegal GATT PDUs

Do additional length checks when handling malformed messages. These
messages are never valid, and should be dropped if seen.

Before starting to parse out PDU content, it is verified that the
buffer contains sufficient bytes and error condition is returned
if this is not the case.

Bug: 11045073
Change-Id: Ifb792d1575e0514f33e75ed73247ea638807901e

10 years agoAdd toyota venza to the auto pair blacklist
Matthew Xie [Wed, 2 Oct 2013 07:40:27 +0000 (00:40 -0700)]
Add toyota venza to the auto pair blacklist

bug 10904063

Change-Id: Ia14f00eb45ff8ba1d7df73db575aff552af7677a

10 years agoMerge "Crash after unpairing BT keyboard" into klp-dev
Zhihai Xu [Fri, 4 Oct 2013 23:25:06 +0000 (23:25 +0000)]
Merge "Crash after unpairing BT keyboard" into klp-dev

10 years agoCrash after unpairing BT keyboard
Zhihai Xu [Sun, 29 Sep 2013 22:12:55 +0000 (15:12 -0700)]
Crash after unpairing BT keyboard

The crash is caused to access an array use invalid index value.
The solution is to check the index before access the array.
bug:10992001

Change-Id: Iad83764de9545fb2348105cf9cd9d32a85f1d654

10 years agoFailure to start playback on A2DP sink after connection
Zhihai Xu [Sun, 29 Sep 2013 20:42:13 +0000 (13:42 -0700)]
Failure to start playback on A2DP sink after connection

This is what happen:
after Headset is connected, we call start_audio_datapath which will send AVDTP_Start command to Headset,
Headset reject it with bad state. Bluedroid stack will ack failure to start_audio_datapath.
The next time we write audio data to bluetooth, we will call start_audio_datapath again to send AVDTP_Start command to Headset
Headset reject it with bad state again. Bluedroid stack will ack failure to start_audio_datapath.
When the third time we call start_audio_datapath, right at that time we receive  AVDTP_Start command from Headset.
Handle AVDTP_Start command and Handle start_audio_datapath are in two different threads.
Handle AVDTP_Start command is in btu_task thread.
Handle start_audio_datapath() is in btif_task thread.
We have race condition in this case
Because when  btif_task processed BTIF_AV_START_STREAM_REQ_EVT(triggered by start_audio_datapath),
it don't know we receive  AVDTP_Start command which is processed in  btu_task.
btif_task will send a message BTA_AV_API_START_EVT to btu_task, which will be handled by bta_av_do_start.
AVDTP_start command from headset is handled by bta_av_start_ok.
bta_av_start_ok will send BTA_AV_START_EVT with suspending true to btif_task and send AVDTP_Suspend command
to headset to suspend the AVDTP for reconfiguration purpose.

in bta_av_do_start, we will check whether the AVDTP is already started, we will know the AVDTP is already start at this time because
bta_av_do_start is also running in btu_task. We will send BTA_AV_START_EVT with success to btif_task.

In the btif_task, BTA_AV_START_EVT will be processed by btif_av_state_opened_handler:
For the first BTA_AV_START_EVT with suspending true sent by bta_av_start_ok, it will ignore it:
if ((p_av->start.status == BTA_SUCCESS) && (p_av->start.suspending == TRUE))
               return TRUE;
For the second BTA_AV_START_EVT with success sent by bta_av_do_start , it will ack success to start_audio_datapath, and change to
BTIF_AV_STATE_STARTED/BTAV_AUDIO_STATE_STARTED, after receive success ack from bluedroid stack, we will start send Audio data to bluetooth.

At last we received  AVDTP_Suspend response accept from Headset, we will send BTA_AV_SUSPEND_EVT to btif_task, which will be
handled by btif_av_state_started_handler. It will call btif_a2dp_on_suspended and call audio_state_cb  with new audio state
BTAV_AUDIO_STATE_STOPPED.
so The state between bluedroid stack and audio data path is out of sync.
The fix is to send failure message if we know we suspend AVDTP in bta_av_do_start,
also make sure we won't miss acknowledgement for pending start if we exit opened state,
to avoid audio data path dead lock.

bug:10953908
Change-Id: I1704839977324b7c4e234eb843cddf3719e10d2c

10 years agoIncrease default bluetooth name from 15 to 31.
Matthew Xie [Wed, 18 Sep 2013 19:30:36 +0000 (12:30 -0700)]
Increase default bluetooth name from 15 to 31.

bug 7441329

Change-Id: I79d64e77f206268ace06ce0f7b16119f63655bec

10 years agonative crash while skipping songs with A2DP connected
Zhihai Xu [Tue, 17 Sep 2013 01:16:47 +0000 (18:16 -0700)]
native crash while skipping songs with A2DP connected

this is caused by out of bound(invalid) index, pass to AVRC_MsgReq

bug:10787111
Change-Id: I5b06c646342d0d4e9202c6e22e1c1d67275efb43

10 years agoSet default a2dp sbc encoding quality to high
Mattias Agren [Fri, 5 Apr 2013 15:27:27 +0000 (17:27 +0200)]
Set default a2dp sbc encoding quality to high

* Increased bitpool to high quality setting (53). * Added rate quality
reduction to medium quality for basic rate connections * Enhanced
a2dp frame calculation ratio to smooth out frame distrubution * Removed
iop scaling patch.

Bug 8252054

Change-Id: I20725d0decfe5f820e1c03407889b6272e830aca

10 years agoMerge "fix wrong PBAP profile SDP record which may cause some carkit interop problem...
Zhihai Xu [Sat, 14 Sep 2013 03:59:15 +0000 (03:59 +0000)]
Merge "fix wrong PBAP profile SDP record which may cause some carkit interop problem." into klp-dev

10 years agoMerge "a2dp media packet sent too slow, which cause packet overflow." into klp-dev
Zhihai Xu [Sat, 14 Sep 2013 03:56:22 +0000 (03:56 +0000)]
Merge "a2dp media packet sent too slow, which cause packet overflow." into klp-dev

10 years agoa2dp media packet sent too slow, which cause packet overflow.
Zhihai Xu [Sat, 14 Sep 2013 02:31:18 +0000 (19:31 -0700)]
a2dp media packet sent too slow, which cause packet overflow.

the error message: btif_media_aa_prep_2_send congestion buf count 24
The reason is we increase all bluedroid thread related TX data path priority:
media, timer, BTU and HCI_WORKER, but we didn't increase the RX data path
priority: userial_read_thread. If the RX thread is blocked, it will also
affect TX, because the HCI have flow control, we need receive HCI Number of
 Completed Packets Events to continue send packet to the controller.
If we HCI complete Packets Event packets is blocked, the HCI flow control
will block the HCI packet trnasmission until we get HCI complete packets
event to know how many buffer is available in the controller.
I tested with a chrysler CIP/VP4 carkit which show this error message,
After I apply this fix, I can't reproduce this problem any more.
This look like good fix for this issue.

bug:8252054
Change-Id: Ic78b9abb69648c50aa63e2b3c8b90038018fb6b5

10 years agofix wrong PBAP profile SDP record which may cause some carkit interop problem.
Zhihai Xu [Sat, 14 Sep 2013 00:38:49 +0000 (17:38 -0700)]
fix wrong PBAP profile SDP record which may cause some carkit interop problem.

bug:10488422
Change-Id: I8fb4a73a631c84dc812f44593743905f2d2ad108

10 years agoMerge "Added lock in btu_xxx_timer api" into klp-dev
Matthew Xie [Sat, 14 Sep 2013 00:24:03 +0000 (00:24 +0000)]
Merge "Added lock in btu_xxx_timer api" into klp-dev

10 years agoMerge "Changed MAP version from 1.0 to 1.1, since this is what was actually implement...
Zhihai Xu [Fri, 13 Sep 2013 22:42:47 +0000 (22:42 +0000)]
Merge "Changed MAP version from 1.0 to 1.1, since this is what was actually implemented" into klp-dev

10 years agoAdded lock in btu_xxx_timer api
zzy [Fri, 6 Sep 2013 23:47:29 +0000 (16:47 -0700)]
Added lock in btu_xxx_timer api

Bug 10539101: Native crash in com.android.bluetooth while running monkey

10 years agoMerge "change AVRCP profile version from 1.4 to 1.3 in SDP record." into klp-dev
Zhihai Xu [Fri, 13 Sep 2013 19:14:46 +0000 (19:14 +0000)]
Merge "change AVRCP profile version from 1.4 to 1.3 in SDP record." into klp-dev

10 years agochange AVRCP profile version from 1.4 to 1.3 in SDP record.
Zhihai Xu [Fri, 13 Sep 2013 17:56:59 +0000 (10:56 -0700)]
change AVRCP profile version from 1.4 to 1.3 in SDP record.

bug:10728403
Change-Id: I741c8741173088bc91f43fbbcda8c0bd13a7d84d

10 years agoUse product model as default bluetooth name if not defined
Matthew Xie [Sat, 10 Nov 2012 02:26:26 +0000 (18:26 -0800)]
Use product model as default bluetooth name if not defined

bug 7441329

Change-Id: I6afe54a8a0c4d1120e96eb808cf9fc4bf5b37fdb

10 years agoChanged MAP version from 1.0 to 1.1, since this is what was actually implemented
Kim Schulz [Thu, 22 Aug 2013 08:57:29 +0000 (10:57 +0200)]
Changed MAP version from 1.0 to 1.1, since this is what was actually implemented

Change-Id: If391121ca92f1025bff3a99941afa12da69c3b69
Bug: 10434562

10 years agoMerge "Configure BTA DM to not force master role upon inquiry" into klp-dev
Zhihai Xu [Fri, 6 Sep 2013 21:19:10 +0000 (21:19 +0000)]
Merge "Configure BTA DM to not force master role upon inquiry" into klp-dev

10 years agoConfigure BTA DM to not force master role upon inquiry
Mattias Agren [Mon, 8 Apr 2013 10:23:42 +0000 (12:23 +0200)]
Configure BTA DM to not force master role upon inquiry

* Some headsets will request master role upon connection. When inquiry
is attempted during streaming this results in a small audio glitch
while attempting to switch back to master.

Bug: 8266826
Bug: 8569352

Change-Id: Iaca0bc0f8847e32bc2d40e33100f26ce19d79a28

10 years agoMerge "Hid Host: Ensure Hid module is accepting events before processing" into klp-dev
Matthew Xie [Fri, 6 Sep 2013 05:23:35 +0000 (05:23 +0000)]
Merge "Hid Host: Ensure Hid module is accepting events before processing" into klp-dev

10 years agoHid Host: Ensure Hid module is accepting events before processing
Harish Paryani [Tue, 27 Aug 2013 21:52:03 +0000 (14:52 -0700)]
Hid Host: Ensure Hid module is accepting events before processing

During shutdown sequence, Hid host module state machine was crashing
trying to process events in NULL state. Added the appropriate check.
bug 10429484
Change-Id: Ic8b8f61f2fa63027d3e473787cca6d4d221ec075

10 years agoIncremented buffer size to accomodate default MTU
Priti Aghera [Wed, 22 May 2013 20:25:58 +0000 (13:25 -0700)]
Incremented buffer size to accomodate default MTU

L2CAP Config request was not sent from Bluedroid as the MTU size was
higher than the max buffer size for default apdu tx/rx sizes.
Incremented the buffer size to accomodate this default MTU size. Also
included new datatypes and corresponding tx/rx apdus. This will set the
MTU size to that defined in datatype config rather than selecting
default value.
b/10565872
Change-Id: Id469c836581fb3d020bcb88c381421e0ef965073

10 years agoAdd support for AbsoluteVolume
Satya Calloji [Thu, 1 Aug 2013 09:14:43 +0000 (02:14 -0700)]
Add support for AbsoluteVolume

Add support for AbsoluteVolume in BTIF
bug 9595622

Change-Id: I11b707f6ab50d31bd11e879b0ebe5ad5bac54ad9

Conflicts:
btif/src/btif_rc.c

10 years agoPlace handling of BTA_DM_DISC_BLE_RES_EVT in BLE feature ifdef
Matthew Xie [Fri, 16 Aug 2013 02:30:48 +0000 (19:30 -0700)]
Place handling of BTA_DM_DISC_BLE_RES_EVT in BLE feature ifdef

Without this fix, bluetooth fail to compile for non-BLE platform

Change-Id: Ida10c54ab841e0a2bcaeb389a9813dd846db8200

10 years agoMerge "LE: Add support for the HID-over-GATT profile (1/3)" into klp-dev
Zhihai Xu [Fri, 16 Aug 2013 00:22:43 +0000 (00:22 +0000)]
Merge "LE: Add support for the HID-over-GATT profile (1/3)" into klp-dev

10 years agoLE: Add support for the HID-over-GATT profile (1/3)
Andre Eisenbach [Thu, 8 Aug 2013 22:42:48 +0000 (15:42 -0700)]
LE: Add support for the HID-over-GATT profile (1/3)

bug:8330048
Change-Id: I5727161b0a87700487bee96cdffa8fd169034204

10 years agoAdd support for ff/rew
John Du [Tue, 25 Jun 2013 02:18:56 +0000 (19:18 -0700)]
Add support for ff/rew

Change-Id: I017a7ddc9f7255d84ad8bf3284fefc1b7040900f
(cherry picked from commit 342bdf540d8c183d14ec5fb436b73cd979df3a8f)

10 years agoMerge "LE: Add peripheral role support (2/4)" into klp-dev
Matthew Xie [Wed, 14 Aug 2013 08:15:36 +0000 (08:15 +0000)]
Merge "LE: Add peripheral role support (2/4)" into klp-dev

10 years agoLE: Add peripheral role support (2/4)
Andre Eisenbach [Wed, 7 Aug 2013 01:19:37 +0000 (18:19 -0700)]
LE: Add peripheral role support (2/4)

Initial stack support for the LE peripheral role.

Change-Id: I261d751b43b7020760bff345b472b6f60caa60be

10 years agoMerge "LE: Do not generate an error if a device is already whitelisted" into klp-dev
Matthew Xie [Wed, 14 Aug 2013 07:33:46 +0000 (07:33 +0000)]
Merge "LE: Do not generate an error if a device is already whitelisted" into klp-dev

10 years agoMerge "LE: Fix for back-to-back GATT connection request issues" into klp-dev
Matthew Xie [Wed, 14 Aug 2013 07:33:20 +0000 (07:33 +0000)]
Merge "LE: Fix for back-to-back GATT connection request issues" into klp-dev

10 years agoMerge "LE: Memory leak when caching GATT service change" into klp-dev
Matthew Xie [Wed, 14 Aug 2013 07:32:50 +0000 (07:32 +0000)]
Merge "LE: Memory leak when caching GATT service change" into klp-dev

10 years agoMerge "LE: Check encryption state before starting encryption" into klp-dev
Matthew Xie [Wed, 14 Aug 2013 07:32:25 +0000 (07:32 +0000)]
Merge "LE: Check encryption state before starting encryption" into klp-dev

10 years agoMerge "LE: Add instance ID to descriptors (2/4)" into klp-dev
Matthew Xie [Wed, 14 Aug 2013 07:30:41 +0000 (07:30 +0000)]
Merge "LE: Add instance ID to descriptors (2/4)" into klp-dev

10 years agoLE: Do not generate an error if a device is already whitelisted
Andre Eisenbach [Mon, 22 Jul 2013 05:55:20 +0000 (22:55 -0700)]
LE: Do not generate an error if a device is already whitelisted

If a device is added to the whitelist that is already listed, no error
should be generated.

Change-Id: I81ad47eec47157d5ab2b5b25db3ed15bf873794e

10 years agoLE: Fix for back-to-back GATT connection request issues
Andre Eisenbach [Tue, 23 Jul 2013 22:57:27 +0000 (15:57 -0700)]
LE: Fix for back-to-back GATT connection request issues

When two GATT client connections were sent back to back, the first
connection will not be processed due to an address comparison error.
This patch corrects the error.

Change-Id: I8eb97cd2a34a81da460f448dc71445b2898a5d32

10 years agoLE: Memory leak when caching GATT service change
Andre Eisenbach [Tue, 23 Jul 2013 00:42:18 +0000 (17:42 -0700)]
LE: Memory leak when caching GATT service change

When a GATT connection is disconnected, a bonded device will be added
into service change pending list. But if the device is already in the
list, a duplicate record will be added and one buffer is lost.

This change ensures that devices are only added if they are not already
in the list.

Change-Id: Ied6872b145ed28bde8044444cb6c9cbee525943d

10 years agoLE: Check encryption state before starting encryption
Andre Eisenbach [Fri, 12 Jul 2013 19:49:33 +0000 (12:49 -0700)]
LE: Check encryption state before starting encryption

Previously, the btif layer kept track of when a link was encrypted using
an internal list to track encryptino callbacks. This change switches to
querying the stack for the actual encryption state, since the btif layer
may not receive all encryption related callbacks.

Bug: BLTH02382147
Change-Id: I426b87d77e9a18531c2d42733a7e736a73bb116f

10 years agoMove bta_dm_remove_sec_dev_entry declaration out of BLE ifdef
Matthew Xie [Wed, 14 Aug 2013 03:05:34 +0000 (20:05 -0700)]
Move bta_dm_remove_sec_dev_entry declaration out of BLE ifdef

The method applies to non-BLE cases.

Change-Id: I57508d09015e4ec4a74edf2d1fbc607fd692b402

10 years agoLE: Add instance ID to descriptors (2/4)
Andre Eisenbach [Tue, 9 Jul 2013 07:01:49 +0000 (00:01 -0700)]
LE: Add instance ID to descriptors (2/4)

If a remote devices offers multiple descriptors with the same UUID, the
instance ID is used to differentiate between them.

Change-Id: I1f3c284d714719fe9fb9cbb297c70a061c62a96d

10 years agoLE: UPF 45 bug fixes
Andre Eisenbach [Mon, 5 Aug 2013 23:55:38 +0000 (16:55 -0700)]
LE: UPF 45 bug fixes

This change fixes the following issues:
- Second GATT-over-BR/EDR channel cannot be established when there
  already is an existing GATT-over-BR/EDR channel
- If encryption fails for an LE connection due to a missing key,
  the security state is not being cleared and blocks all further
  security processing
- When DM discovery of an LE Peripheral device fails with a
  connection timeout, no further discovery requests can be made
- GATT service discovery can get into endless loop when duplicate descriptor
  definitions are found on the remote device
- When GATT over BR/EDR fails, BTA does not give a connection
  callback to the application initiating the connection
- BR/EDR connection to remote platform does not generate API callbacks
- Stack crash discovered during UPF after remote disconnects
- The host is sending HCI disconnect to invalid HCI handle when
  SMP fails because of a connection timeout
- Possible race condition:
  If a disconnect is immediately followed by a connection complete,
  the connection complete cannot be processed in the BTA GATT state
  machine
- Write Complete event is not triggered for Prepare Write requests

Change-Id: I539cdedd68007818ff4f0d0213cee1c913f72d0f

Conflicts:
bta/gatt/bta_gatts_act.c

10 years agoLE: Add NULL check for GATT client callback
Andre Eisenbach [Tue, 2 Jul 2013 21:47:03 +0000 (14:47 -0700)]
LE: Add NULL check for GATT client callback

Change-Id: I1087102d8a740969fb0a98b409b58230a3236aeb

10 years agoLE: Fix crash on LE mouse reconnect
Andre Eisenbach [Mon, 24 Jun 2013 20:19:13 +0000 (13:19 -0700)]
LE: Fix crash on LE mouse reconnect

Sometimes, a GKI exception may be observed when re-connecting to an LE
mouse. This patch properly handles the encryption state change, avoiding
a possible race condition leading to the exception.

Change-Id: I4cf139c1ac22e71b598272fccebf645cd73fdf6a

10 years agoLE: Limit minimum MTU size
Andre Eisenbach [Fri, 14 Jun 2013 20:22:25 +0000 (13:22 -0700)]
LE: Limit minimum MTU size

Check requested MTU sizes to ensure a minimum MTU size. Otherwise remote
devices may request an MTU that's too small, preventing any further
communication with the remote device.

Change-Id: I3ba97cf6e6c464825778a8c8902f99f6662c3762

10 years agoLE: Send correct device name during SMP pairing
Andre Eisenbach [Tue, 11 Jun 2013 21:18:21 +0000 (14:18 -0700)]
LE: Send correct device name during SMP pairing

During SMP pairing the device name is not properly copied to the upper
Java layers, causing a potentially wrong device name to be displayed to
the user.

Change-Id: Iab43871defc7df52b0cd9c64f52208879abb50f2

10 years agoLE: Integrate power table for GATT
Andre Eisenbach [Tue, 28 May 2013 06:11:43 +0000 (15:11 +0900)]
LE: Integrate power table for GATT

No power table exists for GATT, causing the device to never enter sniff
mode while using GATT over BR/EDR.

Change-Id: I0db539c1814a61af620f3dba560da64481291beb

10 years agoLE: Add GATT disable functions
Andre Eisenbach [Wed, 15 May 2013 11:55:08 +0000 (04:55 -0700)]
LE: Add GATT disable functions

This patch adds required disable functions to the GATT sub-system to
properly unregister with the stack. Without the disable functions in
place, turning Bluetooth off with a GATT device connected may lead to
unexpected behaviour and cause GATT to fail on sub-sequent stack
restarts.

Change-Id: I7cb80e96109e2c09882991298d0487b506f5ffdd

10 years agoLE: Fix GKI exception for 0 length values
Andre Eisenbach [Wed, 29 May 2013 17:21:39 +0000 (10:21 -0700)]
LE: Fix GKI exception for 0 length values

When a remote device responds to a read request with a 0 length value, a
GKI exception will occur. This patch checks for 0 length values to avoid
the exception and return the correct status to the application
requesting the read.

Change-Id: Idce61c3d2be7072dafe429ab978763b0ee61aed2

10 years agoLE: Only copy UUID for callback on success
Andre Eisenbach [Fri, 24 May 2013 05:53:51 +0000 (14:53 +0900)]
LE: Only copy UUID for callback on success

When a GATT client application registers with the stack, the UUID is
always copied into the callback buffer, even if the registration failed.
This patch adds a check to make sure an invalid UUID is not passed back
to the application.

Change-Id: I53ddc7939c096a33a64b00a8902bedba00b61e7d

10 years agoLE: Add NULL pointer check in deep copy function
Andre Eisenbach [Fri, 17 May 2013 20:39:51 +0000 (13:39 -0700)]
LE: Add NULL pointer check in deep copy function

Adds a NULL pointer check for the GATT read event deep copy function.

Change-Id: Ia8d31e851589612009e1038c11b7b113e5367c6d

10 years agoLE: Initialize return status when registering client
Andre Eisenbach [Tue, 14 May 2013 04:26:30 +0000 (13:26 +0900)]
LE: Initialize return status when registering client

Initialize status to BTA_GATT_NO_RESOURCES. If cl_rcb is full, the
wrong status could be returned to the client.

Change-Id: I45d147242c9f24c7636671ffca2f9429c175b8cf

10 years agoLE: Deep copy buffers when transfering client context
Andre Eisenbach [Wed, 17 Apr 2013 10:10:33 +0000 (19:10 +0900)]
LE: Deep copy buffers when transfering client context

Certain BTA client event types require a deep copy of the request
data buffers when transfering context. Shallow copy of the pointers
involved may cause a crash when overlapping read and write requests
are received.

Change-Id: Id59b034d7fdd28087695a0688caff66b4cef4a4d

10 years agoFixed issue that failed to update rfc credit to peer when host can not handle the...
zzy [Sat, 10 Aug 2013 00:52:52 +0000 (17:52 -0700)]
Fixed issue that failed to update rfc credit to peer when host can not handle the incoming packets fast enough

Bug 10233699: Bluetooth sockets block indefinitely on read(...)

10 years agoBluetooth MAP profile - sms and mms support initial check-in
Matthew Xie [Fri, 19 Jul 2013 00:37:04 +0000 (17:37 -0700)]
Bluetooth MAP profile - sms and mms support initial check-in

bug:10116530

Change-Id: I3bff487fdc0ee1256afa8d704a2cfa788081208c

10 years agoSupport for 128-bit UUID service discovery
Andre Eisenbach [Mon, 5 Aug 2013 16:19:16 +0000 (09:19 -0700)]
Support for 128-bit UUID service discovery

Support the discovery of custom 128-bit UUIDs. This is mainly needed for
GATT service discovery to find custom services.

Bug: 10116729
Change-Id: I8669111dfb8806f5632b7ea8ad02f0e38dded66f

10 years agoFix check for BTIF_HL_CCH_OP_MDEP_FILTERING in btif_hl_upstreams_evt
Ajay Dudani [Sat, 27 Jul 2013 16:11:08 +0000 (09:11 -0700)]
Fix check for BTIF_HL_CCH_OP_MDEP_FILTERING in btif_hl_upstreams_evt

Change-Id: If080fad6ba4b42944dc5ee8bf1d8f0586dbd05f8

10 years agoMerge "Add debug menu to enable btsnoop"
Zhihai Xu [Fri, 26 Jul 2013 18:32:18 +0000 (18:32 +0000)]
Merge "Add debug menu to enable btsnoop"

11 years agoam 4a5fc696: (-s ours) Reconcile with jb-mr2-zeroday-release - do not merge
The Android Open Source Project [Mon, 1 Jul 2013 14:47:46 +0000 (07:47 -0700)]
am 4a5fc696: (-s ours) Reconcile with jb-mr2-zeroday-release - do not merge

* commit '4a5fc6964313a606abd89268b8a53036b14b4ad7':

11 years agoReconcile with jb-mr2-zeroday-release - do not merge
The Android Open Source Project [Mon, 1 Jul 2013 14:42:42 +0000 (07:42 -0700)]
Reconcile with jb-mr2-zeroday-release - do not merge

Change-Id: Ib88a72e7473f38fd079a12658875dec71352c19a

11 years agomerge in jb-mr2-zeroday-release history after reset to jb-mr2-dev
The Android Automerger [Sun, 30 Jun 2013 12:55:19 +0000 (05:55 -0700)]
merge in jb-mr2-zeroday-release history after reset to jb-mr2-dev

11 years agoam 2e1880d4: am 98657a36: LE: Release transmit buffer credits
Andre Eisenbach [Fri, 28 Jun 2013 21:47:45 +0000 (14:47 -0700)]
am 2e1880d4: am 98657a36: LE: Release transmit buffer credits

* commit '2e1880d46eeb8fe1a53ac9e387a07ac802491ad7':
  LE: Release transmit buffer credits

11 years agoam 98657a36: LE: Release transmit buffer credits
Andre Eisenbach [Fri, 28 Jun 2013 21:46:29 +0000 (14:46 -0700)]
am 98657a36: LE: Release transmit buffer credits

* commit '98657a365c7230b84a005c63ce5bcf036d69f6eb':
  LE: Release transmit buffer credits

11 years agoLE: Release transmit buffer credits
Andre Eisenbach [Tue, 25 Jun 2013 23:44:56 +0000 (16:44 -0700)]
LE: Release transmit buffer credits

When an ACL link goes down, some controllers do not send a "number of
completed packets" update for the last ACL packets sent from the host to
the controller. This could result in incorrect L2CAP transmit window
calculations and no transmit credit to be available to send data to the
controller.
This patch restores transmit buffer creedits regardless of the
controller behaviour.
bug 9474159

Change-Id: I2540131034271a0269fa50698f370bceb7747e2d

11 years agoam 2f6542da: (-s ours) Reconcile with jb-mr2-zeroday-release - do not merge
The Android Open Source Project [Wed, 26 Jun 2013 19:34:20 +0000 (12:34 -0700)]
am 2f6542da: (-s ours) Reconcile with jb-mr2-zeroday-release - do not merge

* commit '2f6542daa3362e99bf0d09777b3c9913cb0fd85c':

11 years agoReconcile with jb-mr2-zeroday-release - do not merge
The Android Open Source Project [Wed, 26 Jun 2013 19:33:30 +0000 (12:33 -0700)]
Reconcile with jb-mr2-zeroday-release - do not merge

Change-Id: I6e7a1cf99db622b61d2e35c1bc27eece9ec9dcc7

11 years agomerge in jb-mr2-zeroday-release history after reset to jb-mr2-dev
The Android Automerger [Wed, 26 Jun 2013 19:17:08 +0000 (12:17 -0700)]
merge in jb-mr2-zeroday-release history after reset to jb-mr2-dev

11 years agoam 72912851: (-s ours) Reconcile with jb-mr2-release - do not merge
The Android Open Source Project [Wed, 26 Jun 2013 00:02:17 +0000 (17:02 -0700)]
am 72912851: (-s ours) Reconcile with jb-mr2-release - do not merge

* commit '72912851ec38b96570ab60d19c175db1c73d53b5':
  Do not abort bonding if link disconnects during SDP after Auth cmplt

11 years agoam 29a69a11: am ec7e2c8e: Do not abort bonding if link disconnects during SDP after...
Ganesh Ganapathi Batta [Wed, 26 Jun 2013 00:01:57 +0000 (17:01 -0700)]
am 29a69a11: am ec7e2c8e: Do not abort bonding if link disconnects during SDP after Auth cmplt

* commit '29a69a1144fc42d3742bacb9acee89a612cbf8b3':
  Do not abort bonding if link disconnects during SDP after Auth cmplt

11 years agoReconcile with jb-mr2-release - do not merge
The Android Open Source Project [Tue, 25 Jun 2013 23:11:45 +0000 (16:11 -0700)]
Reconcile with jb-mr2-release - do not merge

Change-Id: I3582cf75047d93865faeb93e56a8dd10c6f83f8e

11 years agoDo not abort bonding if link disconnects during SDP after Auth cmplt
Ganesh Ganapathi Batta [Thu, 20 Jun 2013 18:00:28 +0000 (11:00 -0700)]
Do not abort bonding if link disconnects during SDP after Auth cmplt

If ACL link gets dropped during service search after bonding,
re-attempt service search instead of setting bond state to BOND_NONE
Bug 8611134

Change-Id: I77672d9f4feab634b3795a41e0d4e58903b5d275

11 years agoam ec7e2c8e: Do not abort bonding if link disconnects during SDP after Auth cmplt
Ganesh Ganapathi Batta [Tue, 25 Jun 2013 21:54:32 +0000 (14:54 -0700)]
am ec7e2c8e: Do not abort bonding if link disconnects during SDP after Auth cmplt

* commit 'ec7e2c8e06396101c6b26187995db7c105ed3c3f':
  Do not abort bonding if link disconnects during SDP after Auth cmplt