OSDN Git Service

android-x86/system-bt.git
9 years agoam 19e91b0f: (-s ours) Fix for premature BLE RPA timeout
Nitin Arora [Wed, 10 Jun 2015 21:51:48 +0000 (21:51 +0000)]
am 19e91b0f: (-s ours) Fix for premature BLE RPA timeout

* commit '19e91b0fe546478f6fb6572c8af7a5faa7559498':
  Fix for premature BLE RPA timeout

9 years agoam 033edab9: Fix GATT connection failure after BT reset
Satya Calloji [Wed, 10 Jun 2015 21:44:34 +0000 (21:44 +0000)]
am 033edab9: Fix GATT connection failure after BT reset

* commit '033edab9780481ca743d1f14cc893dc533c3c3f2':
  Fix GATT connection failure after BT reset

9 years agoam 7557b674: Use correct structure to read LE connection handle
Nitin Arora [Wed, 10 Jun 2015 21:44:33 +0000 (21:44 +0000)]
am 7557b674: Use correct structure to read LE connection handle

* commit '7557b67434226e4baeee87ba86a7b85d1687de9a':
  Use correct structure to read LE connection handle

9 years agoam 03583e8f: Build the shared library with --whole-archive
Zach Johnson [Wed, 10 Jun 2015 21:44:32 +0000 (21:44 +0000)]
am 03583e8f: Build the shared library with --whole-archive

* commit '03583e8f3161836f2bef56f59a6f7bb2db25e61f':
  Build the shared library with --whole-archive

9 years agoam 350b0b0d: Fix for IRK and IR key write issue
Satya Calloji [Wed, 10 Jun 2015 21:44:31 +0000 (21:44 +0000)]
am 350b0b0d: Fix for IRK and IR key write issue

* commit '350b0b0d148ca9bf7cbf20018b47286165fa86e8':
  Fix for IRK and IR key write issue

9 years agoam fc9c9981: Re-enabled enhanced inquiry scan
Andre Eisenbach [Wed, 10 Jun 2015 21:44:29 +0000 (21:44 +0000)]
am fc9c9981: Re-enabled enhanced inquiry scan

* commit 'fc9c99817a6f3a951e3fc1ccdc48ebd2a54824a7':
  Re-enabled enhanced inquiry scan

9 years agoam 73378f5f: Fix format-security warning found by clang/llvm.
Chih-Hung Hsieh [Wed, 10 Jun 2015 21:44:28 +0000 (21:44 +0000)]
am 73378f5f: Fix format-security warning found by clang/llvm.

* commit '73378f5fad7b2fc348073c313b226d0e1d5cfc12':
  Fix format-security warning found by clang/llvm.

9 years agoam 8f1a16b1: Fix string template in connection event debug log
Andre Eisenbach [Wed, 10 Jun 2015 21:44:27 +0000 (21:44 +0000)]
am 8f1a16b1: Fix string template in connection event debug log

* commit '8f1a16b13f8d11da9e783a64e1d38e8b20c10d6c':
  Fix string template in connection event debug log

9 years agoam 40412562: (-s ours) Include osi_module reference in module_init funcion
Andre Eisenbach [Wed, 10 Jun 2015 21:44:25 +0000 (21:44 +0000)]
am 40412562: (-s ours) Include osi_module reference in module_init funcion

* commit '40412562707ee3f1fa104c4332bc6247880040a3':
  Include osi_module reference in module_init funcion

9 years agoam c6a1c261: (-s ours) Fix AlarmTestHarness so alarm tests pass again
Zach Johnson [Wed, 10 Jun 2015 21:37:20 +0000 (21:37 +0000)]
am c6a1c261: (-s ours) Fix AlarmTestHarness so alarm tests pass again

* commit 'c6a1c261b87f194b298df01f002292d9e937ec75':
  Fix AlarmTestHarness so alarm tests pass again

9 years agoam cae219fe: (-s ours) Shutdown alarm callbacks on stack disable; added OSI module
Andre Eisenbach [Wed, 10 Jun 2015 21:29:26 +0000 (21:29 +0000)]
am cae219fe: (-s ours) Shutdown alarm callbacks on stack disable; added OSI module

* commit 'cae219fe70124f1fc39cd7a78c239c4870422d5d':
  Shutdown alarm callbacks on stack disable; added OSI module

9 years agoam f4f744f7: Fix BT PAN crash by re-ordering callback initialization
Mudumba Ananth [Wed, 10 Jun 2015 21:21:51 +0000 (21:21 +0000)]
am f4f744f7: Fix BT PAN crash by re-ordering callback initialization

* commit 'f4f744f7a9812e2dfd306382eab80c2caf25db37':
  Fix BT PAN crash by re-ordering callback initialization

9 years agoam 1bd76059: (-s ours) Bluetooth native dumpsys logging support (2/5)
Andre Eisenbach [Wed, 10 Jun 2015 21:06:13 +0000 (21:06 +0000)]
am 1bd76059: (-s ours) Bluetooth native dumpsys logging support (2/5)

* commit '1bd76059e72b7a0d54f6b325882f6eccd311f874':
  Bluetooth native dumpsys logging support (2/5)

9 years agoam 4e3e372a: Only register key types with uinput that we can actually map
Andre Eisenbach [Wed, 10 Jun 2015 20:58:21 +0000 (20:58 +0000)]
am 4e3e372a: Only register key types with uinput that we can actually map

