OSDN Git Service

android-x86/system-bt.git
8 years agoMerge "DO NOT MERGE Add ability to add interop entries dynamically (2/2)" into mnc...
Andre Eisenbach [Tue, 10 May 2016 15:37:36 +0000 (15:37 +0000)]
Merge "DO NOT MERGE Add ability to add interop entries dynamically (2/2)" into mnc-dr-dev am: bd48fd98ad am: 9c32e564df
am: 1c3f2f19e6  -s ours

* commit '1c3f2f19e616ea34978521d5eafaf1f387b2acef':
  DO NOT MERGE Add ability to add interop entries dynamically (2/2)

Change-Id: Ie85400020a1c270f9629363a437a264730a27a84

8 years agoDO NOT MERGE Remove Porsche car-kit pairing workaround am: ed01581886 am: 0befe2bd60...
Andre Eisenbach [Tue, 10 May 2016 15:37:36 +0000 (15:37 +0000)]
DO NOT MERGE Remove Porsche car-kit pairing workaround am: ed01581886 am: 0befe2bd60 am: f87612c768
am: 67cbb3f146  -s ours

* commit '67cbb3f1468aa29ba1a605cf8540a8ed2f0ede8b':
  DO NOT MERGE Remove Porsche car-kit pairing workaround

Change-Id: If6ad12cadb4a4869b439fb2fcb5e88df32d00111

8 years agoDO NOT MERGE ANYWHERE Update to use the new log tag for HCI timeout. am: 3bdb1d48d0...
Jacky Cheung [Tue, 10 May 2016 15:37:35 +0000 (15:37 +0000)]
DO NOT MERGE ANYWHERE Update to use the new log tag for HCI timeout. am: 3bdb1d48d0  -s ours
am: 9784748d28  -s ours

* commit '9784748d287e66e8442d642794d2a181ba79031d':
  DO NOT MERGE ANYWHERE Update to use the new log tag for HCI timeout.

Change-Id: I86410cc4cd914ba8620d29af063b90545d89a88b

8 years agoDO NOT MERGE ANYWHERE Fix build break caused by duplicate log tag. am: 8dc3dfc2e7...
Sharvil Nanavati [Tue, 10 May 2016 15:37:34 +0000 (15:37 +0000)]
DO NOT MERGE ANYWHERE Fix build break caused by duplicate log tag. am: 8dc3dfc2e7  -s ours
am: 1e93a64272  -s ours

* commit '1e93a642725a5411af0bc0bbf95b6712ef05fbed':
  DO NOT MERGE ANYWHERE Fix build break caused by duplicate log tag.

Change-Id: I4ac25f2d4014d8e14aa5a2872add31f075d2cdde

8 years agoDO NOT MERGE ANYWHERE Add BT_HCI_TIMEOUT log event to track HCI timeouts. am: 5a362a2...
Jacky Cheung [Tue, 10 May 2016 15:37:33 +0000 (15:37 +0000)]
DO NOT MERGE ANYWHERE Add BT_HCI_TIMEOUT log event to track HCI timeouts. am: 5a362a2f14  -s ours
am: 3ecd1121d1  -s ours

* commit '3ecd1121d131141070b7395bb849af29d01c18db':
  DO NOT MERGE ANYWHERE Add BT_HCI_TIMEOUT log event to track HCI timeouts.

Change-Id: I9f6f5c11dc0cb14b383c644bf56db63e8b2877b6

8 years agoMerge "Assume input from /dev/stdin if no argument provided to btsnooz.py." into...
Sharvil Nanavati [Tue, 10 May 2016 15:37:32 +0000 (15:37 +0000)]
Merge "Assume input from /dev/stdin if no argument provided to btsnooz.py." into cw-e-dev am: 853ca86427  -s ours
am: a3ed438701

* commit 'a3ed4387016bb116659bba081fc1636b8c732e7b':
  Assume input from /dev/stdin if no argument provided to btsnooz.py.

Change-Id: Ic33b785f042a9d3176f6d5a2873245372f651996

8 years agoDO NOT MERGE ANYWHERE implement wakelocks on bt adapter init am: ef1f356866 -s ours
Victor Tasayco Loarte [Tue, 10 May 2016 15:37:31 +0000 (15:37 +0000)]
DO NOT MERGE ANYWHERE implement wakelocks on bt adapter init am: ef1f356866  -s ours
am: 86ccba4678  -s ours

* commit '86ccba46786e7caa5a20fbc926f0328d4019e7a2':
  DO NOT MERGE ANYWHERE implement wakelocks on bt adapter init

Change-Id: Ie45199e22bec6920bcd012f9d07c6d5d43a25197

8 years agoDO NOT MERGE ANYWHERE Spoof response to AT+CNUM if we don\'t get a reply from the...
Sharvil Nanavati [Tue, 10 May 2016 15:37:30 +0000 (15:37 +0000)]
DO NOT MERGE ANYWHERE Spoof response to AT+CNUM if we don\'t get a reply from the audio gateway. am: 529a69c8e8  -s ours
am: 9073d039b1  -s ours

* commit '9073d039b1ac633231e0ab8a2c707bfc5beb3c6c':
  DO NOT MERGE ANYWHERE Spoof response to AT+CNUM if we don't get a reply from the audio gateway.

Change-Id: Id80d31bce15408cd7e5d7ec85973e260ce4da4aa

8 years agoMerge "DO NOT MERGE ANYWHERE Fix return value for HAL function config_clear." into...
Sharvil Nanavati [Tue, 10 May 2016 15:37:30 +0000 (15:37 +0000)]
Merge "DO NOT MERGE ANYWHERE Fix return value for HAL function config_clear." into cw-e-dev am: f1f9523db0  -s ours
am: 87912b8170  -s ours

* commit '87912b817087d085f5f449b86f8657a06d0ded05':
  DO NOT MERGE ANYWHERE Fix return value for HAL function config_clear.

Change-Id: I562fb07e9505f682936c57e879bbd3c823a144bc

8 years agoMerge "DO NOT MERGE ANYWHERE Update GKI_freebuf to gracefully handle NULL." into...
Sharvil Nanavati [Tue, 10 May 2016 15:37:28 +0000 (15:37 +0000)]
Merge "DO NOT MERGE ANYWHERE Update GKI_freebuf to gracefully handle NULL." into cw-e-dev am: e3aabcbbf5  -s ours
am: 9844f6c5dd  -s ours

* commit '9844f6c5dd8f29ad927e30506a0ff3f18623c210':
  DO NOT MERGE ANYWHERE Update GKI_freebuf to gracefully handle NULL.

Change-Id: I1897d810347ea6899678ded06262344d403334b9

