Skip to content
Snippets Groups Projects
  1. 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
    • 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
  2. Aug 18, 2018
  3. 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
  4. Aug 16, 2018
  5. Aug 15, 2018
  6. 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
  7. Aug 13, 2018
  8. Aug 09, 2018
  9. Aug 08, 2018
  10. 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
  11. Aug 06, 2018
  12. Aug 03, 2018
  13. Aug 02, 2018
    • Jack He's avatar
      Use MessageLoopThread in A2DP source, JNI, BTA, HCI and module bring-up · ca544f4a
      Jack He authored
      am: 63d2fa3e
      
      Change-Id: I1093576b83d19cac3a11ff4d81173d97604d2a4d
      ca544f4a
    • Jack He's avatar
      Add MessageLoopThread, ExecutionBarrier, and performance tests · 148a4b50
      Jack He authored
      am: 0ac5b1b6
      
      Change-Id: I040d328e642b351420f9a1f4eb35e6c0dc09a74e
      148a4b50
    • Jack He's avatar
      Use MessageLoopThread in A2DP source, JNI, BTA, HCI and module bring-up · 63d2fa3e
      Jack He authored
      * Replace OSI thread with MessageLoopThread in
        - btif_a2dp_source (A2DP encoding thread)
        - btif_core (JNI thread)
        - btu_init (BTA thread)
        - hci_layer (HCI thread)
        - module (module bring up thread)
        - various unit test threads
      * Code that uses reactor from OSI thread is not replaced in this change
        because they need to move from using reactor to message loop first
      * Main difference:
        - HCI layer no longer has access to mutex protecting message loop
          set up and tear down. Messages posted to thread after ShutDown()
          is called become no-op
        - In all cases QuitClosure() is used instead of QuitWhenIdleClosure().
          This means that we will never force kill a thread. An infinite loop
          will delay the shutdown of Bluetooth stack.
      * do_in_hci_thread is actually do_in_bta_thread
      * Move the definition of do_in_bta_thread from bta to btu since btu is
        where the thread actually lives
      * Remove bta_closure_api.h and replace it with stack/include/btu.h
      * Remove header inclusion in bta_sys.h and include stack/include/btu.h
        in individual compilation units
      * Fixed a bug in btif_cleanup_bluetooth where btif_jni_disassociate()
        was not called on the JNI thread
      * Make setting real time priority a requirement
      * Crash during the following scenario:
        - When btif_profile_queue cleanup failed to be scheduled on JNI thread
        - When A2DP encoder thread failed to gain real time priority
        - When BTA thread failed to start up
        - When BTA thread failed to gain real time priority
        - When BTA thread failed to schedule its first callback
      * Turn off Bluetooth in the following scenario:
        - When HCI thread failed to gain real time priority
        - When bt_workqueue thread failed to gain real time priority
      
      Bug: 110303473
      Test: make, native and Java unit tests,
            Connect to headset and listen to music through A2DP,
            testplans/details/184455/3975
      Change-Id: Ib448992fc0ba5af82c2d117dd65f1abd45d2acb6
      63d2fa3e
    • Jack He's avatar
      Add MessageLoopThread, ExecutionBarrier, and performance tests · 0ac5b1b6
      Jack He authored
      * Add MessageLoopThread to abstract thread implementation to our code
      * Add ExecutionBarrier utility class to help with thread synchronization
      * Add more performance tests and performance benchmarks to evaluate
        execution efficiency in both batch and sequential usages, for various
        thread implementations including:
        - libosi reactor on pthread
        - MessageLoop on libosi reactor on pthread
        - MessageLoop on STL std::thread
        - MessageLoop on Posix pthread
        - MessageLoop on libchrome base::Thread
        - MessageLoop on MessageLoopThread
      
      Bug: 110303473
      Test: make, native and Java unit tests,
            test/run_benchmarks.sh net_benchmark_thread_performance,
            test/run_unit_tests.sh net_test_performance,
            test/run_unit_tests.sh bluetooth_test_common,
            testplans/details/184455/3975
      Change-Id: I5b4ce2ee910a0f1d2edf95e0296916dea04d3f89
      0ac5b1b6
  14. Aug 01, 2018
  15. Jul 31, 2018
  16. Jul 30, 2018
Loading