* commit '4e3e372af6bba32d27a154679e39cada3034df41':
  Only register key types with uinput that we can actually map

9 years agoam 4be4396c: Elimininate unnecessary calls for releasing the wake lock.
Pavlin Radoslavov [Wed, 10 Jun 2015 20:58:20 +0000 (20:58 +0000)]
am 4be4396c: Elimininate unnecessary calls for releasing the wake lock.

* commit '4be4396c8e4dc4c308219bdf402447a7feefe73e':
  Elimininate unnecessary calls for releasing the wake lock.

9 years agoam 4905f8fc: Handle lack of service better
David Stevens [Wed, 10 Jun 2015 20:58:19 +0000 (20:58 +0000)]
am 4905f8fc: Handle lack of service better

* commit '4905f8fcddbf8e082a922b91dcc4674df95e2cfa':
  Handle lack of service better

9 years agoam af753a25: Do not ask for confirmation for temporary pairing
Andre Eisenbach [Wed, 10 Jun 2015 18:42:07 +0000 (18:42 +0000)]
am af753a25: Do not ask for confirmation for temporary pairing

* commit 'af753a253bb3e40f11be33d2c70368adc205cca6':
  Do not ask for confirmation for temporary pairing

9 years agoDo not ask for confirmation for temporary pairing
Andre Eisenbach [Tue, 9 Jun 2015 03:43:00 +0000 (20:43 -0700)]
Do not ask for confirmation for temporary pairing

Bug: 20187234
Change-Id: I4213a3c2cafecdb39fcf3f19464c91776180267a

9 years agoam 8f310904: Add missing include.
Dan Albert [Wed, 10 Jun 2015 00:33:01 +0000 (00:33 +0000)]
am 8f310904: Add missing include.

* commit '8f31090414c4660a010216383e17cb932f34ec6f':
  Add missing include.

9 years agoAdd missing include.
Dan Albert [Tue, 9 Jun 2015 23:53:45 +0000 (16:53 -0700)]
Add missing include.

osi_malloc was never included, so it was implicitly defined as
returning an integer (thank you, C). Clang caught the int to pointer
conversion error.

Change-Id: I0d8a3363d92cb72a22780d049a53e193d2e50ec5

9 years agoam 818d0f2a: SAP: Make it possible to enforce a 16-digit pin code (1/5)
Casper Bonde [Tue, 9 Jun 2015 22:05:04 +0000 (22:05 +0000)]
am 818d0f2a: SAP: Make it possible to enforce a 16-digit pin code (1/5)

* commit '818d0f2afb10c75125b0df9ea2bce6108268a269':
  SAP: Make it possible to enforce a 16-digit pin code (1/5)

9 years agoSAP: Make it possible to enforce a 16-digit pin code (1/5)
Casper Bonde [Thu, 21 May 2015 09:08:45 +0000 (11:08 +0200)]
SAP: Make it possible to enforce a 16-digit pin code (1/5)

This change enable the posibility to enforce using a
16-digit pin or MITM for a RFCOMM or L2CAP connection.

This is needed for the SIM access profile.

Change-Id: I02886ce284f27295205def3c66fb76372f5dab4f
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
9 years agoFix for premature BLE RPA timeout
Nitin Arora [Wed, 11 Mar 2015 17:40:59 +0000 (10:40 -0700)]
Fix for premature BLE RPA timeout

RPA timeout expires prematurely when multiple FindMe server
instances start and stop advertisiment continuously. During start
adv TIMER3 is started using oneshot timer and during stop adv
same TIMER0 is stopped, so the TIMER3 is still running and expires
prematurely. This fix stops TIMER3 during disable adv and when RPA
is sent to controller.

Change-Id: I336f84043e5e0e8a833cc6080f8bcc0c1665893e

9 years agoFix GATT connection failure after BT reset
Satya Calloji [Thu, 7 May 2015 16:45:00 +0000 (09:45 -0700)]
Fix GATT connection failure after BT reset

Handles the address type incorrect value storage issue
and removes usage of DMT supported flag which was based
on legacy code

Bug: 20912064
Change-Id: I5bd20dc9cd0997ac3dbd4b346cc0513f1809f241

9 years agoUse correct structure to read LE connection handle
Nitin Arora [Thu, 31 Jul 2014 20:00:21 +0000 (13:00 -0700)]
Use correct structure to read LE connection handle

This patch corrects the retrieval of the connection handle
after the gatt write operation has succeeded successfully.

Change-Id: Iac79a64d6c626c2349b6f1a3744ea49a521a45f4

9 years agoBuild the shared library with --whole-archive
Zach Johnson [Tue, 19 May 2015 21:49:37 +0000 (14:49 -0700)]
Build the shared library with --whole-archive

For stack static libraries, use LOCAL_WHOLE_STATIC_LIBRARIES
to ensure they get --whole-archive applied to them.

This means module symbols in static libraries won't be
removed by the linker and dlsym will find them.

This patch also removes the code hacks we needed to
trick the linker into including the module symbols in
the final shared library.

Change-Id: I2463d0e6fb38f1e75c8293179cf9d4ca33eda84e

9 years agoFix for IRK and IR key write issue
Satya Calloji [Tue, 19 May 2015 21:42:32 +0000 (14:42 -0700)]
Fix for IRK and IR key write issue

