Skip to content
Snippets Groups Projects
  1. Aug 19, 2022
    • Rahul Sabnis's avatar
      Reconfigure Address policy on last bond removed · 8f848255
      Rahul Sabnis authored
      Bug: 237572866
      Bug: 195410559
      Test: system/gd/cert/run --clean --sl4a OobPairingSl4aTest
      Test: system/gd/cert/run --clean --sl4a_sl4a OobPairingTest
      Tag: #refactor
      Ignore-AOSP-First: Security fix
      Merged-In: Id1c22953c3921810d708e4aee7a8cfc0c4f97718
      Change-Id: Id1c22953c3921810d708e4aee7a8cfc0c4f97718
      (cherry picked from commit 66bfae6d)
      (cherry picked from commit f4aa35ad)
      Merged-In: Id1c22953c3921810d708e4aee7a8cfc0c4f97718
      8f848255
    • Ted Wang's avatar
      Add length check when copy AVDTP packet · 3a830aa7
      Ted Wang authored
      Bug: 232023771
      Test: make
      Tag: #security
      Ignore-AOSP-First: Security
      Change-Id: I68dd78c747eeafee5190dc56d7c71e9eeed08a5b
      Merged-In: I68dd78c747eeafee5190dc56d7c71e9eeed08a5b
      (cherry picked from commit ed9a843c)
      Merged-In: I68dd78c747eeafee5190dc56d7c71e9eeed08a5b
      3a830aa7
    • Ted Wang's avatar
      Fix potential interger overflow when parsing vendor response · 089b7e34
      Ted Wang authored
      Add check for str_len to prevent potential OOB read in vendor response.
      
      Bug: 205570663
      Tag: #security
      Test: net_test_stack:StackAvrcpTest
      Ignore-AOSP-First: Security
      Change-Id: Iea2c3e17c2c8cc56468c4456822e1c4c5c15f5bc
      Merged-Id: Iea2c3e17c2c8cc56468c4456822e1c4c5c15f5bc
      (cherry picked from commit 62e29ee6)
      Merged-In: Iea2c3e17c2c8cc56468c4456822e1c4c5c15f5bc
      089b7e34
    • Chris Manton's avatar
      Revert "Add btm_cb.notify_when_complete_cb when inquiry is cancelled" · c48ab912
      Chris Manton authored
      This reverts commit 31a662d2.
      
      Bug: 235293624
      Tag: #refactor
      Test: manual & atest CtsBluetoothTestCases
      Reason for revert: Breaks
      
      Merged-In: I1a9505fabd581201117ec54f711c4120a092afb7
      Merged-In: I60bae5d51b6128489964f7ed32c4f9f2605471a0
      Change-Id: I60bae5d51b6128489964f7ed32c4f9f2605471a0
      (cherry picked from commit b88a3897)
      Merged-In: I60bae5d51b6128489964f7ed32c4f9f2605471a0
      c48ab912
    • Chris Manton's avatar
      Use proper resolved address upon connection fail or timeout · 1a74e9f7
      Chris Manton authored
      Also add LOG_ERROR for error path
      
      Bug: 235552757
      Test: gd/cert/run
      Tag: #refactor
      BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines
      Ignore-AOSP-First: Cherry-pick
      
      Merged-In: I5086ad669df914cfbe3f2a0f7c5e3100c6aaee7a
      Change-Id: I5086ad669df914cfbe3f2a0f7c5e3100c6aaee7a
      (cherry picked from commit 476f0434)
      Merged-In: I5086ad669df914cfbe3f2a0f7c5e3100c6aaee7a
      1a74e9f7
  2. Aug 10, 2022
  3. Jul 29, 2022
    • Android Build Coastguard Worker's avatar
      Merge cherrypicks of [19134336, 19219300, 19126196, 19396589, 19378359] into tm-release. · 9369e03c
      Android Build Coastguard Worker authored
      Change-Id: I8638397353d0c122ef731511ef97967c195e8011
      9369e03c
    • Chris Manton's avatar
      Remove timer when connection is cancelled · f92f6bf6
      Chris Manton authored
      Bug: 237600252
      Test: gd/cert/run, testplans/1181383
      Tag: #refactor
      BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines
      Ignore-AOSP-First: Cherry-pick
      
      Merged-In: I3b8dccb23259d9b97cd248dc8adf7423f74ad3a1
      Change-Id: I3b8dccb23259d9b97cd248dc8adf7423f74ad3a1
      (cherry picked from commit 97412bc3)
      Merged-In: I3b8dccb23259d9b97cd248dc8adf7423f74ad3a1
      f92f6bf6
    • Chris Manton's avatar
      Remove from filter accept list upon cancel connect · a407c52b
      Chris Manton authored
      connection::manager no longer arbitrates filter
      accept list manipulation
      
      Bug: 237600252
      Test: gd/cert/run, testplans/1181383
      Tag: #refactor
      BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines
      Ignore-AOSP-First: Cherry-pick
      
      Merged-In: I2d0d2d64c621d565d1ed985da4b061563029def1
      Change-Id: I2d0d2d64c621d565d1ed985da4b061563029def1
      (cherry picked from commit 32a931ed)
      Merged-In: I2d0d2d64c621d565d1ed985da4b061563029def1
      a407c52b
    • Chris Manton's avatar
      Ensure address removed from filter accept list · 8b2b216c
      Chris Manton authored
      A direct connection not present in the internal
      connection manager data structure prevents the address
      from being removed from the filter accept list.
      
      Should that occur, go ahead and try to remove it anyway.
      
      Bug: 237353773
      Test: gd/cert/run
      Tag: #refactor
      BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines
      Ignore-AOSP-First: cherry-pick
      
      Merged-In: I0253b9d66b12bbee3c9994298ba054b47cd035dd
      Change-Id: I0253b9d66b12bbee3c9994298ba054b47cd035dd
      (cherry picked from commit 7a4e504e)
      Merged-In: I0253b9d66b12bbee3c9994298ba054b47cd035dd
      8b2b216c
    • Rahul Arya's avatar
      Fix admin enable/disable of Bluetooth file sharing · 9827abaf
      Rahul Arya authored
      This is an extremely partial fix for a mostly-broken feature. For
      fully-managed devices, this fixes the toggle for the file sharing
      option, by detecting which Bluetooth package should be used rather than
      just guessing.
      
      However, on work profiles, the file sharing option does not really work
      anyway, it just infinitely loads. In addition, it is not correctly
      disabled when Bluetooth stops, so the icon just remains but doesn't
      do anything.
      
      A full fix would add the enable/disable sequence for *work* UserHandles
      to BluetoothOppManager, so the LAUNCHER_ACTIVITY is properly enabled and
      disabled. In addition, it would fix the issue described in the linked
      bug to prevent infinite loading (dedicated bug: b/112625123).
      
      Tag: #stability
      Ignore-AOSP-First: For T?
      Bug: 237389774
      Test: Manual, verifying the *badged* BT file sharing icon appears/disappears as needed
      
      Change-Id: I070987bc884947246c372c65691c4866ebd1e7c7
      (cherry picked from commit 36362f25)
      Merged-In: I070987bc884947246c372c65691c4866ebd1e7c7
      9827abaf
    • Rahul Arya's avatar
      Avoid invalid state in search/discovery queue state machine · 8954a1f3
      Rahul Arya authored
      The sequence of events in the state machine that causes the bug is as follows:
      - We start a search, and move from the IDLE state to the SEARCH_ACTIVE state.
      - We initiate a pairing request, that sets pairing_cb.state to BT_BOND_STATE_BONDING.
      - We cancel the search, returning to the IDLE state.
      - We then try to start a second search. In BTA_DmSearch, we check if we are bonding, and if so enqueue the request.
      - But we remain in the IDLE state! So we never dequeue the search request, getting us into the stuck state.
      
      This CL fixes the issue by removing the *_QUEUE_* events, making the state machine the single arbiter for whether a request should be executed or queued. In particular, for the above scenario, the SDP request will queue behind the second search request, if it arrives afterwards, *even if* bonding has already begun. This prevents us from getting in a stuck state.
      
      I believe that this is safe since we preserve the invariant of only ever have one request going through at a time, but manual testing is needed to be certain. The preservation of this invariant also means that we should not regress b/237352700, though I am unable to test that.
      
      Note that this CL is stacked on top of the revert^2s at ag/19019716, so it will exhibit merge conflicts until those CLs are landed.
      
      Bug: 230277335
      Test: Manual, using the repro steps from the bug thread.
      Tag: #stability
      Ignore-AOSP-First: Hotfix for T
      
      Change-Id: I74e83964995b10f4bee35bae3182ec482bdedb39
      (cherry picked from commit d197ce9a)
      Merged-In: I74e83964995b10f4bee35bae3182ec482bdedb39
      8954a1f3
  4. Jul 14, 2022
  5. Jul 13, 2022
  6. Jul 08, 2022
  7. Jul 07, 2022
  8. Jul 01, 2022
  9. Jun 30, 2022
  10. Jun 29, 2022
    • Android Build Coastguard Worker's avatar
      Merge cherrypicks of [19114242] into tm-release. · 94ea60dc
      Android Build Coastguard Worker authored
      Change-Id: I67377ee00eae39bd4676731556b42f1c4ffecf20
      94ea60dc
    • Neha Jain's avatar
      Revert "Reuse SynchronousResultReceivers instead of creating new." · dd85e91c
      Neha Jain authored
      This reverts commit 02dcbe72.
      
      Reason for revert: Causing builds to fail b/237471430
      
      Change-Id: I6165d838abf312085050359377f67a68a5f8b51a
      (cherry picked from commit f5dd42bbd05e68f7763ccaa9fae5642acc4ceba1)
      Merged-In: I6165d838abf312085050359377f67a68a5f8b51a
      dd85e91c
    • Android Build Coastguard Worker's avatar
      Merge cherrypicks of [19039092, 19068701, 19032880] into tm-release. · f8b9ffa1
      Android Build Coastguard Worker authored
      Change-Id: I1b0f0ec8220609517837acf8a68de53aabcfd226
      f8b9ffa1
    • Jakub Pawlowski's avatar
      GATT: Disable notifications when disconnecting · 655653f4
      Jakub Pawlowski authored
      Currently, if we receive notification after disconnection, but before
      closing the client, stack would notify upper layers that connection is
      avaliable, and sned notifications to Java.
      
      This can be troublesome i.e. for Heart Rate Monitors, that send
      notifications very often, and can prevent apps from closing properly.
      
      Bug: 231818024
      Test: connect to HRM with more than one application, close/disconnect multiple times
      Merged-In: I1e9ca7ba6379322f7321b77a2ea92c96c799a452
      Change-Id: I1e9ca7ba6379322f7321b77a2ea92c96c799a452
      (cherry picked from commit 666f247f)
      (cherry picked from commit f65b7a50)
      Merged-In: I1e9ca7ba6379322f7321b77a2ea92c96c799a452
      655653f4
    • Łukasz Rymanowski's avatar
      gatt: Fix incorrect write to the descriptor. · 67952a5b
      Łukasz Rymanowski authored
      This patch fixes regression after
      https://android-review.googlesource.com/q/topic:gatt-racecondition-fix
      
      In case of GATT Write error to descriptor or characteristic,
      the value which was tried to be written is zeroed in the
      onWriteDescriptor/Characteristic callback.
      This cause an issue in following use case:
      
      1) Application writes descriptor on unencrypted link to characteristic
      which requires authentication
      2) Remote device response with an error insufficient authenthication
      3) Android repeats write descriptor with new authenthication
      requrements with the descriptor value taken from the onWriteDescriptor
      callbac - the one which was zeroed. This result in try to write
      invalid value to the descriptor
      
      This patch make sure that value in the callback is always the one which
      was tried to write, no matter of status.
      
      Bug: 235756799
      Test: atest BluetoothInstrumentationTests
      Tag: #stability
      Merged-In: Icd18b95a3c44c082117d035cdf25961938de829d
      Change-Id: Icd18b95a3c44c082117d035cdf25961938de829d
      (cherry picked from commit 24f45364)
      (cherry picked from commit b64432cf)
      Merged-In: Icd18b95a3c44c082117d035cdf25961938de829d
      67952a5b
    • Etienne Ruffieux's avatar
      Reuse SynchronousResultReceivers instead of creating new. · 5467b904
      Etienne Ruffieux authored
      Bug: 217366135
      Tag: #feature
      Test: manual
      Ignore-AOSP-First: to be chery-picked
      Change-Id: If8ae530a284151888a3f89a51d2c58f2a5cd3644
      (cherry picked from commit 02dcbe72)
      Merged-In: If8ae530a284151888a3f89a51d2c58f2a5cd3644
      5467b904
Loading