OSDN Git Service

android-x86/system-bt.git
8 years agoDisable the Java subsystem when RFCOMM sockets are cleaned up am: 8b92a6d
Sharvil Nanavati [Wed, 6 Apr 2016 23:29:52 +0000 (23:29 +0000)]
Disable the Java subsystem when RFCOMM sockets are cleaned up am: 8b92a6d
am: 421b68c

* commit '421b68c20676f68c632a700841c8c75d6a86e88d':
  Disable the Java subsystem when RFCOMM sockets are cleaned up

Change-Id: I0a239354e287bf058828a44fdc28bdaa9d3ef740

8 years agoDelete unused JV code am: 547a297
Sharvil Nanavati [Wed, 6 Apr 2016 23:29:52 +0000 (23:29 +0000)]
Delete unused JV code am: 547a297
am: 5a3d3d4

* commit '5a3d3d4f494beab2c76a707cd6566fb0740c51e9':
  Delete unused JV code

Change-Id: Iea3f0c1308314b421b535e83f0655638ca5866e5

8 years agoDisable the Java subsystem when RFCOMM sockets are cleaned up
Sharvil Nanavati [Wed, 6 Apr 2016 23:27:05 +0000 (23:27 +0000)]
Disable the Java subsystem when RFCOMM sockets are cleaned up
am: 8b92a6d

* commit '8b92a6dec2f559141ecc0f9564f1b91bdea72ac2':
  Disable the Java subsystem when RFCOMM sockets are cleaned up

Change-Id: Idef44af7dcbad1fb5bde67d0c29cffb9d948d17d

8 years agoDelete unused JV code
Sharvil Nanavati [Wed, 6 Apr 2016 23:27:04 +0000 (23:27 +0000)]
Delete unused JV code
am: 547a297

* commit '547a2972e70021724f5638165a54da36d6a06198':
  Delete unused JV code

Change-Id: I2165a09dc74f8e9ec3b2f174d9aea6550f5a812f

8 years agoDisable the Java subsystem when RFCOMM sockets are cleaned up
Sharvil Nanavati [Wed, 6 Apr 2016 23:08:38 +0000 (16:08 -0700)]
Disable the Java subsystem when RFCOMM sockets are cleaned up

Change-Id: I33dfd2aa01d6f496bee151d5994872e04d25e469

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

Change-Id: I16d017ef90269a435b8f66a58ed06d2fc89d407f

8 years agoFix for issue introduced due to rebase of LE L2CAP COC am: 5e8a3d7
Navin Kochar [Wed, 6 Apr 2016 17:11:00 +0000 (17:11 +0000)]
Fix for issue introduced due to rebase of LE L2CAP COC am: 5e8a3d7
am: 3a3007a

* commit '3a3007aff43970879b4e3152f1274526ccf2588d':
  Fix for issue introduced due to rebase of LE L2CAP COC

Change-Id: I140f7dee94f496e834b0d3c342495aa7ec000430

8 years agoFix for issue introduced due to rebase of LE L2CAP COC
Navin Kochar [Wed, 6 Apr 2016 17:08:34 +0000 (17:08 +0000)]
Fix for issue introduced due to rebase of LE L2CAP COC
am: 5e8a3d7

* commit '5e8a3d7790e8c0e744173dfa8bb76a567160cbfa':
  Fix for issue introduced due to rebase of LE L2CAP COC

Change-Id: Ie75d3f9822b63fa544d6d5dcc2df7be6369b5fd3

8 years agoFix for issue introduced due to rebase of LE L2CAP COC
Navin Kochar [Fri, 18 Mar 2016 06:34:30 +0000 (12:04 +0530)]
Fix for issue introduced due to rebase of LE L2CAP COC

During 6721232 patch, some code got missed while doing manual rebase.
This patch is adding that missing code.

Change-Id: I2525908c29e3288e0ace1ee26c5f2aa6cfd59d68
Signed-off-by: Navin Kochar <navin.kochar@intel.com>
8 years agoUpdated the A2DP statistics am: 94b6e5f
Pavlin Radoslavov [Tue, 5 Apr 2016 23:43:59 +0000 (23:43 +0000)]
Updated the A2DP statistics am: 94b6e5f
am: 69982dc

* commit '69982dcf3da70623b68c41580b04eeca73495f06':
  Updated the A2DP statistics

Change-Id: Idccac952c183df19aca21a3de2947a6ad6896544

8 years agoUpdated the A2DP statistics
Pavlin Radoslavov [Tue, 5 Apr 2016 23:40:37 +0000 (23:40 +0000)]
Updated the A2DP statistics
am: 94b6e5f

* commit '94b6e5fe8e9aafb0d39059e10d0fb904bd6ed2d6':
  Updated the A2DP statistics

Change-Id: I05adf404551f4448f7253e630f4f123e4001fc67

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 agoFix memory leak when saving paired devices am: 4cef24d
Marie Janssen [Tue, 5 Apr 2016 21:12:05 +0000 (21:12 +0000)]
Fix memory leak when saving paired devices am: 4cef24d
am: e71149e