Fixes the incorrect flipping of values
for IRK and IR keys in bt_config.conf file

Change-Id: Ia4f9c274b6a3f7594ec31d8bd89b27d1ae54ac78

9 years agoRe-enabled enhanced inquiry scan
Andre Eisenbach [Tue, 19 May 2015 19:22:59 +0000 (12:22 -0700)]
Re-enabled enhanced inquiry scan

A merge/re-factoring error caused enhanced inquiry scan to be disabled,
severely slowing down inquiry and device name resolution.

Change-Id: Id7bc1687a1e1bbbbc8b8b42cc184ce628b6d1b9c

9 years agoFix format-security warning found by clang/llvm.
Chih-Hung Hsieh [Tue, 19 May 2015 18:18:35 +0000 (11:18 -0700)]
Fix format-security warning found by clang/llvm.

BUG: 21299815
Change-Id: I3dd7e92444a9b439c210f7e6ce677307a38113ab

9 years agoFix string template in connection event debug log
Andre Eisenbach [Tue, 19 May 2015 01:44:03 +0000 (18:44 -0700)]
Fix string template in connection event debug log

Also fixed timestamp/bdname buffer confusion.

Change-Id: Idab9746a87ec665cba836c79978f03e13c36d17b

9 years agoInclude osi_module reference in module_init funcion
Andre Eisenbach [Tue, 19 May 2015 01:42:29 +0000 (18:42 -0700)]
Include osi_module reference in module_init funcion

This prevents a crash-loop if the module is stripped by the linker.

Change-Id: I7a3f0349cb62a9e73e003707c1f48ec0a6de7f67

9 years agoFix AlarmTestHarness so alarm tests pass again
Zach Johnson [Mon, 18 May 2015 21:48:50 +0000 (14:48 -0700)]
Fix AlarmTestHarness so alarm tests pass again

Ensures all alarm resources are torn down before the
test ends, so the allocation tracker is happy and
doesn't assert-fail the tests.

Also guard alarm_shutdown to make sure it only runs
if lazy_initialize was run (to avoid undefined behavior)

Change-Id: Iaf78fe85edd2fc65b9c5ee11c74665a11a3bc9ba

9 years agoShutdown alarm callbacks on stack disable; added OSI module
Andre Eisenbach [Mon, 18 May 2015 16:41:06 +0000 (09:41 -0700)]
Shutdown alarm callbacks on stack disable; added OSI module

Change-Id: Iecf1e2258da012bdac69a4f57d38b12a272e3edd

9 years agoFix BT PAN crash by re-ordering callback initialization
Mudumba Ananth [Wed, 6 May 2015 16:15:41 +0000 (09:15 -0700)]
Fix BT PAN crash by re-ordering callback initialization

Bug: 20868163
Change-Id: I8e3bb844b96b762f90a85d8d9d678a1a9cec9c32

9 years agoBluetooth native dumpsys logging support (2/5)
Andre Eisenbach [Fri, 5 Dec 2014 17:40:20 +0000 (09:40 -0800)]
Bluetooth native dumpsys logging support (2/5)

Includes support for BTSnoop logging in memory.

Bug: 18508263
Change-Id: I175da528cbcdc00d40622647d518a74210cfe6fd

9 years agoOnly register key types with uinput that we can actually map
Andre Eisenbach [Mon, 11 May 2015 18:49:59 +0000 (11:49 -0700)]
Only register key types with uinput that we can actually map

Bug: 20641307
Change-Id: I40cb1e22c35963429481a2cc9da897b5b2f554fe

9 years agoElimininate unnecessary calls for releasing the wake lock.
Pavlin Radoslavov [Sat, 9 May 2015 02:39:31 +0000 (19:39 -0700)]
Elimininate unnecessary calls for releasing the wake lock.

Bug: 20884459
Change-Id: Id010cb29cf09b95800dc9f5fd5b660e71e4a47bc

9 years agoHandle lack of service better
David Stevens [Wed, 29 Apr 2015 17:44:04 +0000 (10:44 -0700)]
Handle lack of service better

- Set the service availability flag during ciev events
- Don't drop AT+COPS and AT+CNUM events on the floor if there is no
  service. Instead, send fake OK responses up the stack.

Bug: 20127723
Change-Id: Id2d9ae8c5df5b5372e50e804e44ed51657b2a4a9

9 years agoam 15d6b314: Revert "A2DP audio HAL: implement get_presentation_position()"
Eric Laurent [Fri, 5 Jun 2015 19:59:10 +0000 (19:59 +0000)]
am 15d6b314: Revert "A2DP audio HAL: implement get_presentation_position()"

* commit '15d6b3144d92167d1f4f88cc87a50c2571a2c166':
  Revert "A2DP audio HAL: implement get_presentation_position()"

9 years agoRevert "A2DP audio HAL: implement get_presentation_position()"
Eric Laurent [Fri, 5 Jun 2015 18:55:24 +0000 (11:55 -0700)]
Revert "A2DP audio HAL: implement get_presentation_position()"

This reverts commit 0b6c835cab0391f73a453686f4e665dd02661d77.

Bug: 21660426.

9 years agoam 74f0bd0e: Initialize btif_max_hf_clients with proper value
Mallikarjuna GB [Fri, 5 Jun 2015 02:05:25 +0000 (02:05 +0000)]
am 74f0bd0e: Initialize btif_max_hf_clients with proper value