8 years agoMerge "Additional headsets blacklisted for absolute volume" into mnc-dr1.5-dev
tturney [Tue, 10 May 2016 15:37:17 +0000 (15:37 +0000)]
Merge "Additional headsets blacklisted for absolute volume" into mnc-dr1.5-dev
am: 8c0745ad21  -s ours

* commit '8c0745ad219588a5c4322cde8e0c1f99eda7959e':
  Additional headsets blacklisted for absolute volume

Change-Id: I4ac0d3b86274d617eff2ff1eaa09ccde3b63cb2f

8 years agoRemove unused definition BOARD_HAVE_BLUETOOTH_BCM. am: ad46ee235f
Sharvil Nanavati [Tue, 10 May 2016 15:10:02 +0000 (15:10 +0000)]
Remove unused definition BOARD_HAVE_BLUETOOTH_BCM. am: ad46ee235f
am: cdecc6b300  -s ours

* commit 'cdecc6b300c5498fd90938e5b74271ae8e1e7b63':
  Remove unused definition BOARD_HAVE_BLUETOOTH_BCM.

Change-Id: I8f5d835553c27bd04bb0eebae78e193b8c4bcacb

8 years agoFix undefined usage of snprintf
Ajay Panicker [Thu, 5 May 2016 21:51:34 +0000 (14:51 -0700)]
Fix undefined usage of snprintf

Using a buffer as both the format and output for snprintf could
cause undefinied behaviour on certain platforms. Instead just
use a temporary variable.

Bug: 27882028
Change-Id: If9f96fba4b3447b3248917ab9fb994bd80cbca0f

8 years agoUpdate l2c_fcr_clone_buf() to allocate large enough buffer
Pavlin Radoslavov [Mon, 9 May 2016 02:12:53 +0000 (19:12 -0700)]
Update l2c_fcr_clone_buf() to allocate large enough buffer

Apparently, in some parts of the code we assumed the original
buffer size is large enough and we can extend it and write
few more octets at the end.

Bug: 28351270
Change-Id: Idc53d8f68e55808c9f6bf7f18568288304a9bfb9

8 years agoMerge "Call BTA_VendorCleanup() during actual cleanup of the stack" into nyc-dev
TreeHugger Robot [Fri, 6 May 2016 04:38:53 +0000 (04:38 +0000)]
Merge "Call BTA_VendorCleanup() during actual cleanup of the stack" into nyc-dev

8 years agoFix size of SDP black list array
Ajay Panicker [Thu, 5 May 2016 19:51:49 +0000 (12:51 -0700)]
Fix size of SDP black list array

Bug: 28617843
Change-Id: Iff5690e3aae42d9907ed9351f1059461985c8a20

8 years agoCall BTA_VendorCleanup() during actual cleanup of the stack
Pavlin Radoslavov [Thu, 5 May 2016 23:20:15 +0000 (16:20 -0700)]
Call BTA_VendorCleanup() during actual cleanup of the stack

Previously, BTA_VendorCleanup() was called during the shutdown
process, and this created race condition crashing the stack.

Bug: 28450506
Change-Id: Ibee90d406036862b95d18e2ef00b08b820c70f68

8 years agoMatch socket buffer sizes between audio HAL and BT server
Andy Hung [Wed, 4 May 2016 22:47:05 +0000 (15:47 -0700)]
Match socket buffer sizes between audio HAL and BT server

Adjust our mixer buffer size to be one quarter that of
the socket buffer size for quadruple buffering.

Increase socket buffer size from 20*512 to 28*512 to
smooth out variability in data draw from AudioFlinger.

Bug: 28286313
Change-Id: I8a9ca9e1f4639a0724cfe126acc670c2058cb0fb

8 years agoReturn handle if an RFCOMM port is already open
Andre Eisenbach [Thu, 5 May 2016 17:57:44 +0000 (10:57 -0700)]
Return handle if an RFCOMM port is already open

By returning the handle, the upper layer (BTA) will attempt to
disconnect on failure to connect. Thus the attempt to open the port will
still fail, but any subsequent attempts will be able to recover.

Bug: 27204458
Change-Id: I0f8489b98adeb7f5e217201ffbbb35132a66f210

8 years agoMerge "Avoid NULL pointer usage of startup_future in case of HCI startup timeout...
TreeHugger Robot [Thu, 5 May 2016 02:09:02 +0000 (02:09 +0000)]
Merge "Avoid NULL pointer usage of startup_future in case of HCI startup timeout" into nyc-dev

8 years agoFixed test_periodic_unregister_processing_queue unit test
Pavlin Radoslavov [Wed, 4 May 2016 06:00:15 +0000 (23:00 -0700)]
Fixed test_periodic_unregister_processing_queue unit test

Removed a copy-and-paste check in the
test_periodic_unregister_processing_queue unit test.
The removed check adds little value - it has time-dependency,
and is not robust.

Bug: 26982349
Change-Id: I4adb948713b9946b5eb821d6fe52b7ada1400182

8 years agoAvoid NULL pointer usage of startup_future in case of HCI startup timeout
Pavlin Radoslavov [Wed, 4 May 2016 03:20:06 +0000 (20:20 -0700)]
Avoid NULL pointer usage of startup_future in case of HCI startup timeout

Previously, the startup_timer was created within the HCI layer start_up()
function, and after several vendor calls, we created the startup_future
that is used elsewhere. However, if any of the vendor calls blocks for
very long time, the startup_timer will timeout.
The startup_timer_expired() callback will try to use startup_future
that is still NULL, and that will trigger an assert.

The issue is avoided by creating the startup_future right before
the startup_timer is scheduled.

Bug: 28528815
Change-Id: Ib9f2c6581a86d3df0fd4d02d0b4c290663b5cfa1

8 years agoUpdate alarm_unregister_processing_queue() to cancel scheduled alarms
Pavlin Radoslavov [Mon, 2 May 2016 17:52:07 +0000 (10:52 -0700)]
Update alarm_unregister_processing_queue() to cancel scheduled alarms

Update the alarm_unregister_processing_queue() implementation
so it cancels all alarms that are scheduled on the corresponding
queue.
This fixes a race condition during Bluetooth shutdown: if an alarm
expires right after an alarm processing queue is invalidated,
the alarm processing would try to use the invalidated queue.

Added the corresponding unit tests.

Also, added a missing call to alarm_unregister_processing_queue().

Bug: 26982349
Change-Id: I09a111e8080b6dbc354dffa03a487f7a8c578ce6