* commit 'e71149e8957af900a2482a7dac19317a33421f06':
  Fix memory leak when saving paired devices

Change-Id: I77f9f090abb8e39da86ecdf557bb306ed004d5de

8 years agoFix memory leak when saving paired devices
Marie Janssen [Tue, 5 Apr 2016 21:08:28 +0000 (21:08 +0000)]
Fix memory leak when saving paired devices
am: 4cef24d

* commit '4cef24d88eb14396011bf31a185d4cab9d0254aa':
  Fix memory leak when saving paired devices

Change-Id: Ib345263e694a3513e582fc06466f329253ad512e

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 am: d9ebc23
Marie Janssen [Mon, 4 Apr 2016 23:40:37 +0000 (23:40 +0000)]
btif: Don\'t persist remote devices to the config am: d9ebc23
am: 117f882

* commit '117f882307312190a5ac1c6d7be2a6b125e16cc2':
  btif: Don't persist remote devices to the config

Change-Id: Ie44ac6ce57f55de279ae6ef629e22eee9b6c8998

8 years agobtif: Don\'t persist remote devices to the config
Marie Janssen [Mon, 4 Apr 2016 23:38:07 +0000 (23:38 +0000)]
btif: Don\'t persist remote devices to the config
am: d9ebc23

* commit 'd9ebc239abf77a1133c3456db84444ccbc8d0fdd':
  btif: Don't persist remote devices to the config

Change-Id: I99663047927e2cdf5fe00c88f1e6f1cdb13cf538

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 agoBring back support for legacy bt_config.xml am: 9a58e68
Alain Vongsouvanh [Mon, 4 Apr 2016 22:01:09 +0000 (22:01 +0000)]
Bring back support for legacy bt_config.xml am: 9a58e68
am: 3c5250c

* commit '3c5250ce8272d2e0acc0a4d46f9fba2900e12ae9':
  Bring back support for legacy bt_config.xml

Change-Id: I99790e15bdbe2c0f6072fe28ef6e632e924d2c5c

8 years agoresolve merge conflicts of cd5d41a to master
Sanket Agarwal [Mon, 4 Apr 2016 21:50:56 +0000 (14:50 -0700)]
resolve merge conflicts of cd5d41a to master

Change-Id: I6c0c97c45247a3e1eeebb9eaca222cc0472f6681

8 years agoBring back support for legacy bt_config.xml
Alain Vongsouvanh [Mon, 4 Apr 2016 21:43:19 +0000 (21:43 +0000)]
Bring back support for legacy bt_config.xml
am: 9a58e68

* commit '9a58e68a98fbe1680535a7e7641de91e89273ad8':
  Bring back support for legacy bt_config.xml

Change-Id: Ic0c4694008ec1f9c37818b033cdba97047769f33

8 years agoA2DP_SINK: initialize track handle to null
Sanket Agarwal [Mon, 4 Apr 2016 21:38:40 +0000 (21:38 +0000)]
A2DP_SINK: initialize track handle to null
am: a9d2a6b

* commit 'a9d2a6ba64ab61e13b9f6db1f282ab1e5fff6ef3':
  A2DP_SINK: initialize track handle to null

Change-Id: Ia3aed429db0fbfc8cfeb6058c84741fe8ba4e8d1

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.

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 am: 1f4a839
Ajay Panicker [Mon, 4 Apr 2016 18:55:24 +0000 (18:55 +0000)]
Fix line wrapping for btsnooz am: 1f4a839
am: 7807dbd

* commit '7807dbdbc99d942e4f47b5902fe0bc7a77cba142':
  Fix line wrapping for btsnooz

Change-Id: Ia9c3ae2223cddad4f94ebd837eefa1e10185fe45

8 years agoFix btsnooz.py multi-line base64 decoding am: 2b70aa4
Andre Eisenbach [Mon, 4 Apr 2016 18:55:24 +0000 (18:55 +0000)]
Fix btsnooz.py multi-line base64 decoding am: 2b70aa4
am: a77624f

* commit 'a77624fc2f3c5dbc33cbc4b90219240705262129':
  Fix btsnooz.py multi-line base64 decoding

Change-Id: I6a33d2d83affa6b274ee4c1012a6e70de66e0928

8 years agoFix line wrapping for btsnooz
Ajay Panicker [Mon, 4 Apr 2016 18:53:03 +0000 (18:53 +0000)]
Fix line wrapping for btsnooz
am: 1f4a839

* commit '1f4a83932fc0201c7d53220edaedfe05c0e77444':
  Fix line wrapping for btsnooz

Change-Id: I8eeb080b802c67f83d1f5d2c08bea92fb2058f2f

8 years agoFix btsnooz.py multi-line base64 decoding
Andre Eisenbach [Mon, 4 Apr 2016 18:53:02 +0000 (18:53 +0000)]
Fix btsnooz.py multi-line base64 decoding
am: 2b70aa4

* commit '2b70aa4406d8b3fcc26c191896a30db37b0846bb':
  Fix btsnooz.py multi-line base64 decoding

