Skip to content
Snippets Groups Projects
  1. Sep 17, 2018
  2. Sep 14, 2018
  3. Sep 13, 2018
    • Hansong Zhang's avatar
      Add Timer as an alternative to osi alarm · f05a8c49
      Hansong Zhang authored
      * Add a private method MessageLoopThread.DoInThreadDelayed to post a
        delayed task in message loop, as an alternative approach to osi alarm
        clock
      * Add a unit test for MessageLoopThread to check ShutDown() waits until
        current task finishes
      * Add Timer using MessageLoopThread.DoInThreadDelayed
      * Timer provides similar API as osi alarm, and uses same OS clock (boot
        timer) as alarm
      * Add benchmark and unit tests to ensure the performance is comparable
        to the existing osi alarm
      
      Test: Run unit test and benchmark test
            ./test/run_unit_tests.sh bluetooth_test_common
            ./test/run_benchmarks.sh bluetooth_benchmark_timer_performance
            --benchmark_repetitions=10 --benchmark_report_aggregates_only=true
      Bug: 110303473
      Change-Id: I6f2e7ae2f80f9889fc5fe3c8cd6b9b2670938b46
      f05a8c49
    • Treehugger Robot's avatar
      76250727
  4. Sep 12, 2018
  5. Sep 11, 2018
    • Pavlin Radoslavov's avatar
      Add a check whether an A2DP codec is supported before including it · f82ec2bf
      Pavlin Radoslavov authored
      Some of the A2DP SRC or SNK codecs might not be supported if the
      corresponding shared library is not included.
      Don't include such codecs when configuring and registering
      the stream end points on the local device.
      
      Bug: 112839060
      Test: Manual - remove A2DP codec shared libraries and check the
            returned AVDTP Capabilities
      Change-Id: Ia8fbdac915b208f9950ef7c9f50e3e0dc87e9111
      f82ec2bf
    • Ajay Panicker's avatar
      Add extractBE to the Bluetooth Packets Iterators · 3dfd5a76
      Ajay Panicker authored
      ExtractBE allows data to be extracted from Bluetooth packets in a big
      endian format.
      
      Bug: 114751344
      Test: run net_test_btpackets
      Change-Id: Ib01d726893e106d34c11048acc09fee201d81c09
      3dfd5a76
  6. Sep 10, 2018
  7. Sep 09, 2018
  8. Sep 07, 2018
  9. Sep 06, 2018
    • Chienyuan's avatar
      Allocate lcb when connection complete if can't find one · 9c751d23
      Chienyuan authored
      When BT stack sends create connection command and receive connection
      request at the same time, connection request will reuse the link control
      block created by create connection command. But the link control block
      will be released before connection complete due to controller busy.
      
      Bug:112818458
      Test: manual - turn on BT and turn on Headset within little time gap
      Change-Id: Ie30c655b933250f1709ba10c578ea5f30ea13139
      9c751d23
  10. Aug 29, 2018
  11. Aug 28, 2018
    • Joseph Pirozzo's avatar
      AVRCP Controller media session queue · bf361630
      Joseph Pirozzo authored
      Add support for the Now Playing Content available through AVRCP to
      receive proper notifications when it changes and expose it via media
      session rather than a node in the browse tree.
      
      Bug: 78598689
      Test: Stream Music, change songs and playlist, verify media session
      queue.
      
      Change-Id: I46c32d05c5a674388c9e59830ec0596432cd78ef
      bf361630
    • Yamei Du's avatar
      Fix out-of-bounds reading in btm_ble_vendor_capability_vsc_cmpl_cback · 21563c5a
      Yamei Du authored
      8 bits parameters get 16 bits from buffer in btm_ble_vendor_
      capability_vsc_cmpl_cback, which would cause out-of-bounds reading.
      Correct STREAM_TO_UINT16 to STREAM_TO_UINT8
      
      Test: manual
      Bug: 112167084
      Change-Id: Id2b71a8f74eee5d93f287d4705aadab449c55fce
      21563c5a
    • Ajay Panicker's avatar
      Don't add items to a response if a previous item fails to be added · 315dcd4f
      Ajay Panicker authored
      Bug: 112164711
      Test: Run native test net_test_avrcp
      Change-Id: Iace287bb716b28eda62a8a0500deb99cc46ae485
      315dcd4f
    • Treehugger Robot's avatar
    • Ajay Panicker's avatar
      Set the AVRCP Browsing MTU for a device after browse open · 750124f1
      Ajay Panicker authored
      Trying to get the Browsing MTU before the Browsing channel is opened
      returns the minimum MTU. This leads to smaller browsing messages than
      expected.
      
      Bug: 113160447
      Test: Connect to device and see that Avrcp Browse packets are the
      correct size
      
      Change-Id: Iefda855d0a777439a8a6829619bc4c5543b62eaf
      750124f1
    • Jack He's avatar
      Make thread names more meaningful · 08720ac7
      Jack He authored
      * Rename threads:
        - module_wrapper -> bt_module_lifecycle_thread
        - btif_a2dp_sink_worker_thread -> bt_a2dp_sink_worker_thread
        - btif_a2dp_source_thread -> bt_a2dp_source_worker_thread
        - bt_jni_workqueue -> bt_jni_thread
        - stack_manager -> bt_stack_manager_thread
        - hci_thread -> bt_hci_thread
        - bt_workqueue -> bt_startup_thread
        - btu_message_loop -> bt_main_thread
      * Rename functions:
        - do_in_bta_thread -> do_in_main_thread
        - get_message_loop -> get_main_message_loop
        - post_to_hci_message_loop -> post_to_main_message_loop
      * Refactored bta_sys_sendmsg
      
      Bug: 110303473
      Test: make, unit test, stream music
      Change-Id: I3051f6ea2d33db37af8eebafba7db4d1e113f611
      08720ac7
  12. Aug 27, 2018
    • Jack He's avatar
      Common: Replace ExecutionBarrier with std::promise and std::future · 7fc931a4
      Jack He authored
      * std::promise and std::future are able to achieve the same
        functionalities of ExecutionBarrier with extra flexibility
      * Replace "_barrier" with "_promise" in system/bt/common
      
      Bug: 110303473
      Fixes: 112159657
      Test: mm -j40, unit test
      Change-Id: I2a420bbf16bf92e4b3dd256d9f23480fc2be7be1
      7fc931a4
    • Pavlin Radoslavov's avatar
      Run the wakelock JNI callbacks on the JNI thread · 34bd633f
      Pavlin Radoslavov authored
      All JNI callbacks must be on the JNI thread, otherwise this could
      impact the threads' operation.
      
      Bug: 111277984
      Test: A2DP streaming
      Change-Id: I94fa4500aea62a574c80749e904434e46eb4e942
      34bd633f
    • Treehugger Robot's avatar
    • Jack He's avatar
      Move metrics and time library to libbt-common · 42823985
      Jack He authored
      * libbt-osi is being deprecated and libbt-common will replace it
      * Move recently implemented metrics library to libbt-common
      * Move time library from libbt-osi to libbt-common and renamed as time_util
        to avoid potention name collision with system time libraries
      * Need to keep time library for now because we need to use
        CLOCK_BOOTTIME that include system suspension time for A2DP encoding
      * Use libchrome logging methods in metrics library
      * Put both metrics and time_util into bluetooth::common namespace
      * Return uint64_t for time_get_os_boottime_ms and update various
        receiver types
      * Remove tBTM_CB.max_collision_delay and use the constant
        BTM_SEC_MAX_COLLISION_DELAY instead
      
      Bug: 111568640
      Test: mm -j40, unit test, stream music
      Change-Id: I8c384a810d592bb6b9eb322134e947d066489ba4
      42823985
  13. Aug 26, 2018
  14. Aug 25, 2018
  15. Aug 23, 2018
    • Treehugger Robot's avatar
      197aeea2
    • Nitin Shivpure's avatar
      L2CAP: Handle no idle timeout (0xFFFF) · ef617c38
      Nitin Shivpure authored
      Precondition:
      1. DUT acts as GATT server.
      2. Remote acts as Gatt Client
      
      Use case:
      1. Remote device starts BLE scan
      2. Remote device connects to DUT
      3. Remote device keeps on sending notifications to DUT
      
      Expected result:
      Connection should be active after 18 hours
      
      Observed Result:
      Connection is dropped after 18 hours due to l2c_link_timeout.
      
      Root Cause:
      L2CAP is not properly handling no idle timeout(0xFFFF) and 65535000 ms
      timer gets started after BLE connection, leading to connection getting dropped
      after 18 hours.
      
      Fix:
      If there is no L2CAP dynamic ccb and no idle timeout is configured for
      GATT or any other fixed  channel, then cancel existing LCB timer.
      
      Test: No BLE disconnection seen after 18 hours
      
      Bug: 112249120
      Change-Id: I58766564cf62efb7af0869035115459bae37c558
      ef617c38
    • Stanley Tng's avatar
      Clear connection update pending flag when disconnected · c319c30f
      Stanley Tng authored
      For the hearing aid profile and when we get disconnection
      while there is a pending connection update, then clear the flag so that
      the next connection update can proceed.
      
      Bug: 112050972
      Test: Manual test to check for regressions
      Change-Id: I54635a680cf276cf6c9f94520943c3efa97e77ec
      c319c30f
  16. Aug 21, 2018
  17. Aug 20, 2018
    • Jack He's avatar
      Disable CFI verification for stack_rfcomm test that uses gtest+gmock · 72a7366b
      Jack He authored
      Apparently, the CFI verification crashes unit tests that
      are using gtest+gmock. Interestingly, those tests succeed for 32-bit
      binaries, and fail for 64-bit binaries.
      
      Bug: 71739588
      Test: Running the 64-bit version of the unit tests in test/run_unit_tests.sh
      Change-Id: Ic950087181a86d08af1b858272e946ef4125b78a
      72a7366b
    • Jack He's avatar
      A2DP-SINK: Use MessageLoopThread for decoding · 74324cbd
      Jack He authored
      * Instead of OSI thread, use MessageLoopThread for decoding
      * Similar to A2DP source
      * Change tBTIF_A2DP_SINK_CB into a proper class BtifA2dpSinkControlBlock
      * Initialize variables in BtifA2dpSinkControlBlock's constructor
      * Free un-freed variables in BtifA2dpSinkControlBlock::Reset() method
      
      Bug: 110303473
      Test: mm -j40, unit test, stream music
      Change-Id: I21f5b0c9f88d2cadada6fc854070d31ac378244f
      74324cbd
    • Ted's avatar
      Fix "Disable Absolute Volume" Bluetooth developer option · a7fd72e6
      Ted authored
      Do not report device support absolute volume while
      "Disable Absolute Volume" in developer option is enabled or
      the remote device is listed in the interoperability database.
      
      Test: manually adjust volume when Disable Absolute Volume is enabled
      Bug: 112193362
      Change-Id: Id63a22dba0d8a871035774fc86b66d32e9225b48
      a7fd72e6
    • Sunny Kapdi's avatar
      A2DP Offload: Fix Max AVDTP MTU for Offload · a96e9b3c
      Sunny Kapdi authored
      Fix the max AVDTP MTU for Offload to what
      can fit in a 3DH5 packet after accounting
      for AVDTP and L2CAP header.
      
      Also:
       - Moved MAX_2MBPS_AVDTP_MTU and MAX_3MBPS_AVDTP_MTU to the common
         avdt_api.h so it can be used by the rest of the code
       - Removed previously incorrect value of BTA_AV_MAX_A2DP_MTU and
         replace it with the new (correct) value of MAX_3MBPS_AVDTP_MTU
       - Removed duplicate define of MAX_2MBPS_AVDTP_MTU and use
         the one from avdt_api.h
      
      Bug: 78907438
      Test: A2DP Streaming
      Change-Id: I2c60c34c33e4164c9f7e2e7362bbb600482dec97
      a96e9b3c
  18. Aug 18, 2018
  19. Aug 17, 2018
    • Jack He's avatar
      Replace period_ms_t with uint64_t · 398d5ada
      Jack He authored
      * There is no need to define a unit for millisecond in our system since
        uint64_t is the largest integer that is supported
      * period_ms_t results in many unnecessary dependency on
        osi/include/time.h
      * Used text editor to do the directory wise replacement, basically
          sed -i 's/period_ms_t/uint64_t/g' *
      * Need to modify several method and variable names to indicate that they
        are using millisecond as time unit
      
      Bug: 110303473
      Test: build, no functional change as period_ms_t was a typedef of
            uint64_t
      
      Change-Id: I497c9a146a97bab7c7477b358847dad958b92034
      398d5ada
  20. Aug 16, 2018
Loading