8 years agoMerge "Add read/write timeout to the audio sockets" into nyc-dev
TreeHugger Robot [Tue, 3 May 2016 00:44:56 +0000 (00:44 +0000)]
Merge "Add read/write timeout to the audio sockets" into nyc-dev

8 years agoFix test_set_zero_periodic unit test failure
Pavlin Radoslavov [Mon, 2 May 2016 22:53:22 +0000 (15:53 -0700)]
Fix test_set_zero_periodic unit test failure

Removed an "EXPECT_EQ(cb_counter, 0)" statement
right after a timer of value 0 is scheduled.
The EXPECT_EQ statement shouldn't be there,
because by the time it is reached, the callback might
have been called already.

Change-Id: I61fbec96c436787321c6b36006a2bc1c0e627667

8 years agoAdd read/write timeout to the audio sockets
Pavlin Radoslavov [Mon, 2 May 2016 20:40:26 +0000 (13:40 -0700)]
Add read/write timeout to the audio sockets

Add read/write timeout of 2 seconds when reading/writing
from/to the audio-related control and data sockets.
Also, removed unnecessary poll(POLLOUT), because it is not needed anymore.

Bug: 27996931
Change-Id: Ib214a85f4837760b17cded155464957f56806bd3

8 years agoMerge "DO NOT MERGE ANYWHERE" into cw-e-dev am: 560033035b -s ours
Sharvil Nanavati [Sat, 30 Apr 2016 04:15:29 +0000 (04:15 +0000)]
Merge "DO NOT MERGE ANYWHERE" into cw-e-dev am: 560033035b  -s ours
am: 9c68fd9a4d  -s ours

* commit '9c68fd9a4d4e832664aeb91380bc5d1c444b4a2b':
  DO NOT MERGE ANYWHERE

Change-Id: Idee1fabfffc5a3cc04e8aaf7d586bbd4c41e9e3a

8 years agoMerge "DO NOT MERGE ANYWHERE Disconnect the AVDT connection for A2DP SRC device....
Chenjie Luo [Sat, 30 Apr 2016 04:15:27 +0000 (04:15 +0000)]
Merge "DO NOT MERGE ANYWHERE Disconnect the AVDT connection for A2DP SRC device." into cw-e-dev am: 5084f0166e  -s ours
am: 2c8ae3d115  -s ours

* commit '2c8ae3d1153e1a69383171a8c5be50a894952132':
  DO NOT MERGE ANYWHERE Disconnect the AVDT connection for A2DP SRC device.

Change-Id: I5efb950b73e2f30966013ccebc6366c9d3c2a10a

8 years agoDO NOT MERGE ANYWHERE am: 95f816945a -s ours
Sharvil Nanavati [Sat, 30 Apr 2016 04:15:25 +0000 (04:15 +0000)]
DO NOT MERGE ANYWHERE am: 95f816945a  -s ours
am: 0e2a631634  -s ours

* commit '0e2a631634ff759cba204b027284fa2ba3a07ba6':
  DO NOT MERGE ANYWHERE

Change-Id: I90953865e007542f493d6da6c47599e71467b664

8 years agoDo not send AT+CHLD=? if the 3-way call feature is not supported am: 79dc36d01a
Devin Kim [Sat, 30 Apr 2016 04:15:24 +0000 (04:15 +0000)]
Do not send AT+CHLD=? if the 3-way call feature is not supported am: 79dc36d01a
am: b616d01f01

* commit 'b616d01f01b8ebaa30629916556a86b423be758f':
  Do not send AT+CHLD=? if the 3-way call feature is not supported

Change-Id: I478b834744c25f03d1202b1834279adb2c29d22a

8 years agoDO NOT MERGE ANYWHERE Disable 3Mbps packets for AVDT ACL links am: a8bb3ae08b -s...
Sathya Kumar [Sat, 30 Apr 2016 04:15:22 +0000 (04:15 +0000)]
DO NOT MERGE ANYWHERE Disable 3Mbps packets for AVDT ACL links am: a8bb3ae08b  -s ours
am: 66f79db6e6  -s ours

* commit '66f79db6e607e3c51656a5532618b94c847118de':
  DO NOT MERGE ANYWHERE Disable 3Mbps packets for AVDT ACL links

Change-Id: I1f3de149a2fc44b8ad6cc39341cd69349eeb3c82

8 years agoresolve merge conflicts of 00a44d2 to nyc-dev
Sharvil Nanavati [Sat, 30 Apr 2016 00:06:08 +0000 (17:06 -0700)]
resolve merge conflicts of 00a44d2 to nyc-dev

Change-Id: I64ef6cb1eb5996674e9919d13fadd43ede1d4b8c

8 years agoresolve merge conflicts of f7388e6 to nyc-dev
Pavlin Radoslavov [Fri, 29 Apr 2016 22:12:33 +0000 (15:12 -0700)]
resolve merge conflicts of f7388e6 to nyc-dev

Change-Id: I149778411a50fc5881b84cec01a2a4b43cbd2b5c

8 years agoFix build break caused by missing braces around struct initializer.
Sharvil Nanavati [Fri, 29 Apr 2016 19:35:45 +0000 (12:35 -0700)]
Fix build break caused by missing braces around struct initializer.

Change-Id: Iba376e9e4fdcfc032bdd2d20a6de7ba18c8de98c

8 years agoMerge "Additional headsets blacklisted for absolute volume" into mnc-dr1.5-dev
Andre Eisenbach [Fri, 29 Apr 2016 18:34:14 +0000 (18:34 +0000)]
Merge "Additional headsets blacklisted for absolute volume" into mnc-dr1.5-dev
am: 006ede7ac2

* commit '006ede7ac2c509ca6cba4d34b3f048bb3b6f429f':
  Additional headsets blacklisted for absolute volume

Change-Id: I268c859ba121f524147ba0a7878f1705d47b8976

8 years agoFix crashes with lots of discovered LE devices am: 05419c8b96 am: 7a5fa57019 am:...
Marie Janssen [Fri, 29 Apr 2016 18:34:12 +0000 (18:34 +0000)]
Fix crashes with lots of discovered LE devices am: 05419c8b96 am: 7a5fa57019 am: 0ff343e006
am: 6b0e6b5779

* commit '6b0e6b57797bdf4af5656438404c91f7fe4f6ef1':
  Fix crashes with lots of discovered LE devices

Change-Id: I4d45aa391459c932396c8f7bb06f24079da8f48c

8 years agoresolve merge conflicts of 405ec18 to nyc-dev
Sharvil Nanavati [Thu, 28 Apr 2016 21:54:35 +0000 (14:54 -0700)]
resolve merge conflicts of 405ec18 to nyc-dev

Change-Id: I94b431287ae831d64dc734f8cd3f071e49a9d6eb