* commit '74f0bd0e8c5cce69690eb7a7c6c7429013082647':
  Initialize btif_max_hf_clients with proper value

9 years agoam 46d706a9: Fix issues in A2dp, Avrcp, HF and AG reported by static analysis tool
Mallikarjuna GB [Fri, 5 Jun 2015 01:53:56 +0000 (01:53 +0000)]
am 46d706a9: Fix issues in A2dp, Avrcp, HF and AG reported by static analysis tool

* commit '46d706a9849dcd027d562200a0a43e6e9156aceb':
  Fix issues in A2dp, Avrcp, HF and AG reported by static analysis tool

9 years agoInitialize btif_max_hf_clients with proper value
Mallikarjuna GB [Thu, 21 May 2015 08:54:05 +0000 (14:24 +0530)]
Initialize btif_max_hf_clients with proper value

btif_max_hf_clients which is an unsigned 16bit integer is
initialized with -1(0xFFFF) in btif_hf.c. Later on, when
application calls init with max_hf_clients as 1, btif_max_hf_clients
will be set to 1. But, before this happens, context switch happened
from application context to btif context with btif_max_hf_clients as -1.
In the btif context, BTA_AgRegister gets called in for loop for 0xFFFF
times. We are running out of scbs due to this.
Initialize btif_max_hf_clients with 1. Assign it to max_hf_clients
before context switch happens.

Change-Id: Ibde1bebbab2eb64442027164236f1d82e4269d23

9 years agoam 1f9dfcbb: Ignore STOP command if A2DP stream is suspended
Anubhav Gupta [Fri, 5 Jun 2015 01:35:43 +0000 (01:35 +0000)]
am 1f9dfcbb: Ignore STOP command if A2DP stream is suspended

* commit '1f9dfcbb526c8d0cba080e02df7c4613b7433f18':
  Ignore STOP command if A2DP stream is suspended

9 years agoam a4f66355: Remove check for stream type in a2dp hal_callbacks.
Anubhav Gupta [Fri, 5 Jun 2015 01:35:42 +0000 (01:35 +0000)]
am a4f66355: Remove check for stream type in a2dp hal_callbacks.

* commit 'a4f66355a304e869d22195fb7177756bb2243cff':
  Remove check for stream type in a2dp hal_callbacks.

9 years agoam 40969d03: Clear remote BD address information.
Mallikarjuna GB [Fri, 5 Jun 2015 01:35:41 +0000 (01:35 +0000)]
am 40969d03: Clear remote BD address information.

* commit '40969d03ffa9cfe67dbd3cec6ce074443638ce4a':
  Clear remote BD address information.

9 years agoam 0ba8b230: Don\'t stop sniff timer before checking for service ID entry
Mallikarjuna GB [Fri, 5 Jun 2015 01:35:41 +0000 (01:35 +0000)]
am 0ba8b230:  Don\'t stop sniff timer before checking for service ID entry

* commit '0ba8b2303ed8d0f2c0636befe28b89cfe33169de':
  Don't stop sniff timer before checking for service ID entry

9 years agoFix issues in A2dp, Avrcp, HF and AG reported by static analysis tool
Mallikarjuna GB [Fri, 7 Nov 2014 11:22:25 +0000 (16:52 +0530)]
Fix issues in A2dp, Avrcp, HF and AG reported by static analysis tool

- Fixes to validate Array Index Value and Null Pointer
  Dereference reported by static analysis tool.

Change-Id: Id1492315f68378fdcfa517bd0a5cacefc8ebfddb

9 years agoam 7d29482d: Don\'t initiate sniff in sniff mode
Mallikarjuna GB [Fri, 5 Jun 2015 01:20:49 +0000 (01:20 +0000)]
am 7d29482d: Don\'t initiate sniff in sniff mode

* commit '7d29482dd040a00be373092a566b0d7c5b4827fb':
  Don't initiate sniff in sniff mode

9 years agoam f9a0014f: Updated ATD string parsing
Mallikarjuna GB [Fri, 5 Jun 2015 01:20:48 +0000 (01:20 +0000)]
am f9a0014f: Updated ATD string parsing

* commit 'f9a0014f94600966dc75e185a4c67fd424e0e24b':
  Updated ATD string parsing

9 years agoam 16eae386: Stop AG collision timer.
Mallikarjuna GB [Fri, 5 Jun 2015 01:20:48 +0000 (01:20 +0000)]
am 16eae386: Stop AG collision timer.

* commit '16eae38653e9f1bc2e7779dd7d5792adc05d2dbb':
  Stop AG collision timer.

9 years agoIgnore STOP command if A2DP stream is suspended
Anubhav Gupta [Mon, 17 Nov 2014 01:02:45 +0000 (17:02 -0800)]
Ignore STOP command if A2DP stream is suspended

Ignore STOP command if A2DP stream is already suspended.
Some carkits send STOP command before VOIP call initiation
but don't send PLAY when call ends which hinders DUT to resume
audio playback after call termination.

Change-Id: I41cc1fc6f4b6cfaa1560d729baa0ca27f6dfe8c8

9 years agoRemove check for stream type in a2dp hal_callbacks.
Anubhav Gupta [Tue, 7 Oct 2014 12:58:19 +0000 (18:28 +0530)]
Remove check for stream type in a2dp hal_callbacks.

