1. 12 Jan, 2016 3 commits
  2. 11 Jan, 2016 2 commits
    • Andre Eisenbach's avatar
      Assert on memory allocation failure · c02acb77
      Andre Eisenbach authored
      This CL is a pre-cursor to cleaning up repeated memory allocation code
      full of null-pointer checks. In the vast majority of cases in the
      Bluetooth stack, a failed allocation is not recoverable and results in
      undefined behaviour. By asserting, we can ensure we have a shot at
      catching and fixing any issues not caused by OOM conditions.
      
      Bug: 26494317
      Change-Id: I53dff98c596068211934a1808f90de2d4484f952
      c02acb77
    • Jakub Pawlowski's avatar
      9f41ecbc
  3. 07 Jan, 2016 3 commits
  4. 06 Jan, 2016 3 commits
    • Ajay Panicker's avatar
      net_test_bluetooth: fix inconsistency in set/get name test · 19cd152d
      Ajay Panicker authored
      Fixed an issue where the set/get name test would fail every so often
      due to the fact that the old name property would become invalid after
      the properties array was freed. 
      
      Bug: 25793348
      Change-Id: I4513219da2fb947b3b199f25a61c308b9fced8b6
      19cd152d
    • Sharvil Nanavati's avatar
      Fix bug where a bonded device could enter BONDING and BONDED states again. · 0b7fc589
      Sharvil Nanavati authored
      The following sequence of events was observed:
      - start bonding with device A
      - bond state for A goes from 10 -> 11 -> 12
      - everyone's happy
      - start bonding with device B
      - bond state for B goes from 10 -> 11
      - bond state for A goes from 12 -> 11 -> 12
      
      The bond state for A should not have been changed in the last step
      since it was not participating in any bonding procedure at the time.
      
      The above sequence can be reproduced if a device D bonds with
      A and takes on the slave role and then D bonds with B and switches
      to a master role. When D performs the role switch, it receives an
      updated link key from A.
      
      Since the link key update procedure is tied in with the pairing flow,
      we see spurious bond state changes. This CL checks the pairing control
      block to see if D is, in fact, pairing with A and if not, it skips the
      bond state updates.
      
      Bug: 25870383
      Change-Id: Ic6ff548dbe4e960c965bdc9ef5c50a263b9b3b22
      0b7fc589
    • Andreas Gampe's avatar
      Bluetooth: Remove std=c++11 · 32579680
      Andreas Gampe authored
      It's the default now.
      
      Change-Id: Ice463e6e74d56bffd00a80824721dbe57241ea06
      32579680
  5. 05 Jan, 2016 7 commits
  6. 30 Dec, 2015 2 commits
    • Hemant Gupta's avatar
      Fix RFCOMM Rx speed of transfer · b2c46a45
      Hemant Gupta authored
      Use Case:
      1. OPP Rx use case on the DUT Side
      2. Transfer 10Mb+ of file from remote to DUT
      3. Observe speeds over RFCOMM (expected 1.5Mbps+)
      
      Failure:
      Actual speeds lesser than 1.5Mbps
      
      Root Cause:
      Rx bottlenecks seen due to frequent timer operation
      during incoming data on RFCOMM
      
      Fix:
      BUSY and IDLE states of BT Power manager are already
      handled inside the stack and no need to explicitly set
      IDLE and BUSY states from JV layer anymore.
      
      Bug: 22487461
      Change-Id: Icdc25c52103d6a849cc6e12656d9c69f5e152b05
      b2c46a45
    • Marie Janssen's avatar
      Fix flaky AlarmTest.test_set_long_* · ac786e36
      Marie Janssen authored
      The "long" tests need some leeway for the timer to be checked because
      sometimes it takes ~1-2ms to check timers for wakelock scheduling.
      
      Bug: 26140385
      Change-Id: I362166f1d93a811f3933776294775b594226ab30
      ac786e36
  7. 28 Dec, 2015 1 commit
  8. 23 Dec, 2015 5 commits
    • Andre Eisenbach's avatar
    • Devin Kim's avatar
      Fix BT connection failures · 78500516
      Devin Kim authored
      When HFP connection failed establishing between phone and watch, it can't
      recover RFCOMM status which causes that HFP connection will not be made
      unless BT radio goes off and comes back on. RFCOMM and HFP both trying to
      open RFCOMM control channel at nearly same time, at some point, there's
      a possibility that SABM packet didn't reach out to BT controller to connect
      to phone from watch with HFP while phone tries to connect to watch with
      AW RFCOMM.
      
      This will take care of pending SABM packet to reach out to controller
      properly so that RFCOMM status will not be messed.
      
      Bug: 24285000
      Bug: 25579482
      Bug: 25579423
      Bug: 25578997
      Change-Id: Icc26b86c644ebd8d1c12a2fb4e94d04ba16cc2dd
      78500516
    • Andre Eisenbach's avatar
      Remove "block" parameter from eager_reader_read() · b9757ee3
      Andre Eisenbach authored
      Setting this parameter to true did not work and did not behave as
      expected. The functionality provided by this parameter is also not
      necessary, thus removing code.
      
      Change-Id: I29e60da4adf1d1fc84d8ec9a590de89e94bb7900
      b9757ee3
    • Andre Eisenbach's avatar
      Properly reset NONBLOCK flag in semaphore_try_wait() · 48df46b8
      Andre Eisenbach authored
      Without this fix, calling semaphore_try_wait() on a semaphore that
      wasn't currently set, would leave the NONBLOCK flag on the file
      descriptor as a side-effect.
      
      Also added a unit test for semaphores, including a test specifically for
      this condition.
      
      Change-Id: I0ea37bb68b14c76febaab25b3aee1bb4f5acee8c
      48df46b8
    • Ajay Panicker's avatar
      net_test_bluetooth: Improve set/get name logic · 4bb76538
      Ajay Panicker authored
      Without this CL semaphore_wait would instantly return due to the fact
      that enabling the adapter would cause the properties callback to post
      immediatly. Also prevented the test from returning a false positive if the
      original device name was the same as the test name.
      
      Change-Id: I987efcb9a5ef58209d37d2fc21f3c149fb3e556c
      4bb76538
  9. 22 Dec, 2015 2 commits
    • Andre Eisenbach's avatar
      Blacklist devices for absolute volume control · d0aa6cc5
      Andre Eisenbach authored
      Some devices do not play well with absolute volume control. They either
      play back music at unacceptably loud volume levels or provide
      insufficiently granular volume control where a single "step" of volume
      change results in unexpectedly large jumps in volume.
      
      Bug: 26070064, 26060431
      Change-Id: I5a336fba87119325b47a5ad385e9c48a631f2121
      d0aa6cc5
    • Ajay Panicker's avatar
      net_test_bluetooth: fix set and get name tests · ddf67ab9
      Ajay Panicker authored
      Fixed the get and set name tests so that they are more consistent and robust.
      
      Change-Id: I4b76357eff05531c4e52cd6de03eb3b8b969062b
      ddf67ab9
  10. 21 Dec, 2015 1 commit
  11. 18 Dec, 2015 2 commits
    • Christopher Wiley's avatar
      Remove dependency on base::Hash · a961da5e
      Christopher Wiley authored
      This function is changing to just use std::hash anyway.  This is
      slightly less efficient because of the copies, but doing it inline
      makes the cost more explicit to bluetooth authors.
      
      Bug: 26253162
      Change-Id: I940ea8ce8aa27808cef8a8b9398a7756db3b5ca3
      Test: Compiles
      a961da5e
    • Marie Janssen's avatar
      Fix memory leak in vendor layer · e17b696e
      Marie Janssen authored
      When the vendor library transmits without giving a callback, the vendor
      translation receives a buffer it's in charge of deallocating.
      
      When there is a callback, it's the vendor library's job to deallocate
      it.
      
      Change-Id: I65b0a037b28103ba46a33a1baea942f7e724eb7c
      e17b696e
  12. 17 Dec, 2015 1 commit
  13. 16 Dec, 2015 2 commits
    • Andreas Gampe's avatar
      Bluetooth: Silence warnings · a80c731f
      Andreas Gampe authored
      Silence unused-parameters warnings coming from libchrome.
      
      Bug: 26228533
      Change-Id: I08bc474c905cd2cf7b1c0492ee37187c499ddf52
      a80c731f
    • Ajay Panicker's avatar
      net_test_bluetooth: GATT test refactor · f261cf86
      Ajay Panicker authored
      Properly integrating the GATT tests in net_test_bluetooth to utilize GUnit
      correctly. Contains all the GATT tests and the base class the GATT tests use.
      Also reorganized the files.
      
      Bug: 25793348
      Change-Id: I5a547a2528c20d6baa9b1fb6d0b956f718d736cc
      f261cf86
  14. 15 Dec, 2015 1 commit
  15. 14 Dec, 2015 1 commit
    • Arman Uguray's avatar
      service: Add global scan support getters · 6791e9ab
      Arman Uguray authored
      Added a mutex that protects the local_le_features structure inside
      Adapter. Added the following functions related to scan support:
      
        - Adapter::GetTotalNumberOfTrackableAdvertisements
        - Adapter::IsOffloadedFilteringSupported
        - Adapter::IsOffloadedScanBatchingSupported
      
      Bug: 25744656
      Change-Id: Id4d63486d1c51f2eddbd095a0a3ef6e6bb80c529
      6791e9ab
  16. 12 Dec, 2015 2 commits
    • Arman Uguray's avatar
      service: Add scan structures · 57dcd7e4
      Arman Uguray authored
      Added the ScanFilter, ScanSettings, ScanResult structures that are
      used in the BLE scan API.
      
      Bug: 25744656
      Change-Id: Id1bb28e7ebe85fd40013876aa097e1d0f0a4e471
      57dcd7e4
    • Arman Uguray's avatar
      service: Add connection state tracking to Adapter · 0f29c005
      Arman Uguray authored
      Added the IsDeviceConnected method to Adapter and also an
      Observer method that other components can use to track the ACL
      state between the local adapter and a remote device.
      
      Bug: 25157450
      Change-Id: If9bc25ab58b4a9b5430753405fb64834c0946050
      0f29c005
  17. 10 Dec, 2015 2 commits