8 years agoFix issues during cleanup stage of the Bluetooth stack
Pavlin Radoslavov [Tue, 26 Apr 2016 19:18:36 +0000 (12:18 -0700)]
Fix issues during cleanup stage of the Bluetooth stack

 * Moved free-ing of bta_av_cb timers from the init function
   to the cleanup stage.
 * Changed the usage of btif_jni_disassociate() so it is called
   synchronously. Its previous usage was complicated -
   the function was called asynchronously on a different thread,
   and we had to wait on a future for its completion.
 * Renamed function btif_shutdown_bluetooth() to
   btif_cleanup_bluetooth() to represent better its purpose.
   Similarly, bte_main_shutdown() is renamed to bte_main_cleanup()

Also:
 * Removed function btif_init_fail(), because it is not used.
 * Updated an error log message inside function
   btif_in_execute_service_request() so the log information
   is accurate and more useful.
 * Updated the log messages related to the lifecycle of a module
   in btcore/src/module.c

Bug: 26982349
Change-Id: Icd6f159d993bdb9c8ef09bfb5b1386b3d6ea4ff2

8 years agoDo not log unsolicited NOOP command complete events
Andre Eisenbach [Tue, 26 Apr 2016 16:51:06 +0000 (09:51 -0700)]
Do not log unsolicited NOOP command complete events

Bug: 27744135
Change-Id: I683e3a9f0a116f83763ebcf4d0583ea1c89ef5b2

8 years agoRevert "Turn down excess logging in bt hci"
Andre Eisenbach [Wed, 30 Mar 2016 03:26:13 +0000 (03:26 +0000)]
Revert "Turn down excess logging in bt hci"

This log message is likely very necessary and if you see this excessively, we will want to know about it...

This reverts commit 11cfdf303c420d14e6cf3e4d2ca856b827ba44cf.

Change-Id: Iefd46b7aab3373a1547d83c05166fa21034c51a0

8 years agoFix a race condition during alarm_cleanup()
Pavlin Radoslavov [Mon, 25 Apr 2016 19:29:29 +0000 (12:29 -0700)]
Fix a race condition during alarm_cleanup()

Fix a race condition inside function alarm_cleanup() that
could be triggered during shutdown.

Also, fix few other issues:
 * Add missing "timer_delete(akeup_timer)" statement inside
   alarm_cleanup()
 * Fix the argument when calling "timer_delete(timer)"
 * Call "semaphore_free(alarm_expired)" inside alarm_cleanup()
   after the corresponding "timer" and "wakeup_timer" have
   been deleted.
 * Fix the argument type when calling eventfd_read() inside
   semaphore_wait()

Bug: 26982349
Change-Id: I2b00cd7ee7f56f755775f8e7b370006e31c6eb08

8 years agoFix sluggish HID devices
Bluetooth Build Test [Wed, 13 Apr 2016 14:39:53 +0000 (16:39 +0200)]
Fix sluggish HID devices

Right now, when connecting to HID devices, preferred connection
parameters are not being used. This is because of bug in GAP profile.
This make all HID devices use default connection parameters, which
mean that they behave sluggish. This patch fixes that by forcing
HID devices to re-read connection parameters on each reconnection.

This is a temporary workaround until GAP is rewritten.

Bug: 28378306
Change-Id: I74b70ad8e96c29517cace808632fe4d8e0251994

8 years agoFix FD leak caused by module wrapper thread
Manu Viswanadhan [Tue, 19 Apr 2016 09:28:40 +0000 (14:58 +0530)]
Fix FD leak caused by module wrapper thread

Use Case: Repeated BT ON/OFF

Failure: FD leak is observed with ON/OFF stress test
which eventually leads to crash due to unavailability
of FDs.

Steps:
BT ON/OFF.

Root Cause: During cleanup the module wrapper thread is
stopped but the resources are not freed, leading to FD leak.

Fix: Cleanup the module wrapper thread properly so that there
are no resource leaks.

Bug: 28312228
Change-Id: I4de2fba9c98a0e4ae73315759ec6bc8bf273948e

8 years agoMerge "Fix a Floating point exception for periodic timers" into nyc-dev
TreeHugger Robot [Sat, 23 Apr 2016 00:33:11 +0000 (00:33 +0000)]
Merge "Fix a Floating point exception for periodic timers" into nyc-dev

8 years agoMerge "Improve debug-ability of the stack manager" into nyc-dev
TreeHugger Robot [Sat, 23 Apr 2016 00:25:47 +0000 (00:25 +0000)]
Merge "Improve debug-ability of the stack manager" into nyc-dev

8 years agoFix a Floating point exception for periodic timers
Pavlin Radoslavov [Wed, 20 Apr 2016 00:30:19 +0000 (17:30 -0700)]
Fix a Floating point exception for periodic timers

Fix a Floating point exception for periodic timers that are
scheduled with interval of 0ms, and add a corresponding unit test.
Also, fix a typo when printing "Action counts" statistics.

Bug: 28278593
Change-Id: Ic381efc573ed9954c36980c26a89318d2de40b29

8 years agoImprove debug-ability of the stack manager
Pavlin Radoslavov [Wed, 20 Apr 2016 02:20:01 +0000 (19:20 -0700)]
Improve debug-ability of the stack manager

Add or update existing log messages in the stack manager,
so it is clear when each of the init/startup/shutdown/cleanup
steps is executed and completed.
The added/updated log messages are at INFO level.

Bug: 26982349
Change-Id: Ie84aa8e96133999eb76c5b351ddd4fea56404ef0

8 years agoAdd missing mutex lock/unlock inside alarm_cleanup()
Pavlin Radoslavov [Wed, 20 Apr 2016 02:16:26 +0000 (19:16 -0700)]
Add missing mutex lock/unlock inside alarm_cleanup()

Bug: 26982349
Change-Id: I32f4e6450491adcc1e12e71fb8bb582d6397a91a

8 years agoFix 64-bit build break.
Dan Albert [Fri, 22 Apr 2016 18:24:14 +0000 (11:24 -0700)]
Fix 64-bit build break.

Master (aosp and internal) has been broken for nearly two days now.

Was broken by https://android-review.googlesource.com/#/c/212244/
because no one checked 64-bit before merging.

No one noticed post-submit because the build servers aren't
checkbuilding any 64-bit targets (aside from mips64, which is broken
for other reasons).