Stream type is invalid till signalling channel
connection establishment is completed. Do not
check stream type while calling HAL callback.

Change-Id: I69fb19636f3e9bb72202c450dcef9e7bc2e53731

9 years agoClear remote BD address information.
Mallikarjuna GB [Mon, 22 Sep 2014 04:30:36 +0000 (10:00 +0530)]
Clear remote BD address information.

This change makes sure that when RFCOMM
connection fails for HFP, AG control block
clears the remote bd address. This will prevent
the misuse of remote bd address.

Change-Id: I9b14cfe7ae18e72f0972704ac3aa5e915f70ddb3

9 years agoam c380680c: Return ERROR for invalid CHLD command arguments
Mallikarjuna GB [Fri, 5 Jun 2015 01:11:16 +0000 (01:11 +0000)]
am c380680c: Return ERROR for invalid CHLD command arguments

* commit 'c380680cf4bdfd7cd4befea57f81407fccb88752':
  Return ERROR for invalid CHLD command arguments

9 years agoam 137bed02: Reject second AVRCP connection.
Anubhav Gupta [Fri, 5 Jun 2015 01:11:16 +0000 (01:11 +0000)]
am 137bed02: Reject second AVRCP connection.

* commit '137bed026881654febddfa2d797e06ce9f8e58fa':
  Reject second AVRCP connection.

9 years ago Don't stop sniff timer before checking for service ID entry
Mallikarjuna GB [Fri, 22 May 2015 09:44:25 +0000 (15:14 +0530)]
 Don't stop sniff timer before checking for service ID entry

- Avoid stopping sniff timer before checking for service
ID entry for which bta_sys_conn_close is called since if
entry is not present we return without re-starting timer
and ACL doesn't go into sniff.

Change-Id: I063da8e58e067ade5d646debf086bb443066106c

9 years agoDon't initiate sniff in sniff mode
Mallikarjuna GB [Thu, 21 May 2015 13:37:30 +0000 (19:07 +0530)]
Don't initiate sniff in sniff mode

This change makes sure that AG does not retry
to intiate sniff if device is already in remote
initiated sniff mode.

Change-Id: I77a0c4c0aaf2e93e3168f49998fe22a971d46212

9 years agoUpdated ATD string parsing
Mallikarjuna GB [Thu, 21 May 2015 13:47:06 +0000 (19:17 +0530)]
Updated ATD string parsing

This change makes sure that the Dial string
parsing accepts 'pause' and 'wait' characters
too.

Change-Id: Ie56b355199a3d4292d0ee9913852292147ccf55f

9 years agoStop AG collision timer.
Mallikarjuna GB [Wed, 22 Oct 2014 13:56:41 +0000 (19:26 +0530)]
Stop AG collision timer.

This change makes sure to stop collision
timer of AG when cleanup is happening
while BT turn off.

Change-Id: Ia877f98ba3136ec3278cbec5ab0d7ef2abfc6ed5

9 years agoam d81bd014: Disable SCMST feature for A2DP Sink
Anubhav Gupta [Fri, 5 Jun 2015 00:55:31 +0000 (00:55 +0000)]
am d81bd014: Disable SCMST feature for A2DP Sink

* commit 'd81bd014fe76408692ac2f57cf6c1423ae2a2751':
  Disable SCMST feature for A2DP Sink

9 years agoam 846c48f8: Restarting PM timer for AG while reading OR writing
Mallikarjuna GB [Fri, 5 Jun 2015 00:55:30 +0000 (00:55 +0000)]
am 846c48f8: Restarting PM timer for AG while reading OR writing

* commit '846c48f8a8a648302e0584acfe6e8e222d22fd1d':
  Restarting PM timer for AG while reading OR writing

9 years agoam d59ee6c2: Set the proper authentication level for AvOpen
Anubhav Gupta [Fri, 5 Jun 2015 00:55:30 +0000 (00:55 +0000)]
am d59ee6c2: Set the proper authentication level for AvOpen

* commit 'd59ee6c25920cf9db218f2d5ac46624c69c3ba09':
  Set the proper authentication level for AvOpen

9 years agoReturn ERROR for invalid CHLD command arguments
Mallikarjuna GB [Thu, 21 May 2015 13:32:39 +0000 (19:02 +0530)]
Return ERROR for invalid CHLD command arguments

Return ERROR for invalid chld commands like "AT+CHLD=!"
or "AT+CHLD=0a" etc. In such cases, held call was getting
terminated.

Change-Id: I93d159b20da7086fac3374ce2e163d1309680045

9 years agoReject second AVRCP connection.
Anubhav Gupta [Thu, 13 Mar 2014 13:46:29 +0000 (19:16 +0530)]
Reject second AVRCP connection.

This change rejects the RC connection from
second device if the DUT is already connected
to RC of first device.
This addresses the problem of improper closure
of Uinput device on disconnection of Avrcp
to make sure Avrcp passthrough commands work
as desired.

Change-Id: If2e39cd90575baffd0e4442b8e7cd2a91eebdf56

9 years agoDisable SCMST feature for A2DP Sink
Anubhav Gupta [Thu, 19 Jun 2014 11:20:11 +0000 (16:50 +0530)]
Disable SCMST feature for A2DP Sink