Change-Id: I96a32c1e6053b58592d523c47a38838a3d86ae61

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 agoMerge "Allow factory reset when bluetooth is off (2/2)" am: de5fdee
Ajay Panicker [Sat, 2 Apr 2016 00:00:41 +0000 (00:00 +0000)]
Merge "Allow factory reset when bluetooth is off (2/2)" am: de5fdee
am: 88ea5d2

* commit '88ea5d21b92055ed8a8eae6e576abeb3cc7bf0e9':
  Allow factory reset when bluetooth is off (2/2)

Change-Id: I835a04762ce9df854193775644f0468fc4c6a08e

8 years agoMerge "Allow factory reset when bluetooth is off (2/2)"
Ajay Panicker [Fri, 1 Apr 2016 23:57:58 +0000 (23:57 +0000)]
Merge "Allow factory reset when bluetooth is off (2/2)"
am: de5fdee

* commit 'de5fdeee2ac3883b7f4d018a84ac8ad14aab6d81':
  Allow factory reset when bluetooth is off (2/2)

Change-Id: I43855e84e1845bc468a3c1ed1c6a325b200b1385

8 years agoMerge "Allow factory reset when bluetooth is off (2/2)"
Ajay Panicker [Fri, 1 Apr 2016 23:46:33 +0000 (23:46 +0000)]
Merge "Allow factory reset when bluetooth is off (2/2)"

8 years agoAdd a log message to capture empty queue in l2c_enqueue_peer_data() am: c4de4cb
Pavlin Radoslavov [Fri, 1 Apr 2016 21:57:45 +0000 (21:57 +0000)]
Add a log message to capture empty queue in l2c_enqueue_peer_data() am: c4de4cb
am: 672d4e8

* commit '672d4e8703bbce855f614a062bd20ac6f1e12f5b':
  Add a log message to capture empty queue in l2c_enqueue_peer_data()

Change-Id: I6d2f5e21e6b37fb56ce448f1c51907d21990864a

8 years agoAdd a log message to capture empty queue in l2c_enqueue_peer_data()
Pavlin Radoslavov [Fri, 1 Apr 2016 21:53:06 +0000 (21:53 +0000)]
Add a log message to capture empty queue in l2c_enqueue_peer_data()
am: c4de4cb

* commit 'c4de4cb0560c35c81e357560db3cfb4cbc70cca7':
  Add a log message to capture empty queue in l2c_enqueue_peer_data()

Change-Id: I49854a97fb1e5bb942d79a12c268be554c74c280

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 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 agoBUILD FIX: BTIF_MEDIA_FOCUS_NOT_GRANTED should be complied only for SINK am: 26df1e0
Sanket Agarwal [Wed, 30 Mar 2016 20:37:46 +0000 (20:37 +0000)]
BUILD FIX: BTIF_MEDIA_FOCUS_NOT_GRANTED should be complied only for SINK am: 26df1e0
am: 9323de5  -s ours

* commit '9323de55626c984615ae02786fb586edbaafe6be':
  BUILD FIX: BTIF_MEDIA_FOCUS_NOT_GRANTED should be complied only for SINK

Change-Id: Ic3b090d0931c0309edb0346aca953fbea61309d5

8 years agoBUILD FIX: BTIF_MEDIA_FOCUS_NOT_GRANTED should be complied only for SINK
Sanket Agarwal [Wed, 30 Mar 2016 20:28:22 +0000 (20:28 +0000)]
BUILD FIX: BTIF_MEDIA_FOCUS_NOT_GRANTED should be complied only for SINK
am: 26df1e0

* commit '26df1e027a47d1d3cf5a0ecf64b2d8f0ab8733ae':
  BUILD FIX: BTIF_MEDIA_FOCUS_NOT_GRANTED should be complied only for SINK

Change-Id: I0c53650ca481f425ccc22b917018fde8c3f21448

8 years agoBUILD FIX: BTIF_MEDIA_FOCUS_NOT_GRANTED should be complied only for SINK
Sanket Agarwal [Wed, 30 Mar 2016 19:21:30 +0000 (12:21 -0700)]
BUILD FIX: BTIF_MEDIA_FOCUS_NOT_GRANTED should be complied only for SINK

Since BTIF_MEDIA_FOCUS_NOT_GRANTED is only applicable for focus handling
in A2DP SINK scenario it is only defined and protected by
USE_AUDIO_TRACK.

BUG: 26928143
Change-Id: I414bda160270838c9bc911fef9798a95e1f34ec8

8 years agoMove focus handling entirely to component calling fluoride. am: 37ee8f8
Sanket Agarwal [Wed, 30 Mar 2016 19:06:56 +0000 (19:06 +0000)]
Move focus handling entirely to component calling fluoride. am: 37ee8f8
am: 94be648  -s ours

* commit '94be6483f0138d2afb04e8dec5d60cf733668f69':
  Move focus handling entirely to component calling fluoride.

Change-Id: I8a2ad075d2a7e9f01e9f182dc5c4376a914c03ab

8 years agoRemove %s from Log message. am: 45d296c
Sanket Agarwal [Wed, 30 Mar 2016 18:58:30 +0000 (18:58 +0000)]
Remove %s from Log message. am: 45d296c
am: ee57c26