I've uploaded a build change to get treehugger building a 64-bit
target (http://cr/120564724), and also to make all the targets
checkbuilds again (http://cr/120568746).

Change-Id: I195000284de5b52a539a47ad8b308990e72eea96

8 years agoProtect config module init and add date to config file
Ajay Panicker [Mon, 18 Apr 2016 18:31:48 +0000 (11:31 -0700)]
Protect config module init and add date to config file

Bug: 27354612
Change-Id: Ie956faddaa69101211e554722d682c18ed00a20a

8 years agoA2DP task media alarm non-null protection
Ajay Panicker [Fri, 22 Apr 2016 01:04:41 +0000 (01:04 +0000)]
A2DP task media alarm non-null protection
am: 420dfac186  -s ours

* commit '420dfac186a8510d970b076a2f067f32a4118a5e':
  A2DP task media alarm non-null protection

Change-Id: I77ca8ccd909c397b0662724f30e478526b32cfb4

8 years agoFix bug where a bonded device could enter BONDING and BONDED states again. am: b32b3d7c1b
Sharvil Nanavati [Fri, 22 Apr 2016 00:57:41 +0000 (00:57 +0000)]
Fix bug where a bonded device could enter BONDING and BONDED states again. am: b32b3d7c1b
am: 75144cbf50  -s ours

* commit '75144cbf50803fabeabc2f6d61700e7df69e7059':
  Fix bug where a bonded device could enter BONDING and BONDED states again.

Change-Id: Ifb35e23636d7350ef6bbffb8758b2e5f0839b750

8 years agoMerge "Fix crash in HFP client\'s +COPS parsing code." into cw-e-dev am: bf8d17ddbb
Sharvil Nanavati [Fri, 22 Apr 2016 00:37:31 +0000 (00:37 +0000)]
Merge "Fix crash in HFP client\'s +COPS parsing code." into cw-e-dev am: bf8d17ddbb
am: 878da372c6

* commit '878da372c65941f6d8dd5eac0317a14f9728e7fd':
  Fix crash in HFP client's +COPS parsing code.

Change-Id: I989ea8f8c0ff85d415bbf8b542d42fb39bbb7879

8 years agoOnly send first 16 characters of operator name in +COPS. am: 61b8ebf698
Sharvil Nanavati [Fri, 22 Apr 2016 00:37:30 +0000 (00:37 +0000)]
Only send first 16 characters of operator name in +COPS. am: 61b8ebf698
am: 9837f7e339

* commit '9837f7e339e6e80aaf234b80b8ff07cf09faddc0':
  Only send first 16 characters of operator name in +COPS.

Change-Id: I976b7618610287db0ce2c337a2fde44f3b5d31a9

8 years agoFix crashes with lots of discovered LE devices
Marie Janssen [Fri, 22 Apr 2016 00:37:19 +0000 (00:37 +0000)]
Fix crashes with lots of discovered LE devices
am: a8ace3826b  -s ours

* commit 'a8ace3826b05d1ade5beb5ef2ba4dfd8d9cf98b6':
  Fix crashes with lots of discovered LE devices

Change-Id: Ie1c67a4f78c3039b58702d7a80a5ad33ff3870ff

8 years agoDO NOT MERGE Blacklist devices for absolute volume control
Andre Eisenbach [Fri, 22 Apr 2016 00:23:43 +0000 (00:23 +0000)]
DO NOT MERGE Blacklist devices for absolute volume control
am: bef34921ee  -s ours

* commit 'bef34921ee313f8378059d3205ebb485498b3404':
  DO NOT MERGE Blacklist devices for absolute volume control

Change-Id: Id0ecff030d77833525fbecfea6c8fc9d029579ef

8 years agoRevert "Blacklist devices for absolute volume control"
Ian Pedowitz [Fri, 22 Apr 2016 00:23:31 +0000 (00:23 +0000)]
Revert "Blacklist devices for absolute volume control"
am: 22c5f47b7f  -s ours

* commit '22c5f47b7f7bc4739fb1ddf85eb81d8b20f7b222':
  Revert "Blacklist devices for absolute volume control"

Change-Id: Iab1a73d729f578e5e82688fb4c3e5aa1455db729

8 years agoBlacklist devices for absolute volume control
Andre Eisenbach [Thu, 21 Apr 2016 23:42:20 +0000 (23:42 +0000)]
Blacklist devices for absolute volume control
am: 2c8897ca35  -s ours

* commit '2c8897ca35a93148619d662df03bd9da1b73679a':
  Blacklist devices for absolute volume control

Change-Id: I5f0cbd1030b0e039ffcc04ae7a109f127a6acefa

8 years agoMerge "Fix absolute volume reporting if AVRC_ADV_CTRL_INCLUDED is false" into cw...
Sharvil Nanavati [Thu, 21 Apr 2016 22:35:58 +0000 (22:35 +0000)]
Merge "Fix absolute volume reporting if AVRC_ADV_CTRL_INCLUDED is false" into cw-e-dev am: 3c8de06896
am: b35d5c358e

* commit 'b35d5c358e546657bfa2195a260a9ef4301318bc':
  Fix absolute volume reporting if AVRC_ADV_CTRL_INCLUDED is false

Change-Id: Ic4827eab53322da5cc88affe2c5d9014ac6b2e56

8 years agoDO NOT MERGE ANYWHERE net_test_bluetooth: replace with gtest variant am: 786a7e5941...
Scott James Remnant [Thu, 21 Apr 2016 22:35:56 +0000 (22:35 +0000)]
DO NOT MERGE ANYWHERE net_test_bluetooth: replace with gtest variant am: 786a7e5941  -s ours
am: 919642a4cd  -s ours

* commit '919642a4cdcc2d6a112a5a6dfebc6f8e60f706ed':
  DO NOT MERGE ANYWHERE net_test_bluetooth: replace with gtest variant

Change-Id: I3ae03e08d4d15670e0f6c4e622c0a105da932868

8 years agoMerge "DO NOT MERGE ANYWHERE Rename gtest_net_test_bluedroid to gtest_net_test_blueto...
Joshua Schwarz [Thu, 21 Apr 2016 22:35:55 +0000 (22:35 +0000)]
Merge "DO NOT MERGE ANYWHERE Rename gtest_net_test_bluedroid to gtest_net_test_bluetooth." into cw-e-dev am: 78ec0dc441  -s ours
am: c20ef5387b  -s ours

* commit 'c20ef5387b82642a5e3320083dc0a76efe5fbfb7':
  DO NOT MERGE ANYWHERE Rename gtest_net_test_bluedroid to gtest_net_test_bluetooth.

Change-Id: Ib426458adec10205067a94a85cab2d3d7f67bbdb

8 years agoFix BT connection failures am: 198abcd704
Devin Kim [Thu, 21 Apr 2016 22:35:53 +0000 (22:35 +0000)]
Fix BT connection failures am: 198abcd704
am: e6fdbaf8a7

* commit 'e6fdbaf8a74e95c54b1333ed631061ce5a68d22f':
  Fix BT connection failures

Change-Id: I1f663b6dcde84e9517e9fc226598e74b711c479e

8 years agoDO NOT MERGE ANYWHERE: osi: Remove error_fclose goto and redundant fflush. am: e52633...
Alain Vongsouvanh [Thu, 21 Apr 2016 22:35:52 +0000 (22:35 +0000)]
DO NOT MERGE ANYWHERE: osi: Remove error_fclose goto and redundant fflush. am: e52633cecf  -s ours
am: 2be2e45a99  -s ours

* commit '2be2e45a991f8f7dfcd0b4443e2d19f4117912db':
  DO NOT MERGE ANYWHERE: osi: Remove error_fclose goto and redundant fflush.

Change-Id: Ib411b7d4676cc8456bc51e5891112d71538532a5

8 years agoDO NOT MERGE ANYWHERE: Add file write error checks to config_save am: 02f35e6a36...
Amadeusz Slawinski [Thu, 21 Apr 2016 22:35:50 +0000 (22:35 +0000)]
DO NOT MERGE ANYWHERE: Add file write error checks to config_save am: 02f35e6a36  -s ours
am: 99184508a2  -s ours

* commit '99184508a236c839db86ae92c97c585a9cd3d2aa':
  DO NOT MERGE ANYWHERE: Add file write error checks to config_save

Change-Id: If6a034f76c58180b3e3ea6c8be88032b35c5b225

8 years agoMerge "DO NOT MERGE Revert "A2DP SRC offload support"" into mnc-dr1.5-dev
Chris Elliott [Thu, 21 Apr 2016 22:35:49 +0000 (22:35 +0000)]
Merge "DO NOT MERGE Revert "A2DP SRC offload support"" into mnc-dr1.5-dev
am: e0800b66e0  -s ours

* commit 'e0800b66e011139186f89d0387a6c86fcc5b6ec7':
  DO NOT MERGE Revert "A2DP SRC offload support"

Change-Id: I0cf27fb610f6a24ccc0eaf9dc5641f5034167411

8 years agoDO NOT MERGE Revert "Make default SBC bitrate configurable by device."
Chris Elliott [Thu, 21 Apr 2016 22:35:47 +0000 (22:35 +0000)]
DO NOT MERGE Revert "Make default SBC bitrate configurable by device."
am: a09c5aad67  -s ours

* commit 'a09c5aad672222130e2a3c03c9a9317b56541dd1':
  DO NOT MERGE Revert "Make default SBC bitrate configurable by device."

Change-Id: I1e31bdc958154617f490a9e6825d82170657187e

8 years agoDO NOT MERGE Revert "Always send a SUSPEND_CFM event when suspended due to A2DP RECON...
Chris Elliott [Thu, 21 Apr 2016 22:35:46 +0000 (22:35 +0000)]
DO NOT MERGE Revert "Always send a SUSPEND_CFM event when suspended due to A2DP RECONFIGURE."
am: 775667a632  -s ours

* commit '775667a632ab5e8e14ced69828af65b27978f1b6':
  DO NOT MERGE Revert "Always send a SUSPEND_CFM event when suspended due to A2DP RECONFIGURE."

Change-Id: Ia111f7d01ab94430a6e3be64b4c442852f28bdf6

8 years agoMerge "Mark secure link as authenticated for LE" into cw-e-dev am: e6242fcf30
Zach Johnson [Thu, 21 Apr 2016 22:35:44 +0000 (22:35 +0000)]
Merge "Mark secure link as authenticated for LE" into cw-e-dev am: e6242fcf30
am: a7945b11ce

* commit 'a7945b11ce231d53f5ced337136cd34ee8e5eea3':
  Mark secure link as authenticated for LE

Change-Id: I2340c1c65f8caf504837eab01c9e458cc2c5882b

8 years agoAlways send a SUSPEND_CFM event when suspended due to A2DP RECONFIGURE. am: 8b1c7af03a
Sridhar Vashist [Thu, 21 Apr 2016 22:35:42 +0000 (22:35 +0000)]
Always send a SUSPEND_CFM event when suspended due to A2DP RECONFIGURE. am: 8b1c7af03a
am: 9c55e7e6e0

* commit '9c55e7e6e0816caf83c263fd0ef7e4c4410fb46f':
  Always send a SUSPEND_CFM event when suspended due to A2DP RECONFIGURE.

Change-Id: I87df5fafbd77a06e5c0ff797a57868caafa9f57d

8 years agoMake default SBC bitrate configurable by device. am: 5f308397b7
Sridhar Vashist [Thu, 21 Apr 2016 22:35:40 +0000 (22:35 +0000)]
Make default SBC bitrate configurable by device. am: 5f308397b7
am: b2019873c6

* commit 'b2019873c6253f29026b473ad92e417796c7a166':
  Make default SBC bitrate configurable by device.

Change-Id: I2257bf7a4f6e24d1995f93469268021476c1f829

8 years agoMerge "A2DP SRC offload support" into cw-e-dev am: ffdfe1d26d
Chris Elliott [Thu, 21 Apr 2016 22:35:27 +0000 (22:35 +0000)]
Merge "A2DP SRC offload support" into cw-e-dev am: ffdfe1d26d
am: 51c3eb6a0c  -s ours

* commit '51c3eb6a0c3b55183d30881180982f62c48dba95':
  A2DP SRC offload support

Change-Id: I9f7967ca1b27fa8bc498c6f9b20d6049fd8e384a

8 years agoMerge "Add missing init/destroy of state_lock mutex" into nyc-dev
TreeHugger Robot [Thu, 21 Apr 2016 19:36:59 +0000 (19:36 +0000)]
Merge "Add missing init/destroy of state_lock mutex" into nyc-dev

8 years agobtif: add count of devices loaded on startup
Marie Janssen [Wed, 13 Apr 2016 19:43:03 +0000 (12:43 -0700)]
btif: add count of devices loaded on startup

Report devices initially loaded from the config file.

Also removes the config mutex from btif_debug_config_dump as the config
is not modified.

Bug: 27354612
Change-Id: I25033ce28744051412f0d2bd554f0651e807ba7c

8 years agoAdd missing init/destroy of state_lock mutex
Pavlin Radoslavov [Wed, 20 Apr 2016 19:06:08 +0000 (12:06 -0700)]
Add missing init/destroy of state_lock mutex

Add missing init/destroy of state_lock mutex inside file
btif_sock_l2cap.c.
Also, add a missing unlock for the same mutex.

Bug: 28296454
Change-Id: I48b8deb911d29e8dcc6b7243fd61fc3ba69046dd

8 years agoCleanup unnecessary logs
Jakub Pawlowski [Tue, 12 Apr 2016 12:50:49 +0000 (05:50 -0700)]
Cleanup unnecessary logs

Bug: 27698756
Change-Id: I30b5e4b45d4b06e0264415e85949c7bf828f28c0

8 years agoAdd guest mode functionality (2/5)
Ajay Panicker [Fri, 18 Mar 2016 00:09:24 +0000 (17:09 -0700)]
Add guest mode functionality (2/5)

Add a flag to enable() to start Bluetooth in restricted
mode. In restricted mode, all devices that are paired during
restricted mode are deleted upon leaving restricted mode.
Right now restricted mode is only entered while a guest
user is active.

Bug: 27410683
Change-Id: I8f23d28ef0aa3a8df13d469c73005c8e1b894d19

8 years agoDelete unused JV code
Sharvil Nanavati [Wed, 6 Apr 2016 21:46:49 +0000 (14:46 -0700)]
Delete unused JV code

Bug: 28068134

Change-Id: I16d017ef90269a435b8f66a58ed06d2fc89d407f

8 years agoMerge "AVRCP: Update sdp record correctly for CT or TG." into nyc-dev
Sanket Agarwal [Fri, 15 Apr 2016 20:50:44 +0000 (20:50 +0000)]
Merge "AVRCP: Update sdp record correctly for CT or TG." into nyc-dev

8 years agoMerge "Allow A2DP SNK audio track focus gain interface." into nyc-dev
Sanket Agarwal [Fri, 15 Apr 2016 20:23:49 +0000 (20:23 +0000)]
Merge "Allow A2DP SNK audio track focus gain interface." into nyc-dev

8 years agoFix LE central device not being able to disconnect
Jakub Pawlowski [Thu, 14 Apr 2016 10:06:54 +0000 (03:06 -0700)]
Fix LE central device not being able to disconnect

This fixes issue introduced in
https://android-review.googlesource.com/#/c/202278

Bug: 28211048
Change-Id: I08e62149358f1c1fc1759a4ca9eb375cb0ad8230

8 years agoAVRCP: Update sdp record correctly for CT or TG.
AnubhavGupta [Tue, 22 Mar 2016 18:03:33 +0000 (23:33 +0530)]
AVRCP: Update sdp record correctly for CT or TG.

 -Issuses: SDP records are faulty
  - AVRCP versions are faulty
  - Nexus configuration shows browsing supported
  - Both Cat-1 and Cat-2 is supported for Nexus CT

 -Solution
  - pass sdp version as parameter
  - update sdp records for avrcp controller in case of client
    profiles being enabled
  - BTA_AV_FEAT_BROWSE flag was incorrecly set during AV registration
    causing AVRCP TG version to upgrade to 1.4 even though browsing
    feature is not supported.
  - Use AVRC_CTLR_INCLUDED feature flag instead of AVRC_ADV_CTRL_INCLUDED
    for guarding Avrcp controller code in build/parse apis for
    command/response
  - update categories supported for CT properly for mobile phone config

Bug: b/28149547

Change-Id: I3ff4082453a2624a72d8f152d75af83a8efb4937

8 years agoAllow A2DP SNK audio track focus gain interface.
Sanket Agarwal [Fri, 8 Apr 2016 18:26:04 +0000 (11:26 -0700)]
Allow A2DP SNK audio track focus gain interface.

In order to duck music we need to adjust the gain of the audio track
handled by A2DP SNK. Since SNK is implemented in native we need to add
interface to adjust the gain.

Bug: b/28065071

Change-Id: I60634cfadb502e276596bcb3aafc62ef81d9023a

8 years agoRemoved unused functions
Pavlin Radoslavov [Thu, 7 Apr 2016 18:47:48 +0000 (11:47 -0700)]
Removed unused functions

Removed unused functions and defines that are not needed:
 - l2c_bcst_msg()
 - GAP_ConnBTWrite()
 - gap_proc_btu_event()
 - AVDT_WriteDataReq()
 - L2CAP_BCST_MIN_OFFSET
 - L2CAP_BCST_OVERHEAD
 - AVDT_MAX_MEDIA_SIZE
 - LOG_NDDEBUG in btif/src/bluetooth.c

Bug: 28068134
Change-Id: If0edda2bf86caf83027db2c897537c82a0d80667

8 years agoEnsure PIN code dialog is shown after remote name request
Andre Eisenbach [Wed, 13 Apr 2016 16:44:00 +0000 (09:44 -0700)]
Ensure PIN code dialog is shown after remote name request

If pairing is locally initiated and results in a remote name request
being performed before the PIN code is requested, then the PIN code
dialog will not be shown correctly.

This patch removes the check for locally initated pairing to ensure the
dialog is shown in all cases.

Bug: 27347017
Change-Id: I607c1c071af502fb2990b14cce676590e577b4c2

8 years agoMove autopair blacklist to interop database
Andre Eisenbach [Mon, 11 Apr 2016 21:50:41 +0000 (14:50 -0700)]
Move autopair blacklist to interop database

Blacklist by partial name etc. was not working and had no effect; all
BDAs in the config file start with 00:, which is implausible at best, so
deleted...

Added new mechanism to blacklist by BDA only initially and added Subaru
car kit to blacklist.

Bug: 27347017
Change-Id: Ie2941cb1ab663b5444b02c44f85032f13be4ab46

8 years agoMerge changes I26563b75,If7ee9d96 into nyc-dev
Marie Janssen [Wed, 6 Apr 2016 14:17:04 +0000 (14:17 +0000)]
Merge changes I26563b75,If7ee9d96 into nyc-dev

* changes:
  Fix memory leak when saving paired devices
  btif: Don't persist remote devices to the config

8 years agoFix memory leak when saving paired devices
Marie Janssen [Tue, 5 Apr 2016 18:36:15 +0000 (11:36 -0700)]
Fix memory leak when saving paired devices

Followup from r.android.com/210955

Minor style fixes for osi/config also included.

Bug: 26071376
Change-Id: I26563b75a59a6f0ae074676754889cb988a69358

8 years agobtif: Don't persist remote devices to the config
Marie Janssen [Fri, 25 Mar 2016 20:37:13 +0000 (13:37 -0700)]
btif: Don't persist remote devices to the config

We don't need to persist the unpaired devices to NVRAM
so skip saving them.

This fixes a regression in a previous patch where the most recent
instead of the least recent devices would be removed, making some
devices unpairable in extremely busy environments.

Bug: 26071376

Change-Id: If7ee9d960f70c836bf08b78da5f3fc852ba60a85

8 years agoUpdated the A2DP statistics
Pavlin Radoslavov [Tue, 5 Apr 2016 18:45:30 +0000 (11:45 -0700)]
Updated the A2DP statistics

 * Added "Frame expected" and "Frames limited" statistics in the
   bugreport about expected and limited number of frames per tick.
   Also, added corresponding "Counts (expected/limited)":

A2DP State:
  TxQueue:
  Counts (enqueue/dequeue/readbuf)                        : 386 / 386 / 768
  Last update time ago in ms (enqueue/dequeue/readbuf)    : 12644 / 12643 / 12600
  Frames expected (total/max/ave)                         : 2632 / 8 / 6
  Frames limited (total/max/ave)                          : 0 / 0 / 0
  Counts (expected/limited)                               : 382 / 0
  Frames per packet (total/max/ave)                       : 2618 / 7 / 6
  ...

 * Renamed "tx_queue_max_frames" to "tx_queue_max_frames_per_packet"

 * Fixed the computation of actual transmitted frames:
   tx_queue_total_frames, tx_queue_max_frames_per_packet

 * Computed / added buffer_overruns_max_count and
   buffer_underruns_average to the Protobuf stats.

Bug: 27500656
Change-Id: Id58cfb0b5de2296742c84aa0b743e0eed398f41f

8 years agoAllow factory reset when bluetooth is off (2/2)
Ajay Panicker [Tue, 1 Mar 2016 00:18:12 +0000 (16:18 -0800)]
Allow factory reset when bluetooth is off (2/2)

Bug: 27348444
Change-Id: Idf0c0bda892c76be037fd28ed352237d4c5b8263

8 years agoBring back support for legacy bt_config.xml
Alain Vongsouvanh [Wed, 30 Mar 2016 00:33:55 +0000 (17:33 -0700)]
Bring back support for legacy bt_config.xml

If a device migrates directly from L or earlier to a version using this
new implementation, all bt_config will be lost, requiring to repair to
the devices.

Bug: 27824878
Change-Id: Ifdca0d8cad8efaa9f503ca40ac0725547a06f15c

8 years agoA2DP_SINK: initialize track handle to null
Sanket Agarwal [Wed, 30 Mar 2016 13:31:16 +0000 (19:01 +0530)]
A2DP_SINK: initialize track handle to null

- initialize track handle to null
- prevent invoking audiotrack API in case handle is null

Bug: 27613411

Change-Id: I1a8637fd2cbb3012b29c1930f978100e7f0c58d8

8 years agoFix line wrapping for btsnooz
Ajay Panicker [Fri, 1 Apr 2016 21:02:06 +0000 (14:02 -0700)]
Fix line wrapping for btsnooz

Change-Id: I4558c652577ffeb3f1ac4f273472ccf98d70924b

8 years agoFix btsnooz.py multi-line base64 decoding
Andre Eisenbach [Sat, 2 Apr 2016 00:47:54 +0000 (17:47 -0700)]
Fix btsnooz.py multi-line base64 decoding

Change-Id: Ie915c52d8a7eada10f68999c40a2b50b35f640e2

8 years agoAdd a log message to capture empty queue in l2c_enqueue_peer_data()
Pavlin Radoslavov [Fri, 1 Apr 2016 03:22:29 +0000 (20:22 -0700)]
Add a log message to capture empty queue in l2c_enqueue_peer_data()

Add a log message in l2c_enqueue_peer_data() to help capture
an empty queue p_ccb->xmit_hold_q that is triggering an assert.

Also:
 * Fix a memory leak inside l2cu_initialize_fixed_ccb()
   p_ccb queues have been allocated again even though
   they have been allocated previously within l2cu_allocate_ccb()
 * Fix a typo in a comment: clodes -> closed
 * Removed repeated function declarations in file l2c_int.h

Bug: 27821847
Change-Id: I2df2843710310acf5a46c6fa5b302cf7390bc1b4

8 years agoAvoid using alarm APIs for LPM when Idle timeout is zero
Jaganath Kanakkassery [Fri, 12 Feb 2016 15:03:06 +0000 (20:33 +0530)]
Avoid using alarm APIs for LPM when Idle timeout is zero

For some vendors the idle timer value is configured to zero. But with
the current LPM timer implementation it will use the alarm APIs to
schedule wake_deassert(), which introduces context switch overhead.
The code is modified to trigger the wake_deassert immediately if the
idle timeout value is configured to zero. These changes improve OPP
throughput.

Change-Id: Ic48e7b990ccf55525a0d15b65c03daedfe03c582
Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
Signed-off-by: Zhiquan Liu <zhiquan.liu@intel.com>
8 years agoDon't destroy BTIF Device Management state during shutdown
Pavlin Radoslavov [Sat, 26 Mar 2016 01:55:30 +0000 (18:55 -0700)]
Don't destroy BTIF Device Management state during shutdown

Don't call btif_dm_cleanup() during stack shutdown stage,
because it will destroy/free internal state that might be used
later in the shutdown process.
Instead, btif_dm_cleanup() should happen during the stack
cleanup stage.

Also, added an unit test to capture the original issue.

Bug: 27856457
Change-Id: I8575537ad744cf4e6770046b779b6a53de93d66e

8 years agoRevert "Add guest mode functionality (2/5)"
Ajay Panicker [Mon, 28 Mar 2016 21:58:59 +0000 (21:58 +0000)]
Revert "Add guest mode functionality (2/5)"

This reverts commit 45ee419b233480060548f19b09de6726d28a06ea.

Change-Id: I7d24acbe09305611c4e0bbfe7d40348d0fd1c365

8 years agoAdd guest mode functionality (2/5)
Ajay Panicker [Fri, 18 Mar 2016 00:09:24 +0000 (17:09 -0700)]
Add guest mode functionality (2/5)

Add a flag to enable() to start Bluetooth in restricted
mode. In restricted mode, all devices that are paired during
restricted mode are deleted upon leaving restricted mode.
Right now restricted mode is only entered while a guest
user is active.

Bug: 27410683
Change-Id: I19ff91d1d7fb8c60230fee7a05d32574b5b2aeda

8 years agoRemove unused p_db for A2DP service discovery
Andre Eisenbach [Fri, 25 Mar 2016 23:48:44 +0000 (16:48 -0700)]
Remove unused p_db for A2DP service discovery

This fixes a crash (SIGSEGV) when re-connecting A2DP devices where the
SDP pointer was incorrectly reset to 0.

Bug: 27852645
Change-Id: Ie40b7e57fc117c6fe7a42020600745ef348b503c