Do not send SCMST enabled in GetCapabilities
for A2dp sink role.

Change-Id: I2bff7e04d852c6d3c8c1b7e1c41ae50ef3ff0543

9 years agoRestarting PM timer for AG while reading OR writing
Mallikarjuna GB [Fri, 22 May 2015 08:31:19 +0000 (14:01 +0530)]
Restarting PM timer for AG while reading OR writing

- Once AG receives any data(eg. AT commands) from
  remote device(HF) and sending the response to remote
  device, PM(Bluedroid power Manager) timer should be restarted
  (stop & start) for AG.

- Increased the sniff timer value to 7 seconds for AV & AG
  profiles to avoid sniff related IOT issues.

Change-Id: I8c1b79d272391b3fa34b193477a34d561f4c508d

9 years agoSet the proper authentication level for AvOpen
Anubhav Gupta [Mon, 14 Jul 2014 13:23:37 +0000 (18:53 +0530)]
Set the proper authentication level for AvOpen

During Avopen security was made none hence A2DP
connection was happening without bonding when
DUT is paired with DUT and then pairing entry
is deleted from remote and then only A2dp is
tried to be reconnected from DUT. A2dp appears
to be connected in this usecase but the device
entry is shown in available devices list instead
of paired one.
Changes made from No security to SEC Authenticate

Change-Id: I7fc39fe8acef874f0031c9b78d4269a62b94e4b0

9 years agoam 8a67ac70: Don\'t open SCO for 2nd MO call if a call is active
Mallikarjuna GB [Thu, 4 Jun 2015 20:49:10 +0000 (20:49 +0000)]
am 8a67ac70: Don\'t open SCO for 2nd MO call if a call is active

* commit '8a67ac702cd4d4a4cbebd1e765800141b84e6fc0':
  Don't open SCO for 2nd MO call if a call is active

9 years agoam 2d0d790c: Don\'t close SCO for MO calls
Mallikarjuna GB [Thu, 4 Jun 2015 20:49:09 +0000 (20:49 +0000)]
am 2d0d790c: Don\'t close SCO for MO calls

* commit '2d0d790ca98b6c46be085e1e0a3e6d16ebd8cddf':
  Don't close SCO for MO calls

9 years agoDon't open SCO for 2nd MO call if a call is active
Mallikarjuna GB [Fri, 19 Sep 2014 14:57:17 +0000 (20:27 +0530)]
Don't open SCO for 2nd MO call if a call is active

When user dials a 2nd call, do not open SCO if 1st call was
active on DUT earpiece or speaker.

Change-Id: I974f5bcf917e6972705e60cf1da195eae23f885a

9 years agoam c8c082b7: SCO connection should happen after SLC.
Mallikarjuna GB [Thu, 4 Jun 2015 20:19:48 +0000 (20:19 +0000)]
am c8c082b7: SCO connection should happen after SLC.

* commit 'c8c082b730910b64dbc38a7ee89bb141be46daa6':
  SCO connection should happen after SLC.

9 years agoam e1ded77a: Fix compile error in bta_ag_sco.c
Andre Eisenbach [Thu, 4 Jun 2015 20:19:47 +0000 (20:19 +0000)]
am e1ded77a: Fix compile error in bta_ag_sco.c

* commit 'e1ded77ae6d10854dc2bd1aebdd9b53442cc4ba4':
  Fix compile error in bta_ag_sco.c

9 years agoDon't close SCO for MO calls
Mallikarjuna GB [Tue, 28 Oct 2014 17:43:51 +0000 (23:13 +0530)]
Don't close SCO for MO calls

This change removes condition to disconnect SCO
when MO call process is started.

Change-Id: I2af4ab82c097c7d9ce1bc892bdf40cc09ff6d97e

9 years agoam 5b675bc4: Create listen SCO for HS1 if HS2 disconnects during SCO xfer
Mallikarjuna GB [Thu, 4 Jun 2015 19:22:27 +0000 (19:22 +0000)]
am 5b675bc4: Create listen SCO for HS1 if HS2 disconnects during SCO xfer

* commit '5b675bc41986a159023c51b561e81939f0632f95':
  Create listen SCO for HS1 if HS2 disconnects during SCO xfer

9 years agoam 902ba021: Don\'t open SCO on state change for multi party call on DUT.
Mallikarjuna GB [Thu, 4 Jun 2015 19:22:26 +0000 (19:22 +0000)]
am 902ba021: Don\'t open SCO on state change for multi party call on DUT.

* commit '902ba02141c5cea3320ec1746c0fe0fad80122bc':
  Don't open SCO on state change for multi party call on DUT.

9 years agoam d288b2af: Reset sniff subrating while in SCO
Mallikarjuna GB [Thu, 4 Jun 2015 19:22:25 +0000 (19:22 +0000)]
am d288b2af: Reset sniff subrating while in SCO

* commit 'd288b2af6bf5ebb41554f223adf2e7f536d2f1e5':
  Reset sniff subrating while in SCO

9 years agoam a7ce13fe: Open SCO for held call.
Mallikarjuna GB [Thu, 4 Jun 2015 19:22:24 +0000 (19:22 +0000)]
am a7ce13fe: Open SCO for held call.

* commit 'a7ce13feaa2a84ff329f2bbd4ab964f0f6d54f0a':
  Open SCO for held call.