* commit 'ee57c26509ca514321dffbfd191795d4a5f24e8c':
  Remove %s from Log message.

Change-Id: I5ebf65d6f514127317622e8353747c31ab77a9dc

8 years agoMove focus handling entirely to component calling fluoride.
Sanket Agarwal [Wed, 30 Mar 2016 18:54:17 +0000 (18:54 +0000)]
Move focus handling entirely to component calling fluoride.
am: 37ee8f8

* commit '37ee8f84a31cbf74b1c3050d6271bef05105b8bb':
  Move focus handling entirely to component calling fluoride.

Change-Id: Ibd02c78f46358f42706fbaddd4f9465dc7d43c18

8 years agoRemove %s from Log message.
Sanket Agarwal [Wed, 30 Mar 2016 18:54:17 +0000 (18:54 +0000)]
Remove %s from Log message.
am: 45d296c

* commit '45d296cb6dd4ac3ec47a685ca14013270eea0fea':
  Remove %s from Log message.

Change-Id: I57440995d13dbaecf03134226556b00109f180d3

8 years agoMove focus handling entirely to component calling fluoride.
Sanket Agarwal [Wed, 10 Feb 2016 23:24:09 +0000 (15:24 -0800)]
Move focus handling entirely to component calling fluoride.

Audio focus handling for A2DP sink currently split between Fluoride and
the component sitting on top of it. Since this is not the best place to
decide policies, we move all such decisions to the upper layer.

Bug: b/26928143

Change-Id: I67a1a2a50782289e7e31447b01ee29a21bc8dac2

8 years agoRemove %s from Log message.
Sanket Agarwal [Sat, 13 Feb 2016 18:19:45 +0000 (10:19 -0800)]
Remove %s from Log message.

This crashes when A2DP SNK role is executed in print statement.

Change-Id: Iceca09ecc5977a5379d7f98f265fc2d52332c6e4

8 years agoAvoid using alarm APIs for LPM when Idle timeout is zero am: 12751e1
Jaganath Kanakkassery [Wed, 30 Mar 2016 18:41:31 +0000 (18:41 +0000)]
Avoid using alarm APIs for LPM when Idle timeout is zero am: 12751e1
am: 9d611f8

* commit '9d611f8ae69f686ae44f5611feeee51bca5b6655':
  Avoid using alarm APIs for LPM when Idle timeout is zero

Change-Id: Ie7ff61030170f6e0f7f43aed4b4bc2404ec48c42

8 years agoAvoid using alarm APIs for LPM when Idle timeout is zero
Jaganath Kanakkassery [Wed, 30 Mar 2016 18:36:51 +0000 (18:36 +0000)]
Avoid using alarm APIs for LPM when Idle timeout is zero
am: 12751e1

* commit '12751e1d81fae508d8c47b56f532ab6e28aadd30':
  Avoid using alarm APIs for LPM when Idle timeout is zero

Change-Id: I22283f1b1d8fe1b702f64cfac7a45462b7fbdc24

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 agoRemove unused p_db for A2DP service discovery am: 895c094
Andre Eisenbach [Wed, 30 Mar 2016 18:06:18 +0000 (18:06 +0000)]
Remove unused p_db for A2DP service discovery am: 895c094
am: 0613537

* commit '0613537960781779067650f6c325cf48edf650bd':
  Remove unused p_db for A2DP service discovery

Change-Id: I85937c56164ba8037e7604b0feef1925a9c83ab0

8 years agoRemove unused p_db for A2DP service discovery
Andre Eisenbach [Wed, 30 Mar 2016 18:01:22 +0000 (18:01 +0000)]
Remove unused p_db for A2DP service discovery
am: 895c094

* commit '895c09477932acb3888961ac7d1c122c36f067d1':
  Remove unused p_db for A2DP service discovery

Change-Id: I7b61ce31db707f4c672da5b6af4938c06dfa9a04

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

8 years agoDon\'t destroy BTIF Device Management state during shutdown
Pavlin Radoslavov [Mon, 28 Mar 2016 20:29:39 +0000 (20:29 +0000)]
Don\'t destroy BTIF Device Management state during shutdown
am: fb5a382

* commit 'fb5a38213b65716b7fa9f0596f3e2e60d6d9f00c':
  Don't destroy BTIF Device Management state during shutdown

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 agolinux build fix
Jakub Pawlowski [Sat, 26 Mar 2016 05:39:45 +0000 (05:39 +0000)]
linux build fix
am: 815a8d4

* commit '815a8d41cae1a01abdbeb6586c4365d33fa3bbb0':
  linux build fix

8 years agolinux build fix
Jakub Pawlowski [Sat, 26 Mar 2016 05:31:41 +0000 (22:31 -0700)]
linux build fix

Change-Id: Ibec71d18e664f575f73a472b7a522e87c3a1efa8

8 years agoBluetooth: Fix the issue that peer A2DP SNK device can not auto-reconnect.
Zhao Xuewen [Thu, 24 Mar 2016 23:45:11 +0000 (23:45 +0000)]
Bluetooth: Fix the issue that peer A2DP SNK device can not auto-reconnect.
am: 5bd9ffb

