Skip to content
Snippets Groups Projects
  1. Aug 06, 2018
  2. Aug 03, 2018
  3. Aug 02, 2018
    • 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
  4. Aug 01, 2018
  5. Jul 31, 2018
    • Venkata Jagadeesh's avatar
      Add security handling for LE connection oriented channels · e12fd994
      Venkata Jagadeesh authored
      Use case:
      Run PTS test cases TP/LE/CFC/BV-10-C to BV-16-C
      
      Steps:
      1. These test cases executed with two DUT as PTS support not available
      2. Set desired security level on DUT and Remote with tool
      3. Initiate LE COC connection request from DUT
      
      Failure:
      LE COC connection accepted though even remote security are not met.
      
      Fix:
      Added security handling for COC connection
      
      Test: Ran sl4a test for BleCocTest
      Change-Id: I5f6385d462698582e701b5a07953c0ccb932bbbf
      e12fd994
    • Aiswarya Cyriac's avatar
      Fix for Bluetooth device name is resetting to default name after reboot · b8b3655f
      Aiswarya Cyriac authored
      
      Reason: When the BT device name is updated is getting saved to the
      config data pointer but not to the persistent data (i.e. bt_config.conf).
      So, when the reboot is happening it is not able to get the updated device
      name from the persistent data (i.e. bt_config.conf) as during reboot
      bt_config_flush is not called.
      
      Fix: Saving the BT Device name to persistent data using btif_config_flush
      once it is set.
      
      Test: Manual Reboot test
      Bug: 110301897
      Change-Id: Ie329b475eaaf208ed667f27e271a00e230e4b95c
      Signed-off-by: default avatarAiswarya Cyriac <aiswarya.cyriac@intel.com>
      Signed-off-by: default avatarGaganpreet kaur <gaganpreetx.kaur@intel.com>
      b8b3655f
  6. Jul 30, 2018
  7. Jul 27, 2018
    • Joseph Pirozzo's avatar
      Set Browsed Player memory allocation · 30ce2b12
      Joseph Pirozzo authored
      When setting a browsed player memory for folder depth was incorrectly
      allocated based on folder item count not depth.
      
      Bug: 111370532
      Test: Set a browsed player that has a depth greater than item count.
      Change-Id: I6984c5852f623e7e9478429bdab3dcbcf57196e0
      30ce2b12
  8. Jul 26, 2018
  9. Jul 25, 2018
  10. Jul 24, 2018
  11. Jul 18, 2018
    • Hansong Zhang's avatar
      Clean up style in BLE White List code · 555a8d03
      Hansong Zhang authored
      * Remove unused code
      * Update BgConnHash to return size_t for hashcode
      * Change BLE scan_int and scan_win to uint16_t according to spec
      
      Bug: 111562702
      Test: SL4A BLE test and manual with BLE mouse
      Change-Id: Ieff3acbfaa95b7d804e57021d562218d9fbe42cc
      555a8d03
    • Cheney Ni's avatar
      Ignore SDP failure while bonding if SDP was not attempted · 22062116
      Cheney Ni authored
      When bonding, there is an ACL_UP event to the upper layers and some apps
      may want to fetch SDP in return. This can break pairing. In cases SDP fails,
      it causes the procedure to be finished before the LinkKey is generated.
      And thus the LinkKey is not committed to NVRAM and the device is not paired.
      
      Bug: 111189110
      Test: : Pair / Unpair BT accessories manually
      Change-Id: Iaefbe8b6c1fc3e78f0f120220992df84699a2eb8
      22062116
  12. Jul 17, 2018
  13. Jul 16, 2018
    • Ben YoungTae Kim's avatar
      Increase DM connection size for multiple links · 30a58db2
      Ben YoungTae Kim authored
      For multiple headset connections, it will be increased to support
      multiple services(HFP/AV/CT) for each links.
      
      Test: Connect to 4 or more headsets and play music
      Bug: 110972513
      Change-Id: I56f69e12fb1a4a614c69fa383e9c53675a189fc9
      30a58db2
  14. Jul 13, 2018
  15. Jul 12, 2018
  16. Jul 10, 2018
    • Hansong Zhang's avatar
      AVRCP: Reject when CT sends invalid RegisterNotification · 66a01d0d
      Hansong Zhang authored
      Check whether the RegisterNotification request from CT is valid, and
      safely reject invalid request
      
      Bug: 111260441
      Test: manually test with RIVA WAND speaker
      Change-Id: Ia2edd94e50fa7cb5b61be54f297adf971060a924
      66a01d0d
    • Treehugger Robot's avatar
    • Jakub Pawlowski's avatar
      Register for Service Changed notification after encryption · 80b719d5
      Jakub Pawlowski authored
      This fixes issue introduced in commit ddf6320b
      Registration for Service Changed notifications was
      disabled, because there was no good way back then to have
      "opportunistic" app. Since opportunistic apps were introduced, and the
      code in GATT_ConfigServiceChangeCCC is already marking connection as
      opportunistic, reenable notification registration.
      
      Test: manual verification, that Service Changed descriptor is set
      Change-Id: Iefaec3914829fa4a4a60dc3c3790c3daa9f4f4d8
      80b719d5
    • Jakub Pawlowski's avatar
      Get rid of warning when connecting LE device · 078f3bb8
      Jakub Pawlowski authored
      We are sending LE fixed channel notification to classic callback. Stop
      doing that. This triggers following warning in log output on every
      LE connection:
      W bt_smp  : smp_br_connect_callback is called on unexpected transport 2
      
      Test: manual with phone, verify warning is gone when connecting over LE
      Change-Id: I47597fa03744fb1bff03d287f790ea32fa033cc7
      078f3bb8
  17. Jul 09, 2018
  18. Jul 02, 2018
    • Pavlin Radoslavov's avatar
      Don't trigger AVDTP Suspend in response to AVDTP Suspend+Start from remote · 28faf875
      Pavlin Radoslavov authored
      If the remote device sent us AVDTP Suspend, and then AVDTP Start, don't
      trigger AVDTP Suspend from the local device in response to the AVDTP Start.
      
      Also:
       * Add a call btif_av_stream_start_offload() inside btif_a2dp_on_started()
         if we were started remotely.
       * Fix the order of calling btif_a2dp_on_started() and triggering
         an internal BTIF_AV_SUSPEND_STREAM_REQ_EVT event. Otherwise,
         BTA Suspend might be called before btif_av_stream_start_offload()
      
      Bug: 110015851
      Bug: 110186160
      Test: Manual
      Change-Id: I908d19f8caf5130b96a64153ff39bd4b52879713
      28faf875
  19. Jun 29, 2018
  20. Jun 28, 2018
  21. Jun 27, 2018
    • Myles Watson's avatar
      Move sepolicy files to system/sepolicy · 9325ad74
      Myles Watson authored
      Test: Toggle Bluetooth, ls -alZ /vendor/bin/hw/*blue*
      Change-Id: Ibf72f8bacc2f4975d06f4892e3b33ef6fb08aab7
      Merged-In: Ibf72f8bacc2f4975d06f4892e3b33ef6fb08aab7
      9325ad74
  22. Jun 26, 2018
    • Josh Gao's avatar
      Fix double close in btif.cc's dump. · fb166391
      Josh Gao authored
      dump closes a file descriptor that is still owned by a
      ParcelFileDescriptor which leads eventually to a double close.
      
      Test: treehugger
      Change-Id: Id351b5429cb17b48e37313850a363d739d78c4a1
      fb166391
    • Pavlin Radoslavov's avatar
      If command_timed_out() is triggered don't get blocked by a deadlock · ddabcc7d
      Pavlin Radoslavov authored
      If command_timed_out() is triggered and we cannot acquire the
      commands_pending_response_mutex to print the debug info, then proceed
      with the rest of the operations until the process aborts.
      
      Similarly, if startup_timer_expired() is triggered and we are blocked
      by a deadlock, just abort() because there is no way to recover.
      
      Bug: 110441099
      Test: Code compilation
      Change-Id: I367332bbbd9c1d887bd2bc829b9f617114fc96fc
      ddabcc7d
Loading