9 years agoam 7b0bfd32: Update call state before opening SCO.
Mallikarjuna GB [Thu, 4 Jun 2015 19:22:24 +0000 (19:22 +0000)]
am 7b0bfd32: Update call state before opening SCO.

* commit '7b0bfd32833a8da08069b60e6568aace90778b62':
  Update call state before opening SCO.

9 years agoam d345bb20: Handle multi party call states
Mallikarjuna GB [Thu, 4 Jun 2015 19:22:23 +0000 (19:22 +0000)]
am d345bb20: Handle multi party call states

* commit 'd345bb208fe35923b60bca6af76b0a6e023fc56f':
  Handle multi party call states

9 years agoam c2c8a1fc: Update held call state to connected headset
Mallikarjuna GB [Thu, 4 Jun 2015 19:22:22 +0000 (19:22 +0000)]
am c2c8a1fc: Update held call state to connected headset

* commit 'c2c8a1fce4a577fc1a14a96fe96cab3043db4140':
  Update held call state to connected headset

9 years agoSCO connection should happen after SLC.
Mallikarjuna GB [Wed, 8 Oct 2014 08:31:16 +0000 (14:01 +0530)]
SCO connection should happen after SLC.

This change makes sure that SCO audio
connection request is not processed until
HFP SLC connection is done.

Change-Id: Ia2fcad49882deaaf049ae190d90442e5ca7ad71b

9 years agoFix compile error in bta_ag_sco.c
Andre Eisenbach [Thu, 4 Jun 2015 18:43:57 +0000 (11:43 -0700)]
Fix compile error in bta_ag_sco.c

Change-Id: I8839ba732560a31a5e8a2351ea4bfb16999cf5ea

9 years agoCreate listen SCO for HS1 if HS2 disconnects during SCO xfer
Mallikarjuna GB [Thu, 21 May 2015 14:34:46 +0000 (20:04 +0530)]
Create listen SCO for HS1 if HS2 disconnects during SCO xfer

During SCO transfer process from HS1 to HS2, firstly active SCO for
HS1 is disconnected. However, if suddenly HS2 disconnects even
before SCO transfer is complete, listen SCO for HS1 is not created.
This causes further incoming SCO connections from HS1 to be rejected.
The change creates listen SCO for HS1 and moves SCO state properly
to LISTEN.

Change-Id: I0993c1ba1c24b3b7e9c243d179a913d7a0c40446

9 years agoDon't open SCO on state change for multi party call on DUT.
Mallikarjuna GB [Thu, 21 May 2015 14:20:27 +0000 (19:50 +0530)]
Don't open SCO on state change for multi party call on DUT.

When multi party calls(1 active, 1 held) are ongoing on phone
speaker and any of these call drops, do not open SCO for
other call since user expects call to still remain on phone
speaker.

Change-Id: I9079c809ac665fc1c6e890302e37d23a12f8d4f4

9 years agoReset sniff subrating while in SCO
Mallikarjuna GB [Thu, 21 May 2015 13:11:03 +0000 (18:41 +0530)]
Reset sniff subrating while in SCO

Sniff subrating should not be used when link is
in SCO connection. Since the subrating value is
higher, the link would take more time to process
ACL data while in SCO connection causing unwanted
results like delay in SCO disconnects.

Change-Id: I7b964faa397624b65e0158209b8743efe13a6075

9 years agoOpen SCO for held call.
Mallikarjuna GB [Sat, 30 May 2015 17:25:18 +0000 (22:55 +0530)]
Open SCO for held call.

Use case:
1. Connect to headset/carkit
2. Make an outgoing call from AG
3. Turn off BT on AG
4. Hold the call from AG
5. Turn on BT on AG (No SCO link is established here)
6. Unhold call from AG (still no SCO link is established)

Failure:
No SCO connection established when held call is there
during headset connection.

Root cause:
SCO is not initiated when SLC is done during held call.

Fix:
AG opens SCO connection when HF connected while in call and
the call was in held state.

Change-Id: I63d7655d26ddbf68cbf94c745df745cffa917b5e

9 years agoUpdate call state before opening SCO.
Mallikarjuna GB [Fri, 28 Nov 2014 04:51:15 +0000 (10:21 +0530)]
Update call state before opening SCO.

This change makes sure to update the current
call state before opening SCO connection when
incoming call is answered. Some car kits are
strict in checking this sequence and go in
bad state if not done this way.

Change-Id: Ie744dc26c02d897eaf016ee73022bfc2a0db067e

9 years agoHandle multi party call states
Mallikarjuna GB [Fri, 22 May 2015 06:26:48 +0000 (11:56 +0530)]
Handle multi party call states

UseCase:
1. Set up Bluetooth connection between phone and remote device.
2. Disconnect BT link by turning off remote device.
3. Start Mo call from phone.
4. Receive MT call from far end.
5. Turn on remote device.
6. BT connection gets established successfully, but audio
doesn't get transferred to headset.

Failure:
Call audio not routed to BT HS. SCO not established.

Root cause:
When a HS connects while in an active call and 2nd call
(incoming/outgoing/alerting) setup ongoing, incorrect post SLC
call setup updates might cause HS to get confused as phone had
already updated correct call states in CIND response during SLC.
This may cause HS to behave abnormally like delayed response to
BCS as seen with jabra wave +.