* commit '5bd9ffbe6fbf22b7072bc1a63e3152a916276ddf':
  Bluetooth: Fix the issue that peer A2DP SNK device can not auto-reconnect.

8 years agoBluetooth: Fix the issue that peer A2DP SNK device can not auto-reconnect.
Zhao Xuewen [Thu, 4 Feb 2016 03:20:14 +0000 (11:20 +0800)]
Bluetooth: Fix the issue that peer A2DP SNK device can not auto-reconnect.

If peer A2DP SNK disconnected by some reason, the device will reject reconnection request from peer.
This CL will judge the peer device is A2DP SRC, will reject the reconnection request.
So if peer device is A2DP SNK, will accept the reconnection request.

BUG:26274393

Change-Id: Idecef527a763693f08d76d90512546f013312aa1
Signed-off-by: z00184990 <z00184990@notesmail.huawei.com>
Signed-off-by: Zhao Xuewen <zhaoxuewen@huawei.com>
8 years agoStop turning on SCO audio automatically during call
Hall Liu [Thu, 24 Mar 2016 18:14:30 +0000 (18:14 +0000)]
Stop turning on SCO audio automatically during call
am: d22226b

* commit 'd22226b58bc753808f4b5c06c695773669493b41':
  Stop turning on SCO audio automatically during call

8 years agoStop turning on SCO audio automatically during call
Hall Liu [Sat, 20 Feb 2016 01:20:08 +0000 (17:20 -0800)]
Stop turning on SCO audio automatically during call

Remove some code that turns on SCO audio automatically when a device
connects, since Telecom should be responsible for routing audio to
bluetooth during a call.

Bug: 22507913
Change-Id: Iabf9cb8dd77d47505e87d865f8208268d9b417b7

8 years agoservice: use AIDL
Jakub Pawlowski [Wed, 23 Mar 2016 21:44:44 +0000 (21:44 +0000)]
service: use AIDL
am: a4bd0d2

* commit 'a4bd0d2370bd469942e92e724cfc9c7c01d3da74':
  service: use AIDL

8 years agoservice: use Parcelable instead of helpers
Jakub Pawlowski [Wed, 23 Mar 2016 21:44:43 +0000 (21:44 +0000)]
service: use Parcelable instead of helpers
am: 9bceebb

* commit '9bceebb4a441ef7f3c5d9ad2e9b84ec7e1974007':
  service: use Parcelable instead of helpers

8 years agoservice: use AIDL
Jakub Pawlowski [Tue, 16 Feb 2016 19:53:14 +0000 (11:53 -0800)]
service: use AIDL

Change-Id: Ic6261a9bafc65a5534f4e580ef9cae1fa82b4086

8 years agoservice: use Parcelable instead of helpers
Jakub Pawlowski [Tue, 16 Feb 2016 04:18:19 +0000 (20:18 -0800)]
service: use Parcelable instead of helpers

In order to user .aidl in the future, all types will have to be
parcelable. We don't add Parcelable to base types, as they might
be also used with other transports than binder in future.

Change-Id: I88e6961e69ac0e5d04bd4b6fe3cd7d79bd6f73ba

8 years agoTell the build system this is a host module.
Ying Wang [Wed, 23 Mar 2016 19:02:19 +0000 (19:02 +0000)]
Tell the build system this is a host module.
am: df515a4

* commit 'df515a46dd4fe27040c39d35b14b3e071319156d':
  Tell the build system this is a host module.

8 years agoTell the build system this is a host module.
Ying Wang [Wed, 23 Mar 2016 18:41:15 +0000 (11:41 -0700)]
Tell the build system this is a host module.

We need to tell the build system this is a host module before calling
local-generated-sources-dir.

Change-Id: Ie36ad938c0c7124865148f20fcb70d5187f158b8

8 years agoHID: Fix to show mouse pointer movements on UI
Nitin Shivpure [Wed, 23 Mar 2016 17:58:51 +0000 (17:58 +0000)]
HID: Fix to show mouse pointer movements on UI
am: 5e8b724

* commit '5e8b7245ae98436b34ecce6dc7b45d7f7dba74d7':
  HID: Fix to show mouse pointer movements on UI

8 years agoInitiate SCO after Mode change event
Mallikarjuna GB [Wed, 23 Mar 2016 17:58:51 +0000 (17:58 +0000)]
Initiate SCO after Mode change event
am: 8847ff1

* commit '8847ff137b311a37c57366ac8d138b605397dce1':
  Initiate SCO after Mode change event

8 years agoAvoid sending SCO disconnect when power mode is processing
Mallikarjuna GB [Wed, 23 Mar 2016 17:54:52 +0000 (17:54 +0000)]
Avoid sending SCO disconnect when power mode is processing
am: 9ab2a9d

* commit '9ab2a9d97f4e0c4b3cd76416e3d6ed03b610ec6f':
  Avoid sending SCO disconnect when power mode is processing

8 years agoHID: Fix to show mouse pointer movements on UI
Nitin Shivpure [Fri, 15 Jan 2016 11:04:37 +0000 (16:34 +0530)]
HID: Fix to show mouse pointer movements on UI

