OSDN Git Service
android-build-team Robot [Thu, 3 May 2018 23:58:38 +0000 (16:58 -0700)]
Merge changes from topic "am-
75dfedd1-e9af-4127-a4f2-
dca9a919845a-nyc-dev" into oc-dev am:
476e987261 am:
2df27358c4
am:
87e1fa9664
Change-Id: Id3d8870cdaa87e7be24966db112c9de93ab23680
android-build-team Robot [Thu, 3 May 2018 23:47:13 +0000 (16:47 -0700)]
Merge changes from topic "am-
75dfedd1-e9af-4127-a4f2-
dca9a919845a-nyc-dev" into oc-dev am:
476e987261
am:
2df27358c4
Change-Id: I71a8c9ffb75a3d647294f4da01417ca78f601c4f
android-build-team Robot [Thu, 3 May 2018 23:38:39 +0000 (16:38 -0700)]
Merge changes from topic "am-
75dfedd1-e9af-4127-a4f2-
dca9a919845a-nyc-dev" into oc-dev
am:
476e987261
Change-Id: If96757870922276971579503ccce57b2b1af2a00
Hansong Zhang [Thu, 3 May 2018 23:29:56 +0000 (16:29 -0700)]
[automerger skipped] [automerger] DO NOT MERGE Prevent stack overflow in btif_storage am:
560a6244ea am:
525aee59af am:
6a0ef37a82 skipped:
4dfb42893f am:
2503636b1e am:
27d3295db2 am:
c3deead2f0 am:
bbba8d8db4 skipped:
e294ca0aa6 am:
d095472fce am:
c20649a364
am:
b38abda13b -s ours
Change-Id: Ib00527be4b4b86bff4d8c16e63b09afa7ec684dd
android-build-team Robot [Thu, 3 May 2018 23:15:36 +0000 (23:15 +0000)]
Merge changes from topic "am-
75dfedd1-e9af-4127-a4f2-
dca9a919845a-nyc-dev" into oc-dev
* changes:
[automerger] DO NOT MERGE Prevent stack overflow in btif_storage am:
1d200be958 am:
b26970f156 am:
f951aec9ee am:
0d93124725 skipped:
674ed907aa
[automerger] DO NOT MERGE Prevent stack overflow in btif_storage am:
1d200be958 am:
b26970f156 am:
f951aec9ee am:
0d93124725
[automerger] DO NOT MERGE Prevent stack overflow in btif_storage am:
1d200be958 am:
b26970f156 am:
f951aec9ee
[automerger] DO NOT MERGE Prevent stack overflow in btif_storage am:
1d200be958 am:
b26970f156
[automerger] DO NOT MERGE Prevent stack overflow in btif_storage am:
1d200be958
DO NOT MERGE Prevent stack overflow in btif_storage
Hansong Zhang [Thu, 3 May 2018 23:11:51 +0000 (16:11 -0700)]
[automerger] DO NOT MERGE Prevent stack overflow in btif_storage am:
560a6244ea am:
525aee59af am:
6a0ef37a82 skipped:
4dfb42893f am:
2503636b1e am:
27d3295db2 am:
c3deead2f0 am:
bbba8d8db4 skipped:
e294ca0aa6 am:
d095472fce
am:
c20649a364
Change-Id: I34c4d01270e3094db26f42463d85cfcaa95b0de9
Hansong Zhang [Thu, 3 May 2018 22:59:22 +0000 (15:59 -0700)]
[automerger] DO NOT MERGE Prevent stack overflow in btif_storage am:
560a6244ea am:
525aee59af am:
6a0ef37a82 skipped:
4dfb42893f am:
2503636b1e am:
27d3295db2 am:
c3deead2f0 am:
bbba8d8db4 skipped:
e294ca0aa6
am:
d095472fce
Change-Id: I51cd293067070f82114459a98349cc34a25f6787
android-build-team Robot [Thu, 3 May 2018 22:24:24 +0000 (22:24 +0000)]
Merge "Add AVRCP native logging to dumpsys" into pi-dev
Ajay Panicker [Wed, 2 May 2018 23:23:13 +0000 (16:23 -0700)]
Add AVRCP native logging to dumpsys
Example output
AVRCP Target Native Service: 2 devices
d4:90:9c:0a:48:d0
Current Volume: 42
Current Browsed Player ID: -1
Registered Notifications:
Play Status
Last Play State: 2
Last Song Sent ID: ""
Current Folder: ""
MTU Sizes: CTRL=1020 BROWSE=332
Bug:
79167906
Test: adb shell dumpsys bluetooth_manager
Change-Id: I749dc3c568ac7793ac924ab1e46c3fc7ae42a260
(cherry picked from commit
774eb4c2554f766a77fcdcd0c37737b50fbe0452)
Ajay Panicker [Wed, 2 May 2018 17:05:24 +0000 (10:05 -0700)]
Ignore volume changed events from the non-active device
Bug:
78251684
Test: Run host native test net_test_avrcp
Change-Id: I164e9ded88c804da2ce8191c5f58cc053cfa6ecd
(cherry picked from commit
071caca5c78c0c7b3ad69e96b7ede98e6143c96b)
Jakub Pawlowski [Thu, 15 Mar 2018 18:37:06 +0000 (11:37 -0700)]
Hearing Aid: leave some radio time for other devices
We should send maximum two packets in connection event, and they
should take less than 3.75ms with acknowledgements.
Leaving some radio time should make us able to keep third LE connection
to some less demanding devices.
Bug:
78364114
Bug:
69623109
Test: stream music through Hearing Aid and connect to some LE device
Change-Id: Ie97b9db456a957c11438208448c562435b1b0222
(cherry picked from
1e43d40b9201a7aae915d5f53059541a1cfb9b05)
android-build-team Robot [Tue, 1 May 2018 22:21:46 +0000 (22:21 +0000)]
Merge "Implement GetTotalNumberOfItems response for AVRCP Browsing" into pi-dev
Ajay Panicker [Fri, 27 Apr 2018 13:59:22 +0000 (06:59 -0700)]
Implement GetTotalNumberOfItems response for AVRCP Browsing
Bug:
78636552
Test: run host test net_test_avrcp
Change-Id: Ie05d23874317978eb619d0e56a89f2c880166a52
(cherry picked from commit
16aa6a075e5cbb7c97bbc639b876221038212b62)
Pavlin Radoslavov [Tue, 1 May 2018 00:57:34 +0000 (17:57 -0700)]
Add a missing call to btif_av_stream_stop() for SetActivePeer(null)
Without this call, the BtifAv state machine could be left in Started
state, while the A2DP media task timer is canceled.
This internal state inconsistency prevents the proper handling
of Audio HAL commands like SUSPEND - no ACK is returned and
the Audio HAL is blocked.
Bug: b/
78901123
Test: Manual - play music to Headset, select "play media to" > This device
resume music, select "play media to" > Bluetooth Headet
Change-Id: I11b280bea76de02f522e61ebb0a9d7eb5b50f993
Merged-In: I11b280bea76de02f522e61ebb0a9d7eb5b50f993
(cherry picked from commit
361e2a46fb5c6cc1cc7b94a1d6aa780d8bc1f582)
Pavlin Radoslavov [Mon, 30 Apr 2018 20:39:20 +0000 (13:39 -0700)]
Fix A2DP Suspend related multi-component deadlock
Apparently, the processing of A2DP Suspend from the Audio HAL
could result in a deadlock across multiple components:
A2dpService -> AudioService -> Audio-BT HAL -> BT Native Stack ->
BT JNI upcall -> A2dpService
1) A2dpService -> AudioService:
- Waiting inside setActiveDevice() -> synchronized (mStateMachines) ->
mAudioManager.setBluetoothA2dpDeviceConnectionStateSuppressNoisyIntent()
- The mAudioManager call can be blocking: a followup call would wait
for the previous call to complete.
2) AudioService -> Audio-BT HAL
The AudioService is wating on the Audio-BT HAL to complete its request.
In this case the request is SUSPEND
3) Audio-BT HAL -> BT Native Stack
The Audio side of the Audio-BT HAL is waiting for the BT Native stack
to ACK the SUSPEND command.
More specifically, it is retrying few times with timeout of 250ms
each iteration.
4) BT Native Stack -> BT JNI upcall
- In the BT Native Stack the BtifAv FSM (see file btif/src/btif_av.cc)
is in state StateStarted and has received the
BTIF_AV_SUSPEND_STREAM_REQ_EVT because of the SUSPEND command from the
Audio HAL.
- As a result, the LocalSuspendPending flag has been set:
peer_.SetFlags(BtifAvPeer::kFlagLocalSuspendPending);
- Only after the above flag is reset, then the BT Native Stack will
ACK the SUSPEND command from the HAL
- The above flag will be reset when event BTA_AV_SUSPEND_EVT is received
from the underlying stack
- The BtifAv state machine has received the BTA_AV_SUSPEND_EVT event.
However, prior to clearing the pending status, the FSM tries to
report the audio state via JNI to the Java layer:
btif_report_audio_state();
...
peer_.ClearFlags(BtifAvPeer::kFlagLocalSuspendPending);
- Apparently, all the processing inside the BtifAv FSM is done on
the JNI thread, including the btif_report_audio_state() upcall.
5) BT JNI upcall -> A2dpService
- The btif_report_audio_state() upcall calls indirectly
A2dpNativeInterface.onAudioStateChanged() -> sendMessageToService() ->
A2dpService.messageFromNative()
- Within the A2dpService.messageFromNative() processing, there is
"synchronized (mStateMachines) {}" block, and the processing there
blocks because per (1) above A2dpService.setActiveDevice() is
already inside its own "synchronized (mStateMachines) {}" block
The above deadlock is fixed by the following:
- Modified the BTA_AV_SUSPEND_EVT processing such that
the clearing of the kFlagLocalSuspendPending flag is done BEFORE
the btif_report_audio_state()
- Modified the BtifAv FSM such that the internal processing of the FSM
events is done on the BTA thread instead of the JNI thread. Thus,
the FSM processing cannot be blocked by JNI upcalls.
Also:
- Updated the do_in_bta_thread() function to have a return value
so it is more aligned with the corresponding do_in_jni_thread()
implementation
- Updated the reordering of some other btif_report_*() upcalls inside
btif_av.cc so they are after the FSM internal processing in the
current state.
- Added few extra logs to the Audio-BT HAL (file audio_a2dp_hw.cc).
Bug:
72823323
Test: Disconnect/reconnect with Philips SBH7000 Headset
Change-Id: I7ccb558e458a8e90d0414f94463bda8d4b3fdc97
Merged-In: I7ccb558e458a8e90d0414f94463bda8d4b3fdc97
(cherry picked from commit
2a3b9b597ee07f8728bd9903b0bc104c4e24fd6c)
Ajay Panicker [Mon, 30 Apr 2018 16:01:27 +0000 (16:01 +0000)]
Merge "Use the wrapped volume interface with the AVRCP conneciton handler" into pi-dev
Guang Xie [Thu, 15 Feb 2018 20:42:15 +0000 (12:42 -0800)]
Enable HCI Sniff mode and disable subrating for A2DP
Enabling the HCI Sniff mode could help headsets to save power.
Note that subrating is disabled implicitly by NOT sending the
"Sent Sniff Subrating" HCI command to the BT controller,
and effectively using the default Sniff Subrating parameters.
The Headset shouldn't go into Subrating Mode to prevent
potential stuttering if the Headset chooses to use subrating
with the wrong parameters.
NOTE: This should affect only Pixel Buds.
Also:
- Added some extra log messages
- Minor cleanup (argument/variable renaming)
Bug:
74344711
Bug:
74361002
Test: Manual - audio streaming; examine btsnoop logs
Change-Id: Iec5086dba6f9003c21bcb41eddb3bc83ac7dddd1
Merged-In: Iec5086dba6f9003c21bcb41eddb3bc83ac7dddd1
(cherry picked from commit
1b548bb34a0bfc300b8aa03c271148141673922f)
Ajay Panicker [Fri, 27 Apr 2018 13:50:42 +0000 (06:50 -0700)]
Use the wrapped volume interface with the AVRCP conneciton handler
Use the wrapped volume interface in connection handler so that JNI calls
are automatically executed on the correct thread when called from the
connection handler.
Bug:
30602783
Test: Connect a device that doesn't support absolute volume and see that
the JNI call doesn't throw an exception.
Change-Id: Ife768c715022e70dd4055270c1d6cf76ba26aea3
(cherry picked from commit
f4bfa13c912175f81f54ae0249bddf6e2b2b879d)
Android Build Merger (Role) [Thu, 26 Apr 2018 22:47:44 +0000 (22:47 +0000)]
[automerger] DO NOT MERGE Prevent stack overflow in btif_storage am:
1d200be958 am:
b26970f156 am:
f951aec9ee am:
0d93124725 skipped:
674ed907aa
Change-Id: Ie007f16c325850162619837587b43dcfd4009b1f
Android Build Merger (Role) [Thu, 26 Apr 2018 22:47:42 +0000 (22:47 +0000)]
[automerger] DO NOT MERGE Prevent stack overflow in btif_storage am:
1d200be958 am:
b26970f156 am:
f951aec9ee am:
0d93124725
Change-Id: I881f729bd844988a39bf561b870cbdca9c6d45df
Android Build Merger (Role) [Thu, 26 Apr 2018 22:47:41 +0000 (22:47 +0000)]
[automerger] DO NOT MERGE Prevent stack overflow in btif_storage am:
1d200be958 am:
b26970f156 am:
f951aec9ee
Change-Id: Ic9ca21f1cb39213bf24b725389b5ea5b48f29864
Android Build Merger (Role) [Thu, 26 Apr 2018 22:47:40 +0000 (22:47 +0000)]
[automerger] DO NOT MERGE Prevent stack overflow in btif_storage am:
1d200be958 am:
b26970f156
Change-Id: Ifee397028d2567d6b9e97cb42e7b72e96433fc5b
Android Build Merger (Role) [Thu, 26 Apr 2018 22:47:38 +0000 (22:47 +0000)]
[automerger] DO NOT MERGE Prevent stack overflow in btif_storage am:
1d200be958
Change-Id: I22cc9734c1786d691702651f5799b74cab5678a6
Hansong Zhang [Thu, 26 Apr 2018 22:45:28 +0000 (15:45 -0700)]
DO NOT MERGE Prevent stack overflow in btif_storage
Bug:
73963551
Test: manual
Change-Id: I5f7a583aad150ebf9e3d492181d80ca935c8aa3f
Android Build Merger (Role) [Thu, 26 Apr 2018 22:47:14 +0000 (22:47 +0000)]
[automerger] DO NOT MERGE Prevent stack overflow in btif_storage am:
560a6244ea am:
525aee59af am:
6a0ef37a82 skipped:
4dfb42893f am:
2503636b1e am:
27d3295db2 am:
c3deead2f0 am:
bbba8d8db4 skipped:
e294ca0aa6
Change-Id: I97a4460e30f040e3500cdc495d2d0fe9960e46dd
Android Build Merger (Role) [Thu, 26 Apr 2018 22:47:13 +0000 (22:47 +0000)]
[automerger] DO NOT MERGE Prevent stack overflow in btif_storage am:
560a6244ea am:
525aee59af am:
6a0ef37a82 skipped:
4dfb42893f am:
2503636b1e am:
27d3295db2 am:
c3deead2f0 am:
bbba8d8db4
Change-Id: I251795a9c72e4b6bf9ac74df1ed80edd98ec9f4b
Android Build Merger (Role) [Thu, 26 Apr 2018 22:47:11 +0000 (22:47 +0000)]
[automerger] DO NOT MERGE Prevent stack overflow in btif_storage am:
560a6244ea am:
525aee59af am:
6a0ef37a82 skipped:
4dfb42893f am:
2503636b1e am:
27d3295db2 am:
c3deead2f0
Change-Id: I93c2e0d344fede8b48d193fc9b4e0915d914122b
Android Build Merger (Role) [Thu, 26 Apr 2018 22:47:09 +0000 (22:47 +0000)]
[automerger] DO NOT MERGE Prevent stack overflow in btif_storage am:
560a6244ea am:
525aee59af am:
6a0ef37a82 skipped:
4dfb42893f am:
2503636b1e am:
27d3295db2
Change-Id: Ifca7d2ba13f95f44857833299227daddbed53ea6
Android Build Merger (Role) [Thu, 26 Apr 2018 22:47:07 +0000 (22:47 +0000)]
[automerger] DO NOT MERGE Prevent stack overflow in btif_storage am:
560a6244ea am:
525aee59af am:
6a0ef37a82 skipped:
4dfb42893f am:
2503636b1e
Change-Id: I4ae296df5e8019bfb178c1c61d8eec2cac61200b
Android Build Merger (Role) [Thu, 26 Apr 2018 22:47:05 +0000 (22:47 +0000)]
[automerger] DO NOT MERGE Prevent stack overflow in btif_storage am:
560a6244ea am:
525aee59af am:
6a0ef37a82 skipped:
4dfb42893f
Change-Id: Id44112648ab9ba78c64631ae2613e154a42f15a6
Android Build Merger (Role) [Thu, 26 Apr 2018 22:47:03 +0000 (22:47 +0000)]
[automerger] DO NOT MERGE Prevent stack overflow in btif_storage am:
560a6244ea am:
525aee59af am:
6a0ef37a82
Change-Id: I718febf1f78b104c9e122a75dd9e5f94e53637a3
Android Build Merger (Role) [Thu, 26 Apr 2018 22:47:01 +0000 (22:47 +0000)]
[automerger] DO NOT MERGE Prevent stack overflow in btif_storage am:
560a6244ea am:
525aee59af
Change-Id: Ib813cfc3cba01369c9ccada373d482544fd60c16
Android Build Merger (Role) [Thu, 26 Apr 2018 22:47:00 +0000 (22:47 +0000)]
[automerger] DO NOT MERGE Prevent stack overflow in btif_storage am:
560a6244ea
Change-Id: I34d8e29615d621cdfadd2f452dd7fd67454929b7
Hansong Zhang [Thu, 26 Apr 2018 22:45:28 +0000 (15:45 -0700)]
DO NOT MERGE Prevent stack overflow in btif_storage
Bug:
73963551
Test: manual
Change-Id: I5f7a583aad150ebf9e3d492181d80ca935c8aa3f
TreeHugger Robot [Thu, 26 Apr 2018 18:34:02 +0000 (18:34 +0000)]
Merge "HFP: Fix connection colision handling" into pi-dev
TreeHugger Robot [Thu, 26 Apr 2018 18:33:57 +0000 (18:33 +0000)]
Merge "RFCOMM: Add unit tests for connection scenarios" into pi-dev
Jack He [Mon, 23 Apr 2018 00:30:14 +0000 (17:30 -0700)]
HFP: Fix connection colision handling
* When there is a connection collison, and remote device is trying to
connect to HFP server channel while we try to connect to remote's
server channel as a client. If the remote device succssfully connect
to us, we should drop our connection request to remote device and
accept remote device's connection request. As result, we will observe
1. Our connection request fails, this propagate up to Java layer and
also clean up any states in these layers
2. Remote connection request succeeds, this propagate up to Java layer
as well as a new incoming connection
* Added BTA_AG_COLLISION_EVT to formally handle AG collision in state
machine
* Modified bta_ag_resume_open to re-send BTA_AG_API_OPEN_EVT instead of
modifying the state machine state directly. State machine states
should only be modified by state machine handler
* Ignore RFCOMM open event if PORT_CheckConnection fails
* Added StackRfcommTest.TestConnectionCollision to reproduce this
scenario with 100% certainty
* Add static checks to HFP BTA state machine to make sure action and
event indices match enum sizes
Bug:
77224743
Test: connect to multiple remote devices with HFP, MAP and PBAP
StackRfcommTest.TestConnectionCollision
btestplans/details/158641/3975
Change-Id: Ib3652784b123abe195e7bd30421ef5f4345b1d4d
Merged-In: Ib3652784b123abe195e7bd30421ef5f4345b1d4d
(cherry picked from commit
88cc85a086bf90e1e669fd689276c6e658286af2)
Jack He [Sat, 21 Apr 2018 05:04:21 +0000 (22:04 -0700)]
RFCOMM: Add unit tests for connection scenarios
Unit tests:
* Add net_test_stack_rfcomm
* Use a compiler trick to compile production RFCOMM code against L2CAP
and BTM header, but fake L2CAP and BTM source code so that we can stub
statically defined L2CAP and BTM code using mocks
* Rename net_test_rfcomm to net_test_rfcomm_suite
* Add mocked L2CAP and BTM layer to allow packet replay from L2CAP layer
to RFCOMM layer in order to reproduce time dependent issues such as
connection collision
* Add a number of utility methods that generates RFCOMM packet bytes
using supported parameters
* Add unit test for above utility methods
* Add suite of unit tests named StackRfcommTest, including:
- SingleServerConnectionHelloWorld
- MultiServerPortSameDeviceHelloWorld
- SameServerPortMultiDeviceHelloWorld
- SingleClientConnectionHelloWorld
- SameClientPortMultiDeviceHelloWorld
* These tests supply L2CAP packets and API calls to trigger RFCOMM
connection setup in various scenarios
* Added logging method to output debug log via VLOG(1) logging level and
allow compile time configuration of these logs through a constant flag
Bug:
77224743
Test: ./test/run_unit_tests.sh net_test_stack_rfcomm
testplans/details/158641/3975
Change-Id: I9d59843603cd36394c3736670bcf3c39dea26674
Merged-In: I9d59843603cd36394c3736670bcf3c39dea26674
(cherry picked from commit
9b423ecfc85f22d355d9f10b347083f9d9bfe02d)
Pavlin Radoslavov [Mon, 23 Apr 2018 20:36:33 +0000 (13:36 -0700)]
Save the AVDTP version after SDP discovery and read it on reconnect
* Save the AVDTP version discovered by SDP to the device's local
configuration section with key string of "AvdtpVersion"
* Refactor tBTA_AV_SCB and hide the AVDTP version and peer address
behind get/set methods:
AvdtpVersion() / SetAvdtpVersion() / PeerAddress().
* Added new methods tBTA_AV_SCB::OnConnected() and OnDisconnected().
The former is used to setup some of the internal state when
connected to a peer: the peer address and read the stored AVDTP
version from local configuration section.
The latter is used to reset that state when disconnected
from that peer.
* Removed field tBTA_AV_SDP_RES.avdt_version because it is never
set / used.
* Removed duplicate re-definition of AVDT_VERSION inside avdt_api.h
Bug:
78142165
Test: Manual: connect/reconnect with Sennheiser MOMENTUM M2 AEBT headset
Change-Id: Ib9dcd95dc9899fa81f3cd927f127e5cb0f21ef60
Merged-In: Ib9dcd95dc9899fa81f3cd927f127e5cb0f21ef60
(cherry picked from commit
a634f4e30a28d38d5363e01a7d7b301c281f9df4)
TreeHugger Robot [Wed, 25 Apr 2018 19:33:04 +0000 (19:33 +0000)]
Merge "HSP: Keep sending RING message" into pi-dev
TreeHugger Robot [Wed, 25 Apr 2018 19:32:57 +0000 (19:32 +0000)]
Merge "Hearing Aid: Keep configuration after disconnect()" into pi-dev
Hansong Zhang [Mon, 23 Apr 2018 19:26:52 +0000 (12:26 -0700)]
Hearing Aid: Keep configuration after disconnect()
After disconnect(), the Hearing Aid service removes the device from the
white list, but retains the configuration. The Java Hearing Aid service
still knows the hiSyncId and capabilities, so it can connect() to
multiple devices at the same time
Bug:
69623109
Test: manual and unit test for Java service
Change-Id: Ic17b9be7e6a0577baecd520680abffbaf0a0dc47
(cherry picked from commit
5abb3b90f8490b1acaa8a1b634508fe61448e692)
Chenyang Zhang [Mon, 26 Mar 2018 03:21:59 +0000 (11:21 +0800)]
HSP: Keep sending RING message
Two PTS Test failed:
- HSP/AG/IAC/BV-01-I
- HSP/AG/ACR/BV-02-I
Reason:
AG didn't send the "RING" unsolicited result code to HS(PTS),
then HS can't send the "AT+CKPD=200" command to received the call.
After a while, the "FATAL ERROR (MTC): Call establishment timed out"
triggered by PTS.
Solution:
Keep sending RING message for HSP.
Bug:
77507028
Change-Id: If1288a5f7b1b7da8ecba34ed90a85a0af8a91e9a
(cherry picked from commit
039c2bd30bcecaf9b79ac8518af92c582a93b21c)
Petri Gynther [Wed, 18 Apr 2018 01:29:09 +0000 (18:29 -0700)]
A2DP offload: switch to new properties
Bug:
63932139
Bug:
76201991
Test: Manual A2DP testing (A2DP offload enabled and disabled)
Change-Id: Idcc2af40bde09758e060861ac518c06b7551212a
Merged-In: Idcc2af40bde09758e060861ac518c06b7551212a
Ajay Panicker [Thu, 19 Apr 2018 22:17:16 +0000 (15:17 -0700)]
Use weak pointers to prevent callbacks from executing after cleanup
Switch from using the instance directly to using weak pointers to the
instance. This causes any base::Callback objects that are bound to that
weak instance to be cleaned up if the weak pointer becomes invalid.
Bug:
78134184
Test: valgrind ./net_test_avrcp
--gtest_filter=*disconnectAfterCleanupTest* and see that there is an
invalid read before the fix and it is gone after.
Change-Id: I46c3175e62b87be165e468d014155f8d8154c08a
Jakub Pawlowski [Thu, 19 Apr 2018 21:19:08 +0000 (14:19 -0700)]
Get rid of BTM_IS_PUBLIC_BDA
am:
c03c56afef
Change-Id: I743c5dbba5e24c2e61a2e69fe3e7a9e4dac29673
Ajay Panicker [Tue, 17 Apr 2018 21:15:30 +0000 (14:15 -0700)]
Fix check for device lookup in map
Bug:
78134184
Test: Run host native test net_test_avrcp
Change-Id: I24877e58dd72ee592ee75bd788b35b084c4160ac
Merged-In: I24877e58dd72ee592ee75bd788b35b084c4160ac
(cherry picked from commit
8828edbca4dbc7780030ff78d9eff0f4e97354d9)
TreeHugger Robot [Wed, 18 Apr 2018 23:40:05 +0000 (23:40 +0000)]
Merge "AVRCP: Inform upper layer if absolute volume isn't supported" into pi-dev
Jakub Pawlowski [Fri, 9 Mar 2018 04:11:41 +0000 (20:11 -0800)]
Get rid of BTM_IS_PUBLIC_BDA
One can't really guess address type based on last bits.
Instead, for new devices always assume public address.
Test: scan, toggle bluetooth, try connecting to device with public
address
Bug:
74413120
Change-Id: Id558260798e717c214a5a817cea0c204c5f4858e
(cherry-picked from
8c2e78b44727789d641492beeef873b230c7e568)
(cherry picked from commit
14ef59e5a391a6dda7295ebe7d0d7c52875f76b0)
Pavlin Radoslavov [Wed, 18 Apr 2018 17:57:22 +0000 (10:57 -0700)]
Reset the A2DP coding parameters when switching codecs
Bug:
77281039
Test: Manual - connect Headset and switch codecs while playing audio
Change-Id: Icb89b0d78195fd654d66bc1334b121cf62c55be1
Merged-In: Icb89b0d78195fd654d66bc1334b121cf62c55be1
(cherry picked from commit
fe240f2e8232778c634fad4c35c29e0c5f5d1f12)
TreeHugger Robot [Wed, 18 Apr 2018 21:50:51 +0000 (21:50 +0000)]
Merge "Include only the Basic Capability for AVDTP GetCapabilities response" into pi-dev
TreeHugger Robot [Wed, 18 Apr 2018 21:50:48 +0000 (21:50 +0000)]
Merge "Fix a memory leak when disabling AVDTP" into pi-dev
TreeHugger Robot [Wed, 18 Apr 2018 21:50:45 +0000 (21:50 +0000)]
Merge "Handle properly AVDTP SetConfig from the A2DP Sink device" into pi-dev
TreeHugger Robot [Wed, 18 Apr 2018 21:49:58 +0000 (21:49 +0000)]
Merge "GATT: fix 32 bit UUID handling" into pi-dev
Andre Eisenbach [Wed, 18 Apr 2018 19:50:54 +0000 (19:50 +0000)]
Merge "Enable the AVRCP Service by default (2/2)" into pi-dev
Jakub Pawlowski [Thu, 12 Apr 2018 12:42:31 +0000 (05:42 -0700)]
GATT: fix 32 bit UUID handling
When writing UUID into stream with gatt_build_uuid_to_stream, we always
use 16bit or 128bit representation. In GATT code returning service UUID,
we were returning 32bit representation lenght, even though 128bit
representation was being returned in the stream. This resulted in
invalid GATT database content being returned, and the service not being
visible.
Bug:
66912853
Test: create GATT database with 32bit UUID, discover from remote device
Change-Id: I791a518ab080bd99db0a8be18d97e865c838fc7e
(cherry picked from
f107e4f9e841152e5b94fa2f9d68c558d8c1b055)
edheyl [Wed, 18 Apr 2018 04:04:08 +0000 (04:04 +0000)]
Revert "Fix check for device lookup in map"
This reverts commit
149acbcbec1ebd600fcd7e3fc4512e8f29451c1f.
Reason for revert: build breakage, lack of response
Change-Id: I053b718c670366d80d240a2f66b599e9d5740abc
Pavlin Radoslavov [Sat, 14 Apr 2018 05:07:30 +0000 (22:07 -0700)]
Include only the Basic Capability for AVDTP GetCapabilities response
AVDTP GetCapabilities request should return only the Basic
Capabilities, as defined in the AVDTP 1.3 spec.
Otherwise, returning a capability such as Delay Reporting would
result in some remote devices droping the AVDTP connection
Also:
* Print SEP protocol service capabilities per Stream Control
Block when dumping the state to a bugreport
* Add extra log messages
Bug:
77668253
Test: Manual: connect with Momentum M2 Headset and examine the
AVDTP GetCapabilities response.
Change-Id: I34f2e8ff586115a38c3436b2b6300514f65346a9
Merged-In: I34f2e8ff586115a38c3436b2b6300514f65346a9
(cherry picked from commit
148a10d424bd31e8cfa73ed450fdca6af2e92021)
Pavlin Radoslavov [Tue, 10 Apr 2018 01:01:41 +0000 (18:01 -0700)]
Handle properly AVDTP SetConfig from the A2DP Sink device
If the remote device is proactive and sends AVDTP SetConfig after
re-connection before the local device gets the chance to do it, the
internal codec setup state might be inconsistent.
* Fix the internal logic when the local device is Acceptor inside
file bta_av_co.cc, and simplify some of the code.
* Fix the handling of p_scb->sep_info_idx inside bta_av_save_caps()
when receiving capabilities from the remote device.
* Add new A2dpCodecConfig::setPeerCodecCapabilities() method that is
implemented by each codec.
Bug:
77525584
Test: Manual - initiate connection by Momentum 2.0 Wireless Headset.
Connect/disconnect/reconnect multiple headsets.
Change-Id: I456df7c8a2fa0758c0908a4628c4dfae3259dbdb
Merged-In: I456df7c8a2fa0758c0908a4628c4dfae3259dbdb
(cherry picked from commit
d5a053208998dc21e2d6c9e69451c31aa62298c6)
Pavlin Radoslavov [Sat, 14 Apr 2018 02:57:25 +0000 (19:57 -0700)]
Fix a memory leak when disabling AVDTP
Added new function bta_av_free_scb() to explicitly
free tBTA_AV_SCB struct.
Bug:
78034873
Test: Code compilation
Change-Id: Ic738c64f61fd273bc2988fa98cb7cedebf1c4b76
Merged-In: Ic738c64f61fd273bc2988fa98cb7cedebf1c4b76
(cherry picked from commit
b4bd9ee17e242be9a8707246e2e9346e66bc8b1f)
Ajay Panicker [Fri, 13 Apr 2018 18:49:34 +0000 (11:49 -0700)]
AVRCP: Inform upper layer if absolute volume isn't supported
Before, the upper layers would be informed when a device connected that
supported absolute volume. Now even devices that don't support absolute
volume get reported.
Bug:
33962015
Test: Run host native test net-test-avrcp
Change-Id: If083ccbb9ba9a170c5bca359e632585d826c6fa5
(cherry picked from commit
ca050dac60cef5f5eaffaeca9f7913fa00f77a0c)
Ajay Panicker [Tue, 17 Apr 2018 21:15:30 +0000 (14:15 -0700)]
Fix check for device lookup in map
Bug:
78134184
Test: Run host native test net_test_avrcp
Change-Id: I57dd0040aa0e97f623cff97a28dc98e196414559
Jakub Pawlowski [Mon, 16 Apr 2018 14:55:06 +0000 (07:55 -0700)]
GATT: make last service end group handle equal to 0xFFFF
ESR06 (errata 4065) added sentence:
"The End Group Handle of the last service in a device can be 0xFFFF."
It talks about last service, not last primary service. Right now,
secondary service added after last primary service will result in in
last primary service being corrupted - descriptor added to last
characteristic, and some characteristics added.
Bug:
78107486
Change-Id: I6a146fce2c946cdff176ff79f147830e29d3b807
(cherry picked from
4c6007cfc42efbb7f6fb9bd1dc6c609f68ccd9a6)
TreeHugger Robot [Tue, 17 Apr 2018 03:30:31 +0000 (03:30 +0000)]
Merge "A2DP Offload: Handle init/deinit as part of start/end session" into pi-dev
Calin Juravle [Tue, 17 Apr 2018 01:10:50 +0000 (18:10 -0700)]
[automerger skipped] Merge "DO NOT MERGE SMP: Revert "DO NOT MERGE SMP: Validate remote elliptic curve points"" into oc-dev am:
94f279c8f4 am:
ae7de28fbe
am:
c6bc5705c0 -s ours
Change-Id: I1859c114ef6509f6d49032b07776450c7b932021
Calin Juravle [Tue, 17 Apr 2018 01:06:24 +0000 (18:06 -0700)]
Merge "DO NOT MERGE SMP: Revert "DO NOT MERGE SMP: Validate remote elliptic curve points"" into oc-dev am:
94f279c8f4
am:
ae7de28fbe
Change-Id: I0dcfcbb28e759d18bfb6eedc83a7fde04fbdf796
Calin Juravle [Tue, 17 Apr 2018 01:01:54 +0000 (18:01 -0700)]
Merge "DO NOT MERGE SMP: Revert "DO NOT MERGE SMP: Validate remote elliptic curve points"" into oc-dev
am:
94f279c8f4
Change-Id: I824ee80b3f0a8331d3f712ff313be1fdd93b77b7
Calin Juravle [Tue, 17 Apr 2018 00:54:05 +0000 (00:54 +0000)]
Merge "DO NOT MERGE SMP: Revert "DO NOT MERGE SMP: Validate remote elliptic curve points"" into oc-dev
Calin Juravle [Mon, 16 Apr 2018 23:57:34 +0000 (23:57 +0000)]
DO NOT MERGE SMP: Revert "DO NOT MERGE SMP: Validate remote elliptic curve points"
This reverts commit
e11ebfc21963ae905d58c034310efeca0e7cd2ee.
Reason for revert: breaks oc-mr1 build
BUG:
72377774
Change-Id: If14987041ba6b68ca00170b53b3942725615ff8d
Satish kumar sugasi [Tue, 3 Apr 2018 19:09:41 +0000 (12:09 -0700)]
A2DP Offload: Handle init/deinit as part of start/end session
Bug:
77289942
Test: Manual
Change-Id: I5b7ca6e485788d69f574bb74d2ef423507b183ff
Merged-In: I5b7ca6e485788d69f574bb74d2ef423507b183ff
(cherry picked from commit
86c58a09b82420967998a3f78ed7c770b0331c91)
TreeHugger Robot [Mon, 16 Apr 2018 22:13:09 +0000 (22:13 +0000)]
Merge "A2DP Offload: Fix the default LDAC bitrate" into pi-dev
Andre Eisenbach [Mon, 16 Apr 2018 20:53:42 +0000 (13:53 -0700)]
[automerger skipped] [automerger] DO NOT MERGE SMP: Validate remote elliptic curve points am:
94dd5564d8 am:
13113597ed am:
7d660ff9bf skipped:
f5be85f852 am:
b86ae24aef am:
8c86c0c1da am:
a4755cf297 am:
cbf0dca767 skipped:
775ea97ce3 am:
1077237837 am:
32b5917cd2
am:
10ba01bbef -s ours
Change-Id: Iabfe5f0b668032fb9f5b083a2544a2c856938722
Andre Eisenbach [Mon, 16 Apr 2018 20:53:26 +0000 (13:53 -0700)]
[automerger skipped] [automerger] DO NOT MERGE SMP: Validate remote elliptic curve points am:
0b036a5525 am:
96e39c15ce skipped:
0c4e21ec13 am:
4c2c4dade5 am:
2c2804d3ed am:
6d8e884c75 am:
4e7049f54b skipped:
f7d79a01d8 am:
502686433c am:
5ae2cc72fb
am:
dad6e47b0f -s ours
Change-Id: I6a126b541a4e636a225a4a37ed6bfdb0c8867378
Andre Eisenbach [Mon, 16 Apr 2018 20:48:55 +0000 (13:48 -0700)]
[automerger skipped] [automerger] DO NOT MERGE SMP: Validate remote elliptic curve points am:
1a9023fffb am:
399a1b955b am:
9be00e438f am:
6c342395e7 skipped:
ad8199c153 am:
e28b070c4f am:
38e73feb8e
am:
e81eb688ea -s ours
Change-Id: I56db51e22c4593bc814213fab2f7287d3da853bb
Andre Eisenbach [Mon, 16 Apr 2018 20:27:21 +0000 (13:27 -0700)]
[automerger] DO NOT MERGE SMP: Validate remote elliptic curve points am:
94dd5564d8 am:
13113597ed am:
7d660ff9bf skipped:
f5be85f852 am:
b86ae24aef am:
8c86c0c1da am:
a4755cf297 am:
cbf0dca767 skipped:
775ea97ce3 am:
1077237837
am:
32b5917cd2
Change-Id: Id50274228201e77300aa60055b21d33f4ccdda24
Andre Eisenbach [Mon, 16 Apr 2018 20:26:58 +0000 (13:26 -0700)]
[automerger] DO NOT MERGE SMP: Validate remote elliptic curve points am:
0b036a5525 am:
96e39c15ce skipped:
0c4e21ec13 am:
4c2c4dade5 am:
2c2804d3ed am:
6d8e884c75 am:
4e7049f54b skipped:
f7d79a01d8 am:
502686433c
am:
5ae2cc72fb
Change-Id: I480bc2813f337bd3a7e46c43350c0b5b4180c1bd
Andre Eisenbach [Mon, 16 Apr 2018 20:26:36 +0000 (13:26 -0700)]
[automerger] DO NOT MERGE SMP: Validate remote elliptic curve points am:
1a9023fffb am:
399a1b955b am:
9be00e438f am:
6c342395e7 skipped:
ad8199c153 am:
e28b070c4f
am:
38e73feb8e
Change-Id: I0a4785b233684d0c286e092c5d4d707ba3294558
Andre Eisenbach [Mon, 16 Apr 2018 20:21:31 +0000 (13:21 -0700)]
[automerger] DO NOT MERGE SMP: Validate remote elliptic curve points am:
94dd5564d8 am:
13113597ed am:
7d660ff9bf skipped:
f5be85f852 am:
b86ae24aef am:
8c86c0c1da am:
a4755cf297 am:
cbf0dca767 skipped:
775ea97ce3
am:
1077237837
Change-Id: I7fa3cea0b1140f0391075d71522ea26f42e30d44
Andre Eisenbach [Mon, 16 Apr 2018 20:21:10 +0000 (13:21 -0700)]
[automerger] DO NOT MERGE SMP: Validate remote elliptic curve points am:
0b036a5525 am:
96e39c15ce skipped:
0c4e21ec13 am:
4c2c4dade5 am:
2c2804d3ed am:
6d8e884c75 am:
4e7049f54b skipped:
f7d79a01d8
am:
502686433c
Change-Id: I787c2fa71adce021be2165ba450bd6c15f7db4eb
Andre Eisenbach [Mon, 16 Apr 2018 20:20:50 +0000 (13:20 -0700)]
[automerger] DO NOT MERGE SMP: Validate remote elliptic curve points am:
1a9023fffb am:
399a1b955b am:
9be00e438f am:
6c342395e7 skipped:
ad8199c153
am:
e28b070c4f
Change-Id: If22296caf1344c4f79ded10842bca65ddb8d2530
Android Build Merger (Role) [Mon, 16 Apr 2018 20:10:06 +0000 (20:10 +0000)]
[automerger] DO NOT MERGE SMP: Validate remote elliptic curve points am:
94dd5564d8 am:
13113597ed am:
7d660ff9bf skipped:
f5be85f852 am:
b86ae24aef am:
8c86c0c1da am:
a4755cf297 am:
cbf0dca767 skipped:
775ea97ce3
Change-Id: Idd464930b9d893647b40a9b14b3ddc692802dac5
Android Build Merger (Role) [Mon, 16 Apr 2018 20:10:04 +0000 (20:10 +0000)]
[automerger] DO NOT MERGE SMP: Validate remote elliptic curve points am:
94dd5564d8 am:
13113597ed am:
7d660ff9bf skipped:
f5be85f852 am:
b86ae24aef am:
8c86c0c1da am:
a4755cf297 am:
cbf0dca767
Change-Id: Ifdf9d93f1e14ee8424aac0131035d1f3a735ff0a
Android Build Merger (Role) [Mon, 16 Apr 2018 20:10:03 +0000 (20:10 +0000)]
[automerger] DO NOT MERGE SMP: Validate remote elliptic curve points am:
94dd5564d8 am:
13113597ed am:
7d660ff9bf skipped:
f5be85f852 am:
b86ae24aef am:
8c86c0c1da am:
a4755cf297
Change-Id: Ic16109cfa49ba248ef79e511e3664cd6fb2056e9
Android Build Merger (Role) [Mon, 16 Apr 2018 20:10:01 +0000 (20:10 +0000)]
[automerger] DO NOT MERGE SMP: Validate remote elliptic curve points am:
94dd5564d8 am:
13113597ed am:
7d660ff9bf skipped:
f5be85f852 am:
b86ae24aef am:
8c86c0c1da
Change-Id: Ic874ee0e6d4cb4e92effb6cc75580dc7b10acc59
Android Build Merger (Role) [Mon, 16 Apr 2018 20:09:59 +0000 (20:09 +0000)]
[automerger] DO NOT MERGE SMP: Validate remote elliptic curve points am:
94dd5564d8 am:
13113597ed am:
7d660ff9bf skipped:
f5be85f852 am:
b86ae24aef
Change-Id: I4894c6bd85e9e602b0f1fe34fcc06aa5a1b41388
Android Build Merger (Role) [Mon, 16 Apr 2018 20:09:58 +0000 (20:09 +0000)]
[automerger] DO NOT MERGE SMP: Validate remote elliptic curve points am:
94dd5564d8 am:
13113597ed am:
7d660ff9bf skipped:
f5be85f852
Change-Id: I09c7fbeb8ca3814d2c91aac744ca5c91fa8e34c4
Android Build Merger (Role) [Mon, 16 Apr 2018 20:09:57 +0000 (20:09 +0000)]
[automerger] DO NOT MERGE SMP: Validate remote elliptic curve points am:
94dd5564d8 am:
13113597ed am:
7d660ff9bf
Change-Id: I6a6369b2bac96ef4926969b5909e85026553aff8
Android Build Merger (Role) [Mon, 16 Apr 2018 20:09:56 +0000 (20:09 +0000)]
[automerger] DO NOT MERGE SMP: Validate remote elliptic curve points am:
94dd5564d8 am:
13113597ed
Change-Id: Ia7b054ec720067d2b84d8e10f768fa92eb802008
Android Build Merger (Role) [Mon, 16 Apr 2018 20:09:54 +0000 (20:09 +0000)]
[automerger] DO NOT MERGE SMP: Validate remote elliptic curve points am:
94dd5564d8
Change-Id: Ib7066a2e0075b02ba1d1400b559287e3eef08200
Andre Eisenbach [Wed, 4 Apr 2018 20:38:38 +0000 (13:38 -0700)]
DO NOT MERGE SMP: Validate remote elliptic curve points
Fixes:
72377774
Test: net_test_stack_smp (where applicable)
Change-Id: Iefcf97364493467075fadefd77d12716f71cd4f6
(cherry picked from commit
9181ec28da94705a763edbe60bd2a87e5f882beb)
Android Build Merger (Role) [Mon, 16 Apr 2018 20:09:03 +0000 (20:09 +0000)]
[automerger] DO NOT MERGE SMP: Validate remote elliptic curve points am:
0b036a5525 am:
96e39c15ce skipped:
0c4e21ec13 am:
4c2c4dade5 am:
2c2804d3ed am:
6d8e884c75 am:
4e7049f54b skipped:
f7d79a01d8
Change-Id: I07574dac78d1be4aef5a3154b2001c3cd239bad6
Android Build Merger (Role) [Mon, 16 Apr 2018 20:09:02 +0000 (20:09 +0000)]
[automerger] DO NOT MERGE SMP: Validate remote elliptic curve points am:
0b036a5525 am:
96e39c15ce skipped:
0c4e21ec13 am:
4c2c4dade5 am:
2c2804d3ed am:
6d8e884c75 am:
4e7049f54b
Change-Id: Ie238d797d89b25c5bf2cf6e84427773f1b76285c
Android Build Merger (Role) [Mon, 16 Apr 2018 20:09:01 +0000 (20:09 +0000)]
[automerger] DO NOT MERGE SMP: Validate remote elliptic curve points am:
0b036a5525 am:
96e39c15ce skipped:
0c4e21ec13 am:
4c2c4dade5 am:
2c2804d3ed am:
6d8e884c75
Change-Id: Idc6489856bef71c96be1105a058e9ce1226f90de
Android Build Merger (Role) [Mon, 16 Apr 2018 20:08:59 +0000 (20:08 +0000)]
[automerger] DO NOT MERGE SMP: Validate remote elliptic curve points am:
0b036a5525 am:
96e39c15ce skipped:
0c4e21ec13 am:
4c2c4dade5 am:
2c2804d3ed
Change-Id: I9cd2497707fba6486827447412b14916f59ea92d
Android Build Merger (Role) [Mon, 16 Apr 2018 20:08:58 +0000 (20:08 +0000)]
[automerger] DO NOT MERGE SMP: Validate remote elliptic curve points am:
0b036a5525 am:
96e39c15ce skipped:
0c4e21ec13 am:
4c2c4dade5
Change-Id: Iacb795d8e741d01d8c81c95657174f2fb43142c5
Android Build Merger (Role) [Mon, 16 Apr 2018 20:08:56 +0000 (20:08 +0000)]
[automerger] DO NOT MERGE SMP: Validate remote elliptic curve points am:
0b036a5525 am:
96e39c15ce skipped:
0c4e21ec13
Change-Id: I3d83c500f4504773a3d9160d984ef91aeaa63d36
Android Build Merger (Role) [Mon, 16 Apr 2018 20:08:55 +0000 (20:08 +0000)]
[automerger] DO NOT MERGE SMP: Validate remote elliptic curve points am:
0b036a5525 am:
96e39c15ce
Change-Id: I552dd39875722ac041979c4cce15e378cab32d5a
Android Build Merger (Role) [Mon, 16 Apr 2018 20:08:53 +0000 (20:08 +0000)]
[automerger] DO NOT MERGE SMP: Validate remote elliptic curve points am:
0b036a5525
Change-Id: I855b3b72659643947a5d28f01ac37dd6ab920a4f
Andre Eisenbach [Wed, 4 Apr 2018 20:38:38 +0000 (13:38 -0700)]
DO NOT MERGE SMP: Validate remote elliptic curve points
Fixes:
72377774
Test: net_test_stack_smp (where applicable)
Change-Id: Iefcf97364493467075fadefd77d12716f71cd4f6
(cherry picked from commit
9181ec28da94705a763edbe60bd2a87e5f882beb)
Android Build Merger (Role) [Mon, 16 Apr 2018 20:08:03 +0000 (20:08 +0000)]
[automerger] DO NOT MERGE SMP: Validate remote elliptic curve points am:
1a9023fffb am:
399a1b955b am:
9be00e438f am:
6c342395e7 skipped:
ad8199c153
Change-Id: If9b1cbddc778b067b12524d1785b917ae0768190