Fix:
Avoid sending incorrect call updates post SLC since we already
have sent correct updates during SLC as reponse to CIND.

Change-Id: I53e57baf7cca782af6f374a043667971c66a956d

9 years agoUpdate held call state to connected headset
Mallikarjuna GB [Thu, 21 May 2015 12:28:12 +0000 (17:58 +0530)]
Update held call state to connected headset

In a three way call scenario, when an active
call is dropped by remote, the single held call
state is not updated to the connected headset.
This change will make sure that it is updated
properly.

Change-Id: I558602e791279d510edb23989b125cd8f7a7ebde

9 years agoam a954124f: Add support for MITM for BluetoothSockets (4/4)
Casper Bonde [Wed, 3 Jun 2015 04:03:54 +0000 (04:03 +0000)]
am a954124f: Add support for MITM for BluetoothSockets (4/4)

* commit 'a954124fc5429f259e47258af64e159c621cc6e0':
  Add support for MITM for BluetoothSockets (4/4)

9 years agoAdd support for MITM for BluetoothSockets (4/4)
Casper Bonde [Thu, 21 May 2015 09:07:52 +0000 (11:07 +0200)]
Add support for MITM for BluetoothSockets (4/4)

This change adds an option to enforce Man-in-the-middle protection
for the authentication process. This feature is needed for the Sim
Access Profile.

Change-Id: I2eda507ffdcb4a194434adedf207e1e9951b80c3
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
9 years agoam 56a3be0d: Replace malloc/calloc/free with osi_malloc/osi_calloc/osi_free
Pavlin Radoslavov [Wed, 3 Jun 2015 02:22:59 +0000 (02:22 +0000)]
am 56a3be0d: Replace malloc/calloc/free with osi_malloc/osi_calloc/osi_free

* commit '56a3be0d6eaa1bc264736e399fb32d3094f0b513':
  Replace malloc/calloc/free with osi_malloc/osi_calloc/osi_free

9 years agoam 1b0f1077: SAP: Change to use new SDP Api (1/4)
Casper Bonde [Wed, 3 Jun 2015 02:22:12 +0000 (02:22 +0000)]
am 1b0f1077: SAP: Change to use new SDP Api (1/4)

* commit '1b0f107768ba1a0f93abf68851bacbe650f27eff':
  SAP: Change to use new SDP Api (1/4)

9 years agoReplace malloc/calloc/free with osi_malloc/osi_calloc/osi_free
Pavlin Radoslavov [Tue, 2 Jun 2015 20:54:58 +0000 (13:54 -0700)]
Replace malloc/calloc/free with osi_malloc/osi_calloc/osi_free

There were several leftover places that were still using
malloc/calloc/free .
Those are replaced to use osi_malloc/osi_calloc/osi_free like
majority of the rest of the code.

Note: There are few remaining places that are still using
malloc/calloc/free:
 * Some of the unit tests
 * audio_a2dp_hw/audio_a2dp_hw.c
   It is used as part of the audio.a2dp.default.so library,
   and the bluetooth.default.so library
   Its usage of malloc/calloc/free should be refactored
   independently.

Change-Id: Iafbed996e5f1ae8eb1343fb2acfadf32e515e419

9 years agoSAP: Change to use new SDP Api (1/4)
Casper Bonde [Thu, 16 Apr 2015 13:21:27 +0000 (15:21 +0200)]
SAP: Change to use new SDP Api (1/4)

Added support for Sim Access Profile (SAP) in the SDPManager.
To make it easier to test, both SDP record creation and seach
is added.

Change-Id: Idae480fb64224e0e5dec7fb07ff4efb9312a5461
Signed-off-by: Casper Bonde <c.bonde@samsung.com>
9 years agoam 5feb0af8: Fix memory corruption due to BLE multi-adv macro
Sunny Kapdi [Tue, 2 Jun 2015 18:06:06 +0000 (18:06 +0000)]
am 5feb0af8: Fix memory corruption due to BLE multi-adv macro

* commit '5feb0af81d30dbcc33ea2ffb10714a58dd0cef09':
  Fix memory corruption due to BLE multi-adv macro

9 years agoFix memory corruption due to BLE multi-adv macro
Sunny Kapdi [Tue, 2 Jun 2015 05:21:28 +0000 (22:21 -0700)]
Fix memory corruption due to BLE multi-adv macro

INST_ID_IDX_MAX macro was not protected with parenthesis, resulting
in incorrect calculation of the size needed to allocate memory for
the client_if map.

Change-Id: Ib3591f4f9ac7288f2191e9078a71aab431ca7130

9 years agoam 87072892: HID: Handle closing of uhid driver in case failure
Hemant Gupta [Tue, 2 Jun 2015 14:25:08 +0000 (14:25 +0000)]
am 87072892: HID: Handle closing of uhid driver in case failure

* commit '87072892dc006f4c037aae0a346eda6c18e6b8ba':
  HID: Handle closing of uhid driver in case failure

9 years agoam 6ba8fda6: Add proper checks for PAN & BNEP in BD stack
Hemant Gupta [Tue, 2 Jun 2015 14:24:42 +0000 (14:24 +0000)]
am 6ba8fda6: Add proper checks for PAN & BNEP in BD stack

* commit '6ba8fda60a9137a9f53f7e14edd87184610744fc':
  Add proper checks for PAN & BNEP in BD stack