As per the UHID implementation, UHID_OPEN & UHID_CLOSE
can be ignored, but it is useful for power-management.
Since these events are handled on hid host, ready_for_data
needs to be set to TRUE. Previously the hid reports were not
sent to kernel UHID driver leading to no mouse pointer movement
on UI of DUT.

Change-Id: I708f5be4240f07826c6eefc5404af3e42f80cfa4

8 years agoInitiate SCO after Mode change event
Mallikarjuna GB [Mon, 1 Jun 2015 07:28:38 +0000 (12:58 +0530)]
Initiate SCO after Mode change event

Use case:
1. Connect a headset to AG.
2. Make an outgoing call using headset.

Failure:
SCO connection request is rejected by headset.

Root cause:
AG initiated SCO connection when mode change is pending
on headset. Remote is coming out of sniff and rejected
SCO connection request.

Fix:
AG initiates SCO connection request once AG receives mode
change event. It resolves a corner case where remote failed
to accept SCO connection when initiated in between unsniff
LMP request. Issue is seen with WEP301 headset.

Change-Id: I4ea5d073630320b30f90e6141f4daf25943cca0b

8 years agoAvoid sending SCO disconnect when power mode is processing
Mallikarjuna GB [Sat, 30 May 2015 18:03:58 +0000 (23:33 +0530)]
Avoid sending SCO disconnect when power mode is processing

Use case:
1. Pair and connect with Mercedes car kit.
2. Answer incoming call by phone or car kit.
3. Switch audio between car kit and phone.
4. Repease 1-3 steps.

Failure:
Car kit is going into bad state and not accepting SCO disconnect.

Root cause:
Phone has sent SCO disconnect command to car kit when
power mode command(sniff/unsniff) is in the processing
on the ACL where SCO is active. Car kit didn't accept
remove SCO request command and gone into bad state.

Fix:
AG should send sco disconnect once power mode change is completed
to avoid this failure.

Change-Id: I7eba162a8fd9615795009ab26005535a3e5c7e86

8 years agoProcess complete AT cmd response.
Satish Kodishala [Wed, 23 Mar 2016 17:42:53 +0000 (17:42 +0000)]
Process complete AT cmd response.
am: 8c10b05

* commit '8c10b05eda5f1676668cb1504e976f4437851032':
  Process complete AT cmd response.

8 years agoAbort parsing in case of format error
Satish Kodishala [Wed, 23 Mar 2016 17:42:52 +0000 (17:42 +0000)]
Abort parsing in case of format error
am: e77ecc5

* commit 'e77ecc51ba21ebcaba74fb8c890bffba14d652bb':
  Abort parsing in case of format error

8 years agoProcess complete AT cmd response.
Satish Kodishala [Thu, 11 Feb 2016 17:05:40 +0000 (22:35 +0530)]
Process complete AT cmd response.

Usecase:
1. Enable hf client role and connect with AG.
2. Receive an incoming call and accept from hf client.
3. End call from hf client.
4. Repeat the steps few times.

Failure:
UI is not updated with proper call status although
call is active.

Root cause:
When OK is received as part of AT command response,
application is not updated for it. This caused response
state mismatch in application and hence queue was not
cleared properly.

Fix:
Parse complete AT command response and update application
accordingly.

Change-Id: I8cb2362369b209903700e87330ed2a3e3052b188

8 years agoAbort parsing in case of format error
Satish Kodishala [Thu, 11 Feb 2016 14:32:08 +0000 (20:02 +0530)]
Abort parsing in case of format error

Usecase:
1. Enable hf client and connect to AG.
2. Send +COPS with length more than allowed 16 characters.

Failure:
Crash might be seen while parsing +COPS response from AG.

Root cause:
sscanf used for parsing the AT commands does not update
the characters scanned when there is format error.

Fix:
Abort the processing in case of format error.

Change-Id: Id3ca80712df3d0251cf9ffb04d9c766be809ae84

8 years agoMove to idle when remote disconnects during connection.
Ayan Ghosh [Wed, 23 Mar 2016 17:26:58 +0000 (17:26 +0000)]
Move to idle when remote disconnects during connection.
am: 4d10d7f

* commit '4d10d7f5a0bb9444867b2f77b3e92725a851f8ac':
  Move to idle when remote disconnects during connection.

8 years agoAllocate buffer for AV SDP in Stack
Ayan Ghosh [Wed, 23 Mar 2016 17:26:58 +0000 (17:26 +0000)]
Allocate buffer for AV SDP in Stack
am: a986d61

* commit 'a986d610aa91222b3387497705aa12ccebe3835b':
  Allocate buffer for AV SDP in Stack

8 years agoMove to idle when remote disconnects during connection.
Ayan Ghosh [Tue, 7 Jan 2014 11:17:19 +0000 (16:47 +0530)]
Move to idle when remote disconnects during connection.

Chrysler Uconnect Touch initiates disconnect for a2dp on
l2cap just after discovery on AVDTP channel, stack does not
send any message to BTIF layer for disconnection, this
causes btif getting stuck in opening state and later no stable
connection update is sent to app. Since it is intermediate
state all subsequent connection trials fails.

