OSDN Git Service
Marie Janssen [Mon, 5 Dec 2016 22:59:03 +0000 (22:59 +0000)]
Merge "JNI: style cleanup"
Marie Janssen [Wed, 30 Nov 2016 19:20:25 +0000 (11:20 -0800)]
JNI: style cleanup
Beginning of style cleanup:
- no assigns in conditionals
- move declarations closer to first use
- replace __FUNCTION__ with __func__
- remove unnecessary gotos
Test: mma && manual sanity tests
Change-Id: I7f8fca01dd57f57538b71fe7d7753fffe1de4d00
ltrochtova [Thu, 1 Dec 2016 21:20:42 +0000 (21:20 +0000)]
Merge "Revert "AdapterService: enforce new user restriction for disallowing Bluetooth.""
Treehugger Robot [Thu, 1 Dec 2016 21:10:59 +0000 (21:10 +0000)]
Merge "Fix null settings in AdvertiseCallback.onStartSuccess"
ltrochtova [Thu, 1 Dec 2016 20:48:06 +0000 (20:48 +0000)]
Revert "AdapterService: enforce new user restriction for disallowing Bluetooth."
This reverts commit
1f802f2473b5f8b8a401bcd9c7273d21b27d4bc2.
Change-Id: Ic5ffcf4e1ad9d024646363fa83094997058dd05b
Jakub Pawlowski [Thu, 1 Dec 2016 17:21:06 +0000 (09:21 -0800)]
Fix null settings in AdvertiseCallback.onStartSuccess
Test: acts FilteringTest
Bug:
33171815
Bug:
30622771
Change-Id: Ib3df1d13535999ede0e820651fc6d69daeb8ef17
ltrochtova [Thu, 1 Dec 2016 13:40:28 +0000 (13:40 +0000)]
Merge "AdapterService: enforce new user restriction for disallowing Bluetooth."
Lenka Trochtova [Thu, 24 Nov 2016 15:54:17 +0000 (16:54 +0100)]
AdapterService: enforce new user restriction for disallowing Bluetooth.
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.UserRestrictionsTest
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.DeviceOwnerTest#testBluetoothRestriction
Bug:
32895300
Change-Id: I9bc69b4f4886e9d61574ed1a717371d035eb9776
Sanket Agarwal [Wed, 30 Nov 2016 01:23:42 +0000 (01:23 +0000)]
Merge "Add Bluetooth device address parameter to HF Client APIs"
Sanket Agarwal [Mon, 28 Nov 2016 23:53:06 +0000 (15:53 -0800)]
Add Bluetooth device address parameter to HF Client APIs
Bug:
30984220
Test: SL4A tests for HFP
Change-Id: Ic03dd8fab87c3ed7ea83a617fc18426427020182
Sanket Agarwal [Tue, 29 Nov 2016 22:27:37 +0000 (22:27 +0000)]
Merge "Disable HFP audio path when HFP call goes on hold/resume when goes off hold"
Christine Hallstrom [Thu, 27 Oct 2016 20:14:08 +0000 (13:14 -0700)]
Disable HFP audio path when HFP call goes on hold/resume when goes off hold
This fixes the issue where a cellular call made to a watch when an
HFP call is in progress causes the cellular audio to go through the
HFP path.
Bug:
32164561
Change-Id: I179ba4e1f1a1e76496f3062cc29bc20014fe5661
(cherry picked from commit
3ee63fdfb7fa5896bff7e172be60c763919c9f63)
Treehugger Robot [Mon, 28 Nov 2016 20:38:04 +0000 (20:38 +0000)]
Merge "Cleanup startAdvertising call"
Jakub Pawlowski [Wed, 23 Nov 2016 19:43:37 +0000 (11:43 -0800)]
Cleanup startAdvertising call
AdvertiseManager.startAdvertising no longer sends multiple commands.
Its native counterpart, BleAdvertisingManagerImpl.RegisterAdvertiser,
thanks to better tests, guarantees that it either sends a success or
error callback. Therefore, no additional synchronization is required.
The only cases when the native code can get executed without a callback
are when the controller sends no response, or the bta thread is stuck.
Both of those cases should result in a crash and restart of bluetooth.
This patch also fixes an error, where if a timeout happens, the error
callback gets called twice.
Bug:
30622771
Test: sl4a ConcurrentBleAdvertising
Change-Id: I72a729f4da2bd8d5d62a81a6f93dbadab088a036
Treehugger Robot [Wed, 23 Nov 2016 01:51:51 +0000 (01:51 +0000)]
Merge "Remove unnecessary advertiser count check"
Jakub Pawlowski [Tue, 22 Nov 2016 23:46:51 +0000 (15:46 -0800)]
Remove unnecessary advertiser count check
Bluetooth stack won't allow to register more advertisers that it can
handle, so checking count of registered advertisers make no sense when
calling startAdvertising.
Bug:
30622771
Test: sl4a ConcurrentBleAdvertisingTest
Change-Id: Ifbaf583871cf59ce8e345d7bca8e9a9ea1540734
Treehugger Robot [Sat, 19 Nov 2016 04:06:33 +0000 (04:06 +0000)]
Merge "Move tests from */bluetooth/test/* to */bluetooth/*"
Jakub Pawlowski [Fri, 18 Nov 2016 23:17:11 +0000 (15:17 -0800)]
Move tests from */bluetooth/test/* to */bluetooth/*
Right now the folder structure is not in sync with package names.
Change-Id: I0458795a68ba32c0ebec6721f7688ca4e6ff0b1d
Treehugger Robot [Sat, 19 Nov 2016 02:33:01 +0000 (02:33 +0000)]
Merge "Move some AdvertiseManager methods into separate helper"
Jakub Pawlowski [Fri, 18 Nov 2016 23:09:41 +0000 (15:09 -0800)]
Move some AdvertiseManager methods into separate helper
This patch is moving some methods from AdvertiseManager into a
AdvertiseHelper. This is a preparation to add tests to
advertiseDataToBytes and others.
Bug:
30622771
Test: sl4a ConcurrentBleAdvertisingTest BleAdvertiseApiTest
Change-Id: I41f857379c892f76a5cec807879722764ef3cfa7
Jakub Pawlowski [Fri, 18 Nov 2016 22:28:55 +0000 (22:28 +0000)]
Merge "Move startAdvertising() logic into native code (1/3)"
Jakub Pawlowski [Thu, 17 Nov 2016 21:17:04 +0000 (13:17 -0800)]
Move startAdvertising() logic into native code (1/3)
AdvertiseManager.startAdvertising() was implemented in Java layer for
historical reasons. Now that we have nice native callbacks and tests,
it can be moved into native code, where it will be shared between
Android daemon and bluetoothtbd.
Bug:
30622771
Test: native tests added to cover startAdvertising
Change-Id: Ifee1fc74ad3e749ffc0c6a734e450c540b5b59bb
Jakub Pawlowski [Wed, 16 Nov 2016 21:40:35 +0000 (21:40 +0000)]
Merge "Fix NPE in createBond"
Jakub Pawlowski [Wed, 16 Nov 2016 18:29:17 +0000 (10:29 -0800)]
Fix NPE in createBond
Bug:
32925925
Test: initiate bonding locally using NFC OOB
Change-Id: I9aadea84e9e2e57cf75c02affa618eb37a33a767
Treehugger Robot [Tue, 15 Nov 2016 22:21:46 +0000 (22:21 +0000)]
Merge "Protect against SQLiteException crash in MAP init"
Ajay Panicker [Thu, 10 Nov 2016 01:11:40 +0000 (17:11 -0800)]
Protect against SQLiteException crash in MAP init
Bug:
32717472
Test: runtest bluetooth
Change-Id: I533d7ca0b281291f931f4aca271ea9ff3214bdf2
Treehugger Robot [Tue, 15 Nov 2016 04:23:44 +0000 (04:23 +0000)]
Merge "Use ENTERPRISE_CONTENT_FILTER_URI for phone lookup URI"
Yoshiharu Kurita [Mon, 7 Dec 2015 13:30:15 +0000 (22:30 +0900)]
Use ENTERPRISE_CONTENT_FILTER_URI for phone lookup URI
To retrieve not only personal caller-id but also corporate caller-id,
we need to use ENTERPRISE_CONTENT_FILTER_URI for phone lookup URI
instead of CONTENT_FILTER_URI.
This modification is required by Android for Work.
Bug:
28947490
Change-Id: Iee51c1bebf8ee41668bec305cf37d2cdfdda5e2e
Jakub Pawlowski [Fri, 11 Nov 2016 23:33:14 +0000 (23:33 +0000)]
Merge "Unify advertising API (3/3)"
Treehugger Robot [Thu, 10 Nov 2016 20:00:50 +0000 (20:00 +0000)]
Merge "BLE OOB Pairing - parse address type (3/5)"
Jakub Pawlowski [Thu, 10 Nov 2016 00:47:21 +0000 (16:47 -0800)]
BLE OOB Pairing - parse address type (3/5)
When address type is not parsed, creating bond to devices not using
random address is impossible.
Bug:
32780409
Test: try pairing with nRF52DK using random address
Change-Id: Ifae63995e5ffb3a5071d0c993a0e15c0b6e8a7eb
Jakub Pawlowski [Fri, 4 Nov 2016 19:06:30 +0000 (12:06 -0700)]
Unify advertising API (3/3)
This patch unifies advertising API. On startup, if VSC multi advertising
is avaliable, it will be used, otherwise
BleAdvertiserLegacyHciInterfaceImpl will be used, which provides one
advertising instance.
Test: sl4a tests are passing, all proper tests updated accordingly
Change-Id: I899ed51bf4e747e1e3ff1a472a55f060249cbb75
Jakub Pawlowski [Fri, 4 Nov 2016 22:24:34 +0000 (22:24 +0000)]
Merge "Don't override target to 32 for Bluetooth"
Jakub Pawlowski [Thu, 3 Nov 2016 20:50:44 +0000 (13:50 -0700)]
Don't override target to 32 for Bluetooth
Change-Id: I1f72dec4376bb55e72d15df5af548cf4ce123c31
Chris Manton [Thu, 3 Nov 2016 19:57:55 +0000 (19:57 +0000)]
Merge "BLE Check and send scan response data"
Sanket Agarwal [Wed, 2 Nov 2016 05:23:06 +0000 (05:23 +0000)]
Merge changes I7f2e3ac0,Ibcd26731,I9ac5121c,Ie9135167,Ib02c74c7, ...
* changes:
Fixing A2dpSinkStreamingStateMachine thread leak.
Now Playing List gets stuck in a loop
MAP Client connect after PBAP Client
MAP MCE iPhone connectivity
MAP MCE disconnecting automatically
MAP MCE message filtering
Set debug flags to false
Ram Periathiruvadi [Fri, 14 Oct 2016 19:50:45 +0000 (12:50 -0700)]
Fixing A2dpSinkStreamingStateMachine thread leak.
A2dpSinkStreamingStateMachine was being created on every Connection
leading to a leak. Fix is to Quit the A2dpSinkStreamingStateMachine
on A2dpSinkStateMachine's Quit() and create a new Streaming
StateMachine only if it is null.
Note that both the Sink and SinkStreaming State machines quit only
on Adapter off, not on BT disconnect.
Bug: b/
32097580
Tested: On Mojave and Angler with bat_mas-userdebug
Change-Id: I7f2e3ac01ce5ff965afe407e3605cac00497af36
(cherry picked from commit
af41a720081dd4e9d12e1b3f082e9202ae84252d)
Sanket Agarwal [Wed, 12 Oct 2016 09:41:30 +0000 (02:41 -0700)]
Now Playing List gets stuck in a loop
We are incorrectly setting the status of the Now Playing List folder to
uncached which makes it fetch the folder in a loop if there is possible
pagination going on
Bug: b/
32051433
Change-Id: Ibcd26731c7ed4ac24d816c2f4529970e3a2f29cd
(cherry picked from commit
ffded42f4a30a399738f23a4d36068e484fea8cb)
Joseph Pirozzo [Thu, 13 Oct 2016 20:47:54 +0000 (13:47 -0700)]
MAP Client connect after PBAP Client
Add code to automatically attempt to connect MAP Client (if enabled)
after PBAP Client connects. This will typically be invoked at system or
adapter reset, but could as well happen if MAP Client isn't connected
and a new PBAP connection is established.
Bug:
32153228
Change-Id: I9ac5121ccf0d7ef3e5847df32034094e085aa434
(cherry picked from commit
46873217f3ddb8b848ce0b8fdf4a0531dfb04224)
Joseph Pirozzo [Thu, 13 Oct 2016 16:59:56 +0000 (09:59 -0700)]
MAP MCE iPhone connectivity
iPhones do not fill in the tel: field in the originators vCard upon
receipt of a text message, this was causing parsing to fail as it was
assumed that every SMS message will have an associated phone number.
Updated logic to check fields more riggorously.
Bug:
32110763
Change-Id: Ie9135167ad957a2a8054ea414d3e9ec576d3271b
(cherry picked from commit
b2e57a501b1719406776c795cfed4fd271707d79)
Joseph Pirozzo [Tue, 11 Oct 2016 20:36:49 +0000 (13:36 -0700)]
MAP MCE disconnecting automatically
Disconnect commands were getting queued even if bluetooth wasn't
connected. This would cause the disconnect command to get processed
immediately after the connection succeeded. Updated logic to defer all
commands while "Connecting" or "Disconnecting" throw out any disconnect
commands at the head of the queue while "Disconnected" and generate
implied disconnect commands when a connect command arived while already
Connected.
Bug:
32080718
Change-Id: Ib02c74c753e88cf4876835ee8e5e0c8f2a6ebc34
(cherry picked from commit
2e8805b2ad2e8b70fb82fde37498922c92d15cb6)
Joseph Pirozzo [Fri, 7 Oct 2016 01:27:00 +0000 (18:27 -0700)]
MAP MCE message filtering
Remove message filtering from getUnreadMessages to allow all message
types supported by the MAS Server to be sent.
Bug:
32004537
Change-Id: Id88401bd290c3a33deb99da3d1673becebe40c7f
(cherry picked from commit
625bb6b6ad191d128b1404f457225cb94b7e70f4)
Sanket Agarwal [Thu, 6 Oct 2016 19:53:59 +0000 (12:53 -0700)]
Set debug flags to false
- Reduces the log spam
- Eliminates any PII information in the logs
Bug: b/
31811551
Change-Id: I5c421ad50706043765ef3e82cb37a44d520ecb6e
(cherry picked from commit
8964818100fb71fa1f962aeb55fc1dd54e7a9fbd)
Treehugger Robot [Wed, 2 Nov 2016 04:11:07 +0000 (04:11 +0000)]
Merge "PBAP Logging"
Joseph Pirozzo [Thu, 6 Oct 2016 19:06:40 +0000 (12:06 -0700)]
PBAP Logging
Move information about how many entries were synced to VDBG (and
disable) to protect any possible PII in logs.
Bug:
31855210
Change-Id: I67b0566d063411997ffda926cecd2e889f309b13
(cherry picked from commit
ec955102ce72d61635f9eca1d904d803698949ac)
Treehugger Robot [Wed, 2 Nov 2016 01:18:18 +0000 (01:18 +0000)]
Merge "Protect against adding a null config for the BT health profile"
Sanket Agarwal [Wed, 2 Nov 2016 00:54:57 +0000 (00:54 +0000)]
Merge "MAP MCE"
Joseph Pirozzo [Fri, 19 Aug 2016 20:23:41 +0000 (13:23 -0700)]
MAP MCE
Message Access Profile Client code. Supports Message Notification
Service server and Message Access Service Client for sending messages
and receiving new messages and retrieving unread messages.
Bug:
30467210
Change-Id: Ia4f27f11acbbcb5975d85344f0c19be3d1975b66
(cherry picked from commit
7765761c05e1cb2231198e7b9dccba5254c0cf75)
Ajay Panicker [Tue, 1 Nov 2016 18:25:10 +0000 (11:25 -0700)]
Protect against adding a null config for the BT health profile
Bug:
25340134
Test: Manual and UnitTest
Change-Id: I595a61050c88787d79db2527aa4387966680e166
Treehugger Robot [Tue, 1 Nov 2016 23:12:21 +0000 (23:12 +0000)]
Merge "Implement new API for retrieving supported Bluetooth profiles."
Jakub Pawlowski [Tue, 1 Nov 2016 22:30:42 +0000 (22:30 +0000)]
Merge "Move start advertise method to advertising interface (1/3)"
Chris Manton [Tue, 1 Nov 2016 03:48:42 +0000 (20:48 -0700)]
BLE Check and send scan response data
If there is scan response data, load it up during
when start advertising. The current stack does
not provide callback for these calls.
Bug:
32539880
Test: Verified scan response occurs with CL
Change-Id: I33effbf3aa3a60c3353d4ca7708ea06df8a05a7d
Bryce Lee [Sun, 9 Oct 2016 19:58:54 +0000 (12:58 -0700)]
Implement new API for retrieving supported Bluetooth profiles.
Bug:
26451648
Change-Id: I552882034e0289b643377d14bac4fb01c9018046
(cherry picked from commit
b7e2f972a0633b4d8c8843d025819d61e71053e7)
Sanket Agarwal [Tue, 1 Nov 2016 21:44:27 +0000 (21:44 +0000)]
Merge "Fix connection state broadcasts"
Sanket Agarwal [Tue, 4 Oct 2016 20:39:00 +0000 (13:39 -0700)]
Fix connection state broadcasts
- HFP was flipping states in case of timeout
- A2DP was not sending a disconnect when the native changed its mind
about which device was actually connected
Change-Id: Ic89292fe0d6730b8bbbc4746f8e5afabcd59a943
(cherry picked from commit
d7e1c13d177fac7d6ef1dd36663f362470372070)
Sanket Agarwal [Tue, 1 Nov 2016 21:43:50 +0000 (21:43 +0000)]
Merge "Return bool in AVRCP Controller API"
Jakub Pawlowski [Mon, 31 Oct 2016 18:03:12 +0000 (11:03 -0700)]
Move start advertise method to advertising interface (1/3)
Advertising related code should be exposed through
BleAdvertiserInterface. Move client.listen function into this interface.
Remove reduntant clientif parameter.
Bug:
30622771
Bug:
24099160
Test: no tests necessary
Change-Id: Ifa3ba482993264f2e737cb1ca44028941056631a
Sanket Agarwal [Thu, 29 Sep 2016 18:37:05 +0000 (11:37 -0700)]
Return bool in AVRCP Controller API
If a feature is not supported then instead of timing out the return
value from the API can lead to a quicker UI experience.
Bug: b/
31754876
Change-Id: I4f23700a5318c9b98e3c464f18f73a3ac41fbfcd
(cherry picked from commit
629c041bea58d7b48e81f222167e2ac0233d389a)
Sanket Agarwal [Tue, 1 Nov 2016 20:00:28 +0000 (20:00 +0000)]
Merge "AVRCP CT: Add getPlayStatus API"
Sanket Agarwal [Thu, 22 Sep 2016 21:12:03 +0000 (14:12 -0700)]
AVRCP CT: Add getPlayStatus API
- Required for PTS test case TC_CT_MDI_BV_01_C
Bug: b/
31684931
Change-Id: Ieef8b408657931505f02b9ea408d9658ecb4a3e3
(cherry picked from commit
6eeb548cd2d00695c3492496b32780cda9e34795)
Treehugger Robot [Tue, 1 Nov 2016 19:34:49 +0000 (19:34 +0000)]
Merge changes I3423fcf6,If595d89f,I586b6c06
* changes:
Fixes for HFP & AVRCP
Support Rewind and FF transport controls
AVRCP CT: Add support to send stop command
Sanket Agarwal [Wed, 21 Sep 2016 22:19:39 +0000 (15:19 -0700)]
Fixes for HFP & AVRCP
1. Fix NPE for when the phone does not respond to a call
2. Add PTS hooks for changing vol up/dn.
Bug:
31661223
Change-Id: I3423fcf67a2ea0fad6b9efde7ef239dbb683b737
(cherry picked from commit
ddc157dec97fc1e6c8272b27835a599f82a02e5e)
Sanket Agarwal [Wed, 21 Sep 2016 17:41:59 +0000 (10:41 -0700)]
Support Rewind and FF transport controls
- Mainly to support PTS use cases
Change-Id: If595d89f783c6bee4249fe5fc995ef2997eb2b0a
(cherry picked from commit
bd2b6578e1b047aedcee6f8f3628ca793e482f3c)
AnubhavGupta [Fri, 9 Sep 2016 12:43:49 +0000 (18:13 +0530)]
AVRCP CT: Add support to send stop command
Change-Id: I586b6c0657100a3d1c6fd59eaa2411cc31ca0297
(cherry picked from commit
8a0b4621c3c4c005447529970bb6f3db58bf7c3a)
Sanket Agarwal [Tue, 1 Nov 2016 17:22:49 +0000 (17:22 +0000)]
Merge "Implement set addressed player functionality."
Sanket Agarwal [Fri, 16 Sep 2016 19:07:20 +0000 (12:07 -0700)]
Implement set addressed player functionality.
Bug: b/
31554234
Change-Id: Ibe1170bae58e3a3d68dc942b998ca2deee3b27f8
(cherry picked from commit
f178c8072f4478a8773fcda5759d825f0b41efd2)
Treehugger Robot [Tue, 1 Nov 2016 00:43:41 +0000 (00:43 +0000)]
Merge "Implement non-blocking pagination for a long song list."
Sanket Agarwal [Fri, 26 Aug 2016 00:56:33 +0000 (17:56 -0700)]
Implement non-blocking pagination for a long song list.
Bug: b/
31253501
Change-Id: I39f7ba180a33729301618db8191821ad2745917f
Sanket Agarwal [Mon, 31 Oct 2016 23:03:21 +0000 (23:03 +0000)]
Merge changes If009c2e0,Ib2097456,I032efd2d
* changes:
Remove hashcode() override for Connection
Handle the case of disconnecting -> active for PTS
Cleanup state while transitioning to disconnected.
Treehugger Robot [Mon, 31 Oct 2016 19:49:14 +0000 (19:49 +0000)]
Merge "Make Bluetooth SQL query strict to prevent injection"
Sanket Agarwal [Wed, 7 Sep 2016 23:45:47 +0000 (16:45 -0700)]
Remove hashcode() override for Connection
hashCode is relying on the number of call which creates a race condition
when two phone calls with same number are created. It basically confuses
the stack about the object equality.
Bug: b/
31271037
Change-Id: If009c2e0924fad540cf91bc8b0fa9b2f13404b7b
Sanket Agarwal [Mon, 29 Aug 2016 21:14:57 +0000 (14:14 -0700)]
Handle the case of disconnecting -> active for PTS
In case that a call goes from disconnecting to active and bluetooth
does not have time to realize that the call actually got destroyed,
we can get the telecom in a transition DISCONNECTING -> ACTIVE (or
RINGING etc) which it will not honor.
Bug: b/
31159015
Change-Id: Ib2097456bc435810bb82ecdf79110f0bbcb63023
Sanket Agarwal [Fri, 26 Aug 2016 00:54:57 +0000 (17:54 -0700)]
Cleanup state while transitioning to disconnected.
If we forgot to reset state while transitioning to disconnected in HFP
it could meant that further processing is stopped since the state is
unclean.
Bug: b/
31088373
Change-Id: I032efd2dfd4f39db901c9f82bccdf452060e4d86
Sanket Agarwal [Mon, 31 Oct 2016 19:08:53 +0000 (19:08 +0000)]
Merge "Implement autoconnect for PAN."
Sanket Agarwal [Thu, 4 Aug 2016 23:11:46 +0000 (16:11 -0700)]
Implement autoconnect for PAN.
Bug: b/
30679978
Change-Id: I52c9ac49ec72a419e5f02c656abc46f2c7e4c7cc
(cherry picked from commit
599c56d2b8f09ee126b734b9c62727d255f3e8b3)
Ajay Panicker [Fri, 23 Sep 2016 21:56:20 +0000 (14:56 -0700)]
Make Bluetooth SQL query strict to prevent injection
Bug:
20531462
Change-Id: I8a90c81b727415fa566547f66bf0f64872850189
(cherry picked from commit
760fe9462f8fd177a7c626742fa81486ef1ab770)
Treehugger Robot [Sun, 30 Oct 2016 22:22:38 +0000 (22:22 +0000)]
Merge "Handle all kinds of focuses and make fault tolerant to phone calls."
Sanket Agarwal [Thu, 7 Apr 2016 20:48:40 +0000 (13:48 -0700)]
Handle all kinds of focuses and make fault tolerant to phone calls.
Audio Focus Loss Transient: We stop music and wait for focus gain.
Audio Focus Loss Transient May Duck: We lower the volume (via Gain).
Sometimes phones do not resume even after sending play after the phone
call. This is possible if there is a race condition of when A2dp thinks
it got focus back vs phone actually releasing the call. To avoid this we
add retry logic to try playing again. This also avoids janky situations
when playing music will not initiate at first.
Bug: b/
28003743
Bug: b/
28065071
Change-Id: I1d31156d134d98959ff3044c98206c60515d7e5a
(cherry picked from commit
f8b181e9f395010dee2926a4b7b1dbe4f3db0470)
Treehugger Robot [Sat, 29 Oct 2016 03:02:40 +0000 (03:02 +0000)]
Merge changes I2e454747,I780186f5
* changes:
Set session to active for A2dpMediaBrowserService.
handlePassthroughRsp parameter update
Treehugger Robot [Sat, 29 Oct 2016 02:40:05 +0000 (02:40 +0000)]
Merge "Prevent bonded device from being removed from the property map"
Ajay Panicker [Fri, 21 Oct 2016 23:22:11 +0000 (16:22 -0700)]
Prevent bonded device from being removed from the property map
Bug:
31947953
Test: Manual
Change-Id: Ia2d25b305c07949a9251af83e855db4511ff887f
(cherry picked from commit
c4b1ccb46884a0e23e5411f2bbb2da72fcb267ca)
Victor Chan [Sat, 26 Mar 2016 01:09:14 +0000 (18:09 -0700)]
Set session to active for A2dpMediaBrowserService.
Bluetooth Audio playbackstate was not appearing in the overview since the session was inactive.
bug:
27859156
Change-Id: I2e454747efe8724daa8c5375b193cf00638aec5d
(cherry picked from commit
c1b48cf21758e627fb9738a176fb1aae36c27c65)
(cherry picked from commit
519bb218e810383f12182e3fa4b68234339a2861)
Joseph Pirozzo [Tue, 25 Oct 2016 18:37:54 +0000 (11:37 -0700)]
handlePassthroughRsp parameter update
JNI changed the parameters to include the bluetooth address to support
concurrent connections but did not update the Java side.
Bug:
32404445
Test: Start bluetooth adapter with avrcpcontroller enabled observe that
bluetooth stays on.
Change-Id: I780186f5ea7e6e4b1a4f1c110df7e94e775f6019
(cherry picked from commit
cbea1c575b95e219fcbbd5c4bcab8efd19b19976)
Sanket Agarwal [Fri, 28 Oct 2016 20:52:09 +0000 (20:52 +0000)]
Merge "Let audio HAL know when BT is turned off"
Satish Kodishala [Wed, 21 Oct 2015 13:11:26 +0000 (18:41 +0530)]
Let audio HAL know when BT is turned off
Audio HAL needs setParams("hfp_enable=false") when BT is turned off since if it does not, then
the next enable setParams("hfp_enable=true") does not succeed due to
audio HAL being in a weird stage.
Bug: b/
29937812
Change-Id: I111e38cbe578fe3eca66b07da8ad9204d064a02c
(cherry picked from commit
fcc828915490c65f7c9ae2073a57ee9f0efadb15)
Sanket Agarwal [Fri, 28 Oct 2016 20:51:27 +0000 (20:51 +0000)]
Merge changes from topic 'merge_remaining_car_dev'
* changes:
PBAP over L2CAP
Unset the priorities for car profiles on unpair.
HFP should timeout in Java services if Native never replied
HF should wait for AG to change conference
Conference calling via HFP
Improve connection handling logic in ConnService
Treehugger Robot [Fri, 28 Oct 2016 20:45:08 +0000 (20:45 +0000)]
Merge "Separate LE scanner and GATT client BTIF interfaces (1/3)"
Treehugger Robot [Fri, 28 Oct 2016 20:42:48 +0000 (20:42 +0000)]
Merge "Limit number of stored device properties"
Joseph Pirozzo [Fri, 26 Aug 2016 20:13:18 +0000 (13:13 -0700)]
PBAP over L2CAP
Update PBAP to be compliant with socket connections over L2CAP in
addition to RFCOMM. Additionally now requires SDP to complete before
connection.
Bug:
31062208
Change-Id: Idc991d871e9a67c7d6b631cafbfb98ff45d63c38
(cherry picked from commit
ea2543a5009459fee3581d2fd8b2271511d31a4c)
Sanket Agarwal [Mon, 22 Aug 2016 21:21:26 +0000 (14:21 -0700)]
Unset the priorities for car profiles on unpair.
When the device is unpaired the priorities should not be retained since
on the next pairing we will persist priorities if they are anything
other than UNDEFINED.
Bug: b/
31021525
Change-Id: Ifd7dbf93aff3abcd0f6207395fbac90480624415
(cherry picked from commit
cd29fbf80159c5a7d4573f1eb9d3eee751084f48)
Sanket Agarwal [Mon, 15 Aug 2016 21:25:59 +0000 (14:25 -0700)]
HFP should timeout in Java services if Native never replied
Usually Java services should be failsafe to avoid any states
where it could be stuck listening to lower levels.
Change-Id: I0bdf511878ba773a94b00004951b1f8a94d978f5
(cherry picked from commit
7e7b555fc9539f5d9def892208b416c095543303)
Sanket Agarwal [Wed, 6 Jul 2016 21:56:13 +0000 (14:56 -0700)]
HF should wait for AG to change conference
We should always wait for AG to make changes to the call before we show
it to the user so that the UI does not get confusing (inconsistent).
Currently we are not waiting for the conf. call to be
disconnected/established by AG before we show this on our end.
Bug: b/
29898872
Change-Id: Ia9198958122e9e539fb6f2a6f08942d3174ae2fc
(cherry picked from commit
de8d996c5eb073949210f53b739ef12c2c3054ee)
Sanket Agarwal [Thu, 30 Jun 2016 21:52:54 +0000 (14:52 -0700)]
Conference calling via HFP
Following scenarios are supported:
1. Accepting incoming call when there is an active call (Call Waiting)
-- We always put the active call on hold.
2. Rejecting incming call when there is an active call (Call Waiting)
3. Merging calls after (1) and going into a conference
4. Ending the conference
Bug: b/
29898872
Change-Id: I630bf6d7149fc12eea67f4a49b24fe500f3913d3
(cherry picked from commit
2b32bc5c037a04239b24e3bdb7d193d0091eac02)
Sanket Agarwal [Wed, 29 Jun 2016 20:33:57 +0000 (13:33 -0700)]
Improve connection handling logic in ConnService
Connection for HFP HF role in Bluetooth is currently trying to
handle all cases of connected vs disconnect HFP. This can be offloaded
to ConnServ where the connection lifecycle should be maintained (and not
in the connection itself).
1. Fixes NPEs generated by the BtCarHfpFuzzTest.
2. Reduces the number of calls to AT+CLCC
Change-Id: Ibccadb7721cbbd2260cbfc5685d66027277e8a59
(cherry picked from commit
1ff2e6e9306272bd113c8633c9b52fb169eddcb3)
Sanket Agarwal [Fri, 28 Oct 2016 20:01:58 +0000 (20:01 +0000)]
Merge "Redesign HFP Client call handling"
Andre Eisenbach [Thu, 22 Sep 2016 21:30:32 +0000 (14:30 -0700)]
Limit number of stored device properties
Bug:
31651689
Change-Id: I6e31b4f89d6ebf9e6a0c6df5ea4e1a7be61a125a
(cherry picked from commit
e8d2b5c0f591311c90e428d88b94cd89b88ed342)
Sanket Agarwal [Tue, 28 Jun 2016 03:08:43 +0000 (20:08 -0700)]
Redesign HFP Client call handling
1. Use UUIDs to interact between the upper layers and state machine.
2. Centralized place for managing calls.
3. Mechanism to co-relate outgoing calls with the AT+CLCC reply
4. Get rid of non-ECC hacks (we basically do not support devices not
supporting ECC)
Bug: b/
29788044
Change-Id: I497c59583124825fad9be800a7c0a53920e67d4c
(cherry picked from commit
05462fe44531f887fe91ac173ec645e91b236025)
Jakub Pawlowski [Thu, 27 Oct 2016 19:18:33 +0000 (12:18 -0700)]
Separate LE scanner and GATT client BTIF interfaces (1/3)
In order to properly separate low level structures associated with LE
scanner and GATT client, their interfaces must be separated first.
Test: sl4a BleScanApiTest
Bug:
30622771
Change-Id: Ib6b7be78ccc7fa2176b6c2422e3891493b08d3d0
Treehugger Robot [Fri, 28 Oct 2016 17:11:11 +0000 (17:11 +0000)]
Merge "Remove calls when device gets disconnected"
Sanket Agarwal [Mon, 20 Jun 2016 23:20:28 +0000 (16:20 -0700)]
Remove calls when device gets disconnected
Bug: b/
29170324
Change-Id: I4e9ae948801f80d8f22fb737812e1ed403077bff
(cherry picked from commit
8b2711a9c8537df86e73a0d01b9c3f737f29c643)