Skip to content
Snippets Groups Projects
  1. Aug 28, 2018
    • 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
  2. 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
  3. Aug 26, 2018
  4. 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
  5. Aug 21, 2018
  6. 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
  7. Aug 18, 2018
  8. 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
  9. Aug 16, 2018
  10. Aug 15, 2018
  11. Aug 14, 2018
    • Treehugger Robot's avatar
    • Treehugger Robot's avatar
      5e61a630
    • Qiyu Hu's avatar
      Fix reliable write. · 8799d2db
      Qiyu Hu authored
      We cannot simply assume the write is terminated in reliable write. When
      the reliable write value is longer than MTU allows, the current
      implementation can only send whatever MTU allows and naively set the
      status to GATT_SUCCESS, in the name of "application should verify handle
      offset and value are matched or not". That's why MTU negotiation is a
      workaround as people mention in b/37031096, which just fits all the write
      value into a single request.
      
      This also blocks our test on CtsVerifier.
      
      Bug: 37031096
      Test: Manual test and confirm that we don't simply send partial value
      Change-Id: I907877608f4672f24c002e630e58bf9133937a5e
      8799d2db
    • Hemant Gupta's avatar
      HID: Remove device from database in error case · 8f2db260
      Hemant Gupta authored
      Usecase:
      1) Pair and connect with remote hid device.
      2) Disconnect with remote hid device.
      3) Unpair DUT from remote hid device.
      4) Send connect request from hid device by pressing any button.
      5) Try to pair and connect DUT with remote hid device.
      
      Expected Result
      1) Connection should fail after step 4 if remote device does not initaite pairing.
      2) Connection should succeed with remote device and hid device should be added to
      paired list and hid operations should work properly.
      
      Observed Result
      HID operations from remote device starts working without device added to paired list
      and UI stucked at pairing.
      
      Root Cause:
      After step 4, device should be removed from database when incoming connection is
      rejected.
      
      Fix:
      Perform virtual unplug for device when connection request for hid is received from
      unpaired device.
      
      Test: Issue is not reproducible after stress testing with above change
      
      Bug: 68176469
      Change-Id: I9bc72ccc7a849c0d6acf3230a75e1fe95949b3fe
      8f2db260
    • Ugo Yu's avatar
      Enable SNIFF mode for HFP · 29b5edf8
      Ugo Yu authored
      Bug: 112285337
      Test: Manual
      Change-Id: Ibb019d11cf93051a198df4efb7bd79f31c15a9c0
      29b5edf8
    • minle.zuo's avatar
      HFP: Only active BT device can hung up call · 73f743c9
      minle.zuo authored
      Some inactive devices can't send hung up key to host when
      HFP connected and active call exist.
      And other inactive devices can send hung up call by
      sending hung up command.
      
      Solution: To keep consistency of this behavior, 
      only allow active BT device to hung up call.
      
      Test: Active device can hung up call and inactive can't hung up
      
      Change-Id: Iec1ae689f1d40c15199707e9e925814f71ded619
      73f743c9
    • Bailey Forrest's avatar
      Check startup_future before using it · d7aefbf8
      Bailey Forrest authored
      event_finish_startup and startup_timer_expired can race, leading one of
      them to try to use startup_future when it is NULL.
      
      Check startup_future still exists before using it.
      
      Bug: 112114060
      Test: Use Bluetooth
      Change-Id: I018d45f070b3f931c1114abf0471b6ea1d524f2a
      d7aefbf8
  12. Aug 13, 2018
  13. Aug 09, 2018
  14. Aug 08, 2018
  15. Aug 07, 2018
    • Joseph Pirozzo's avatar
      Reduce Media State change callbacks · 306c6ca1
      Joseph Pirozzo authored
      Eliminate the 2 second timer and only update media state when it
      changes.
      
      Bug: 28917369
      Test: Play music, pause and change its position observe status is
      correct.
      
      Change-Id: Iaf17e8cde570651706c55603b01c5100d4c60aa4
      306c6ca1
    • Pirama Arumuga Nainar's avatar
      Reorder static libs to appease ld.gold linker · 9ecbd6eb
      Pirama Arumuga Nainar authored
      Bug: http://b/112277682
      Bug: http://b/79419131
      
      Lld, which is the default linker for the platform, is able to resolve
      symbols across libraries irrespective of the order they appear in the
      command line.  This was not the case for ld.gold and other linkers.
      Unfortunately, there are some targets that still rely on ld.gold
      (pgo-taimen-config1 in internal release branch being one of
      them).
      
      With http://aosp/721652, libbt-stack should be added before libbt-common
      so MessageLoopThread::~MessageLoopThread is resolved correctly.  If not,
      the following error is reported by gold:
      
      system/bt/stack/btu/btu_init.cc:41: error: undefined reference to
      'bluetooth::common::MessageLoopThread::MessageLoopThread(std::__1::basic_string<char,
      std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
      
      Test: m USE_CLANG_LLD=false
      Change-Id: I9c8208218ffb4bb027ad75b51bcd484e9bb37368
      9ecbd6eb
    • Joseph Pirozzo's avatar
      AVRCP Controller metadata feature · 46398430
      Joseph Pirozzo authored
      Process the METADATA feature flag separately from the VENDOR feature
      flag to ensure it doesn't get overwritten.
      
      Bug: 110039732
      Test: connect avrcp from phone verify getCapabilities events supported
      is sent.
      
      Change-Id: Ib5d54c13d6c912904f20e8760f1632fa5737b98f
      46398430
  16. Aug 06, 2018
Loading