Send disconnect event from incoming state to closing state
and then closing state will send proper msg to btif layer. Add
closing msg handling in btif layer so that we can update app
for connection disconnect when initiated from remote and move to
proper stable state for accepting/initiating connection.

Change-Id: I011d9ffe9d721235217320c1e5281f70328c7f13

8 years agoDo not initiate SDP for incoming AVDTP connection
Ayan Ghosh [Wed, 23 Mar 2016 17:18:34 +0000 (17:18 +0000)]
Do not initiate SDP for incoming AVDTP connection
am: c90c0d4

* commit 'c90c0d48e2adfaf42908177ea7eeab85787d84fc':
  Do not initiate SDP for incoming AVDTP connection

8 years agoAllocate buffer for AV SDP in Stack
Ayan Ghosh [Thu, 3 Mar 2016 10:37:38 +0000 (16:07 +0530)]
Allocate buffer for AV SDP in Stack

Remove buffer allocation in BTA while going for SDP before triggering
A2DP connection. This strategy is followed to address memory corruption
issues due to freeing of BTA buffer before SDP RSP call back is
triggered and access the freed buffer from there, leads to crash when
running Codemonicom tests.

The change allocates and frees buffer in stack.

Change-Id: If6d60d2aa60d19ce5120dd38c2f365d70943db81

8 years agoProcess AV HAL start only when previous instance is cleaned up
Ayan Ghosh [Wed, 23 Mar 2016 17:11:11 +0000 (17:11 +0000)]
Process AV HAL start only when previous instance is cleaned up
am: 59e97c2

* commit '59e97c20314b51cf0c2854e4d2aa889e7137207e':
  Process AV HAL start only when previous instance is cleaned up

8 years agoRestrict DUT supported SBC configuration in GET_CAP response
Ayan Ghosh [Wed, 23 Mar 2016 17:11:10 +0000 (17:11 +0000)]
Restrict DUT supported SBC configuration in GET_CAP response
am: d565837

* commit 'd56583705e63a8a508b908d2a0c62003834accae':
  Restrict DUT supported SBC configuration in GET_CAP response

8 years agoDo not initiate SDP for incoming AVDTP connection
Ayan Ghosh [Thu, 11 Dec 2014 12:26:02 +0000 (17:56 +0530)]
Do not initiate SDP for incoming AVDTP connection

There are few instances when remote initiates L2CAP
channel for AVDTP signaling but keeps quite after that,
and later on timeout DUT goes for rest of the signalling
procedure but does sdp prior to the same.Few peer
devices deletes a2dp sink sdp record when there is an
ongoing connection, as a result sdp request fails and
DUT fails to proceed with signalling procedure and
connection setup fails.

This patch makes sure that DUT does not go for redundant
sdp request for AVDTP, provided remote has already
established L2cap connection for the same. SDP is done
explicitly only incase of outgoing AV connection.

This issue is seen with Nokia Es headset.

Change-Id: Id44368687d5b3f97bf0258f8d4ff75f185db23af

8 years agoProcess AV HAL start only when previous instance is cleaned up
Ayan Ghosh [Thu, 3 Mar 2016 13:28:24 +0000 (18:58 +0530)]
Process AV HAL start only when previous instance is cleaned up

Change-Id: Iee232dacd3b79e6e94d26c73fb3e563fddced75c

8 years agoRestrict DUT supported SBC configuration in GET_CAP response
Ayan Ghosh [Thu, 17 Mar 2016 09:29:06 +0000 (14:59 +0530)]
Restrict DUT supported SBC configuration in GET_CAP response

DUT shows all possible SBC configurations as supported
as part of GET_CAP response and also allows AV SINK to
opt for any of these values from that set as part of
SET_CONFIG request, but later opts for only recommended
figures while streaming so that leads to mismatch in
configuration between the config values SINK sets during
SET_CONFIG and config values DUT chooses for streaming
and hence it causes PTS (version 6.4 onwards) certification
failure for below A2DP and AVDTP cases:

A2DP:
TC_SRC_SET_BV_04_I
TC_SRC_SET_BV_06_I

AVDTP:
TC_ACP_SRC_SIG_SMG_BV_18_C
TC_ACP_SRC_SIG_SMG_BV_20_C
TC_ACP_SRC_SIG_SMG_BV_22_C

Restricting DUT supported SBC configurations to reflect only
the configuration DUT opts for during streaming makes sure
remote also opts for those config values during SET_CONFIG
and later there is no mismatch.

Change-Id: I13dbe94e0ca52708fc62c6db7513f7985237c18c

8 years agoUse handles to identify GATT attributes (1/4)
Jakub Pawlowski [Tue, 22 Mar 2016 02:47:09 +0000 (02:47 +0000)]
Use handles to identify GATT attributes (1/4)
am: 9dc9985

* commit '9dc998503590163068845827d951fc2f05a17bda':
  Use handles to identify GATT attributes (1/4)

8 years agoUse handles to identify GATT attributes (1/4)
Jakub Pawlowski [Thu, 17 Mar 2016 19:05:54 +0000 (12:05 -0700)]
Use handles to identify GATT attributes (1/4)

