1. 07 Oct, 2016 1 commit
    • Ben YoungTae Kim's avatar
      HID: Fix to handle UHID_OUTPUT_EV command from UHID driver · 960b9c39
      Ben YoungTae Kim authored
      Incorrect size check for UHID_OUTPUT_EV for incoming data from
      UHID driver of kernel was leading to exiting of poll thread.
      This was causing IOT issues with Apple Magic Mouse that require
      output report to be sent for proper functioning of scroll functionality.
      
      Bug: 28942565
      Change-Id: I2eaba1f70b7cd51fb21933031d439543eb141fd2
      960b9c39
  2. 06 Oct, 2016 1 commit
    • Jakub Pawlowski's avatar
      Refactor advertising data types · 9eaf7768
      Jakub Pawlowski authored
      Currently we have some unnecessary complicated code for handling
      advertising data. Get rid of it.
      
      Bug: 30622771
      Test: Tests making sure flags and tx power are filled are added
      Change-Id: I807cdf11577c357c116c54cab50bbf3261e1ee16
      9eaf7768
  3. 05 Oct, 2016 3 commits
    • Pavlin Radoslavov's avatar
      Use the correct API to check whether a codec is valid · a0db321d
      Pavlin Radoslavov authored
      Use the (new) A2D_IsPeerSinkCodecValid() API call as appropriate
      to check whether the codec information of a Sink peer is valid.
      Previously, A2D_IsSourceCodecSupported() was used, and that didn't
      match the original code (before the refactoring).
      A2D_IsSourceCodecSupported() has extra checks, including min/max bitpool
      oundaries, and those shouldn't be used for this initial check - the
      bitpool boundaries can be adjusted later.
      
      Similarly, use the new A2D_IsPeerSourceCodecValid() API call instead of
      A2D_IsSinkCodecSupported().
      
      Also:
       * Replaced A2D_IsValidCodec() with
         A2D_IsSourceCodecValid(), A2D_IsSinkCodecValid()
         A2D_IsPeerSourceCodecValid(), A2D_IsPeerSinkCodecValid()
         and added the appropriate unit tests.
      
       * Added extra debug messages to help identify similar issues in the future
      
      Bug: 31749230
      Test: manual test with a carkit, and unit tests
      Change-Id: Iafaeb82744df9758e686194c91624992a0c55bdf
      a0db321d
    • Jakub Pawlowski's avatar
      Remove unnecessary checks of BTM_MAX_LOC_BD_NAME_LEN · be43ee76
      Jakub Pawlowski authored
      Change-Id: I6e68f80d0d97081a4fc3879e6c11342923cfef7b
      be43ee76
    • Jakub Pawlowski's avatar
      Make Bluetooth LE multi-advertising testable · e47b769e
      Jakub Pawlowski authored
      This patch turns the code that manages LE multi-advertising into the
      BleAdvertisingManager class. All HCI calls made by this code were
      abstracted into BleAdvertiserHciInterface.
      
      Thanks to those changes, we can mock BleAdvertiserHciInterface and test
      the advertising manager.
      
      The BleAdvertisingManagerTest, still has some dependencies on other
      code from the "stack" module. These have to be implemented on top of the
      test file. In the future, this dependencies should be replaced by mockable
      classes.
      
      Test: Tests covering the change are added in this patch.
      Bug: 30622771
      Change-Id: I4a363678815c235ee01255f462db2a671ef89610
      e47b769e
  4. 04 Oct, 2016 3 commits
  5. 03 Oct, 2016 2 commits
  6. 30 Sep, 2016 7 commits
  7. 29 Sep, 2016 3 commits
    • Jakub Pawlowski's avatar
      Enable libbase logging for whole stack · 75b83661
      Jakub Pawlowski authored
      Currently, only C++ code in the service/ folder can use libbase logging.
      This patch makes sure that logging can be used and is properly
      configured for usage when the stack is running as part of Bluetooth.apk.
      
      Bug: 31806042
      Change-Id: I1f8be79ba9999b53ece0b5217a893b4bd20ecafc
      75b83661
    • Victor Khimenko's avatar
      d09a76a9
    • Andre Eisenbach's avatar
      Fix 100 LE device connection limitation · 426da5ad
      Andre Eisenbach authored
      Currently after 100 devices are added to the device security database,
      any subsequent LE connection to a newly discovered LE device address
      will fail as entries in the security record database are not reused.
      
      This patch removes a device record if the device itself is removed and
      also ensures that the oldest device security record is deleted if the
      limit is reached to ensure a new record can be allocated.
      
      Bug: 31625900
      Test: SL4A multi-device connection test + regression
      Change-Id: I22f6c82c64a9a9bfb2a16d79182903e5aa011355
      (cherry picked from commit 013c32bf)
      426da5ad
  8. 28 Sep, 2016 2 commits
    • Victor Khimenko's avatar
      Support TARGET_TRANSLATE_2ND_ARCH case · b2797fc4
      Victor Khimenko authored
      Build-only change to support the multilib case where the second arch
      is translated (and thus bluetooth library is needed).
      
      "True" multilib case is explicitly not supported.
      
      Test: Build system refactoring CL. Existing unit tests still pass.
      
      BUG=31422117
      
      Change-Id: I09f239d39f5dbe0848a89367327db1ea1074ca39
      b2797fc4
    • Jakub Pawlowski's avatar
      Separate the definition of BTM layer types from control blocks · dc3c1f2a
      Jakub Pawlowski authored
      Right now, data types, control blocks, and functions used in the BTM
      layer are defined in the same header files. This means that if someone
      wants to write a test that uses those data types, they must also define
      all control blocks, or compile the whole module.
      
      This patch separates the data types from other definitions. Thanks to
      it, we will be able to write unit tests, once other dependencies get
      separated.
      
      Change-Id: Ibc089e273cc37642fbb8672964b266c20f8d825d
      dc3c1f2a
  9. 27 Sep, 2016 2 commits
    • Jakub Pawlowski's avatar
      Use better callbacks in LE multi advertising · 0a009c38
      Jakub Pawlowski authored
      Right now, LE multi advertising related code uses it's own
      implementation of queue on top of static array. Use std::queue, and
      base::Callback instead.
      
      Changing function pointers to base::Callback instances is required for
      further refactoring, which will turn this code into class.
      
      Bug: 30622771
      Test: sl4a BleAdvertiseApiTest ConcurrentBleAdvertisingTest
      Change-Id: I839e036c6edb4e19a17def4d68d351296468f88c
      0a009c38
    • Jakub Pawlowski's avatar
      Update BUILD.gn files · 29796eb6
      Jakub Pawlowski authored
      29796eb6
  10. 24 Sep, 2016 1 commit
    • Nitin Arora's avatar
      Bluetooth: Prevent gatt DB copy if server cache is absent · c695f257
      Nitin Arora authored
      In case the server cache does not exist for a specific
      connection, the API used to copy the server DB into the
      DB structure needs to return immediately. This change
      makes sure of that and prevents dereferencing of a null
      block causing the runtime error.
      
      Change-Id: Iec3040a1280ef9d80b1b9c76eca8071dff499411
      c695f257
  11. 23 Sep, 2016 3 commits
  12. 22 Sep, 2016 5 commits
  13. 21 Sep, 2016 2 commits
  14. 20 Sep, 2016 4 commits
    • Treehugger Robot's avatar
      Merge changes from topics 'bt-only-pcm-media-feeding-format', 'bt-a2d-sbc-cie-localize' · ab8facfc
      Treehugger Robot authored
      * changes:
        Use only PCM as the media feeding format
        Localize the usage of tA2D_SBC_CIE only within the SBC codec
      ab8facfc
    • Pavlin Radoslavov's avatar
      Use only PCM as the media feeding format · c66edf31
      Pavlin Radoslavov authored
      * Removed field tA2D_AV_MEDIA_FEEDINGS.format, because we always
        use/assume the feeding format is PCM.
      * Removed tA2D_AV_MEDIA_FEED_CFG_PCM, tA2D_AV_MEDIA_FEED_CFG,
        tA2D_AV_CODEC_PCM, and tA2D_AV_CODEC_NONE, because they are not
        needed/used anymore.
      * Removed feeding mode:
        - tBTIF_MEDIA_INIT_AUDIO_FEEDING.feeding_mode
        - tBTIF_AV_FEEDING_MODE, BTIF_AV_FEEDING_ASYNCHRONOUS,
          BTIF_AV_FEEDING_SYNCHRONOUS
        - tBTIF_MEDIA_CB.feeding_mode
      * Added new APIs and the corresponding unit tests:
        - A2D_CodecConfigMatchesCapabilities()
        - A2D_BuildSinkConfig()
        - A2D_CodecEquals()
        - A2D_CodecRequiresReconfig()
      
      Also:
       * Removed header file btif/include/btif_av_api.h because it is not
         needed anymore.
       * Removed functions or typedefs that are unused or replaced:
         - bta_av_co_audio_codec_match() -> replaced by
           A2D_CodecConfigMatchesCapabilities()
         - bta_av_co_audio_codec_cfg_matches_caps()
         - bta_av_co_audio_peer_reset_config()
         - bta_av_co_audio_discard_config()
         - bta_av_co_get_codec_info()
         - bta_av_co_peer_cp_supported()
         - tA2D_AV_CODEC_ID
         - tBTIF_AV_CODEC_INFO
       * Increased the sampling_freq storage from uint16_t to uint32_t
       * Decreased the number of channels n_channels storage from uint16_t
         to uint8_t
       * Removed unneessary global function declarations inside btif_av_co.h
       * Changed the order of the A2D_BuildSrc2SinkConfig() arguments, so
         the order is more intuitive.
       * Misc other cleanup:
         - file bta_av_co.cc: code simplification, renamed snk -> sink,
           Removed unnecessary cast-away of a const argument: bta_av_co_cp_scmst
           Renamed/updated bta_av_co_audio_peer_supports_codec() ->
                   bta_av_co_find_peer_sink_supports_codec()
           Renamed/updated bta_av_co_audio_peer_src_supports_codec() ->
                   bta_av_co_find_peer_src_supports_codec()
      
      Bug: 30958229
      Test: A2DP tested manually. Unit tests included in the CL.
      Change-Id: I60981c62b1a88491b5232c4f6515933c4261fac9
      c66edf31
    • Ajay Panicker's avatar
      Remove net_bt_stack group and replace it with bluetooth · 7414642e
      Ajay Panicker authored
      Bug: 31549206
      Change-Id: I10504d73a962dde583ddb5771cb0a0fe6ca6d580
      7414642e
    • Jorge E. Moreira's avatar
      test_vendor: Use kInvalidTaskId in the controller · 6d835905
      Jorge E. Moreira authored
      Test: make test-vendor
      
      Change-Id: I6eefd385ecb992f854544ca92c5a8559b6f281f0
      6d835905
  15. 19 Sep, 2016 1 commit
    • Pavlin Radoslavov's avatar
      Localize the usage of tA2D_SBC_CIE only within the SBC codec · b18f03ec
      Pavlin Radoslavov authored
      * Added new A2DP API and use it as appropriate
       - A2D_IsValidCodec()
       - A2D_CodecTypeEquals()
       - A2D_GetMinBitpool()
       - A2D_GetMaxBitpool()
      * Removed A2D_GetDefaultConfigSbc(), because it is not needed anymore.
      * Removed bta_av_co_audio_get_sbc_config() and replaced it
        with code that is not SBC codec-specific:
        bta_av_co_audio_encoder_init() and bta_av_co_audio_encoder_update()
      * Removed bta_av_co_get_remote_bitpool_pref() because it is
        not used/needed anymore.
      * Moved the following declarations the a2d_sbc.h header file to
        the a2d_sbc.c codec-specific implementation, because they don't need
        to be exposed anymore.
        - struct tA2D_SBC_CIE
        - function A2D_BldSbcInfo()
        - function A2D_ParsSbcInfo()
      * Added corresponding unit tests for the new API
      
      Bug: 30958229
      Test: A2DP tested manually. Unit tests included in the CL.
      Change-Id: Ib242956c303f0ca3c5f70ebc00416a7a45e70228
      b18f03ec