Bug: 27778668
Change-Id: Id7454450c1ce2164001a1f9ca0b91f18d84e3fd6

8 years agoAdd missing initialization of queue btm_cb.sec_pending_q
Pavlin Radoslavov [Tue, 22 Mar 2016 01:47:09 +0000 (01:47 +0000)]
Add missing initialization of queue btm_cb.sec_pending_q
am: 6aef394

* commit '6aef394995e2c99bb29be05fa63298ea56ea3f60':
  Add missing initialization of queue btm_cb.sec_pending_q

8 years agoAdd missing initialization of queue btm_cb.sec_pending_q
Pavlin Radoslavov [Mon, 21 Mar 2016 23:35:41 +0000 (16:35 -0700)]
Add missing initialization of queue btm_cb.sec_pending_q

Bug: 27763878
Change-Id: I93001a679e22b744c3feafda1997e5f7e707db4e

8 years agoLog error code on wakelock acquisition/release failure
Andre Eisenbach [Tue, 22 Mar 2016 01:17:28 +0000 (01:17 +0000)]
Log error code on wakelock acquisition/release failure
am: b71bdd6

* commit 'b71bdd6f5bef9514eb358c4279dca57ae8c1df70':
  Log error code on wakelock acquisition/release failure

8 years agoLog error code on wakelock acquisition/release failure
Andre Eisenbach [Thu, 17 Mar 2016 23:51:36 +0000 (16:51 -0700)]
Log error code on wakelock acquisition/release failure

Bug: 27721443
Change-Id: I8ac9e738d916bfdcf125e33c0e09f90cc8d26d55

8 years agoCleanup after p_mcb if L2CA_ConnectReq() failed
Pavlin Radoslavov [Tue, 22 Mar 2016 00:37:27 +0000 (00:37 +0000)]
Cleanup after p_mcb if L2CA_ConnectReq() failed
am: 757047a

* commit '757047a147582d6c5be22f0fb5148005f345fc9b':
  Cleanup after p_mcb if L2CA_ConnectReq() failed

8 years agoCleanup after p_mcb if L2CA_ConnectReq() failed
Pavlin Radoslavov [Fri, 18 Mar 2016 08:02:45 +0000 (01:02 -0700)]
Cleanup after p_mcb if L2CA_ConnectReq() failed

If L2CA_ConnectReq() failed, make sure that
we cleanup the lcid cache state after the
affected p_mcb.

Also, extra check and a log message inside function
rfc_check_send_cmd().

Bug: 27334916
Change-Id: Ib2950d12ce456d74355f4bcc0e3c4d87603f8f91

8 years agoDon\'t clear the btsnoop log ringbuffer on compress.
Sharvil Nanavati [Mon, 21 Mar 2016 23:31:23 +0000 (23:31 +0000)]
Don\'t clear the btsnoop log ringbuffer on compress.
am: b35c234

* commit 'b35c23483633826617d2312be805df93aeb9d8ca':
  Don't clear the btsnoop log ringbuffer on compress.

8 years agoDon't clear the btsnoop log ringbuffer on compress.
Sharvil Nanavati [Mon, 29 Feb 2016 23:50:49 +0000 (15:50 -0800)]
Don't clear the btsnoop log ringbuffer on compress.

Change-Id: I0bf4279104e87b151553eba913491d934f3cde41

8 years agoAdd config source to dumpsys output
Ajay Panicker [Mon, 21 Mar 2016 23:23:17 +0000 (23:23 +0000)]
Add config source to dumpsys output
am: 190cf46

* commit '190cf46ff6937bceff146aec026cf9f53c40e84d':
  Add config source to dumpsys output

8 years agoAdd config source to dumpsys output
Ajay Panicker [Mon, 21 Mar 2016 18:23:09 +0000 (11:23 -0700)]
Add config source to dumpsys output

This logs where the config file was loaded from in the Bluetooth
Manager dumpsys output.

Bug: 27354612
Change-Id: I50d4aaa0be4f4d1d890580b03742713f4345c80f

8 years agoDo not leak eventfd\'s for RFCOMM/AVDT/L2CAP
Andre Eisenbach [Mon, 21 Mar 2016 16:21:31 +0000 (16:21 +0000)]
Do not leak eventfd\'s for RFCOMM/AVDT/L2CAP
am: 072bd75

* commit '072bd753e6ac2a011421cd7e4a2e622ee7d052fc':
  Do not leak eventfd's for RFCOMM/AVDT/L2CAP

8 years agoDo not leak eventfd's for RFCOMM/AVDT/L2CAP
Andre Eisenbach [Fri, 18 Mar 2016 09:09:58 +0000 (02:09 -0700)]
Do not leak eventfd's for RFCOMM/AVDT/L2CAP

Various users of fixed_queue's do not free the lists properly after
using them. As a result two event fd's leak for each fixed_queue that
is not free'd, as fixed_queue contains two semaphores.

This can lead to run-away file descriptor allocation and an eventual
hard limit leading to various undefined behaviours.

Bug: 27731859
Change-Id: If9ce64b711083bf474d217aa537220065722ad3a