Skip to content
Snippets Groups Projects
  1. Feb 28, 2024
    • Hyundo Moon's avatar
      OppService: Add test for IndexOutOfBoundsException crash · 6d3d94eb
      Hyundo Moon authored
      This test adds a test for aosp/2970751.
      This CL simulates the crash situation by putting a large data into
      OPP database and then starting & stopping the service.
      
      The crash only happens when the flag is off.
      
      Bug: 321897599
      Bug: 326135849
      Test: atest BluetoothOppServiceCleanupTest
      Change-Id: I43a7cdd813578a7537331d7a3b78fac1e8404915
      6d3d94eb
  2. Feb 27, 2024
  3. Feb 26, 2024
    • Grzegorz Kołodziejczyk's avatar
      bass_client: Use proxy for Advertising Manager and BluetoothAdapter · 7ffaa4e8
      Grzegorz Kołodziejczyk authored
      This change would expose a proxy BluetoothAdapter methods and introduces
      singleton Periodic Advertising Manager object for testability and
      independence from real objects of those classes.
      
      Tag: #feature
      Bug: 322818333
      Bug: 316005152
      Test: atest BassClientStateMachineTest
      Change-Id: I1b3599fb13529c84b07e7b85f2eb30728a063b98
      7ffaa4e8
    • Hyundo Moon's avatar
      OppService: Fix IndexOutOfBoundException in UpdateThread · 3f48d67d
      Hyundo Moon authored
      Due to the timing change between ProfileService#stop() and
      ProfileService#cleanup(), the main thread and the UpdateThread were
      accesing the same list (mShare) concurrently.
      
      This CL calls the stopInternal() in BluetoothOppService#stop() so that
      the list is cleaned up after the UpdateThread is stopped.
      
      Bug: 321897599
      Bug: 326135849
      Test: atest BluetoothInstrumentationTests
      Change-Id: I35d6507e32125aac63b38d0f26b8d8f1c62a1ac6
      3f48d67d
  4. Feb 24, 2024
    • Sal Savage's avatar
      Use test local tags for determining test log line output · d96e2939
      Sal Savage authored
      We're removing log enforcement variables from the platform, which means
      this test can no longer reference them either.
      
      Tag: #refactor
      Flag: EXEMPT, logging only change
      Bug: 315046089
      Test: atest BluetoothInstrumentationTests
      Change-Id: I06b0847b72f96803de572c61aeb8bfa99d90dbcf
      d96e2939
    • Sal Savage's avatar
      Let the logging framework enforce state machine log levels · d5ccf2c4
      Sal Savage authored
      Tag: #refactor
      Bug: 315046089
      Flag: EXEMPT, logging only change
      Test: m com.android.btservices
      Change-Id: I501b345c850e5b04b9fa3a76675dd28d4e25a137
      d5ccf2c4
    • Sal Savage's avatar
      Don't check against log enforcement variables when event logging · 946b94aa
      Sal Savage authored
      The native calls that the Java Log framework relies on will do this
      checking for us now that we have a process minimum set.
      
      Tag: #refactor
      Bug: 315046089
      Flag: EXEMPT, logging only change
      Test: atest BassClientServiceTest.Java
      Test: atest TbsGattTest.java
      Test: atest MediaControlProfileTest.java
      Test: atest MediaControlGattServiceTest.java
      Test: atest MediaPlayerListTest.java
      Test: atest MediaPlayerWrapperTest.java
      Test: atest AvrcpVolumeManagerTest.java
      Change-Id: Ifead6790e3395429906f34cd721282e93b0d848a
      946b94aa
    • Sal Savage's avatar
      Set the stack's default logging level to match "log.tag.bluetooth" · 036e3ffc
      Sal Savage authored
      Normally, the android logging framework uses the system wide default log
      level (info) when deciding what to return when calling Log.isLoggable or
      the other various APIs in different languages. This patch uses the
      __android_log_set_minimum_priority() function to override that value to
      a special bluetooth log tag so we can control our own default.
      
      Once set, this impacts whats returned for isLoggable calls when nothing
      is set. It also updates how log lines are enforced by the framework.
      Now, Log.d(TAG) and other calls will be checked against the process
      minimum level instead of verbose (which is effectively "no enforcement"
      otherwise)
      
      Tag: #refactor
      Bug: 315046089
      Flag: EXEMPT, logging only change
      Test: m com.android.btservices
      Change-Id: I3b65b38e6ab9c51881e767fc0e6e6d14d12b7ed4
      036e3ffc
  5. Feb 23, 2024
  6. Feb 22, 2024
    • Chris Manton's avatar
      Move Dumpsys from gd to gdx · 45adb566
      Chris Manton authored
      Bug: 326129560
      Test: m .
      Flag: EXEMPT, library infrastructure
      Change-Id: Iee462f6119d9a5eb88aaad5f991ecba9212752e9
      45adb566
    • Jack He's avatar
      LeAudioService: Use ReentrantReadWriteLock · 80127567
      Jack He authored
      Currently, in LeAudioService we use synchronized blocks to acces
      mGroupDescriptors list. Gradually, as we wrapped more and more code in
      synchronized blocks, deadlocks and TimeoutExceptions started popping
      around.
      
      Examples include BT stack calling AF from synchronized block, and
      then AF calling BT stack back, to check some property of LE Audio
      device.
      
      mGroupDescriptors are modified just in 3 places, so accessing it is
      perfect candidate for usage of ReentrantReadWriteLock - it should solve
      all the deadlocks.
      
      Bug: 325674688
      Bug: 326295400
      Test: atest BluetoothInstrumentationTests
      Test:
        1. Bond, unbond, reconnect LE Audio device, preferably one using CSIP.
        2. Observe logcat output and verify no TimeoutException is thrown from LeAudioService
      Change-Id: Icdb944981ddceca39df95694933d05ffe78ee72e
      80127567
    • Charlie Boutier's avatar
      pts-bot: Remove previously passing HFP tests · 39173601
      Charlie Boutier authored
      Bug: 321974103
      Bug: 323531134
      Flag: TEST_ONLY
      Test: atest pts-bot
      Change-Id: I5058c5661f9c3582d96a53455099f331850887fd
      39173601
    • Charlie Boutier's avatar
      pts-bot: remove new tests from config file · 0018e462
      Charlie Boutier authored
      Bug: 321974103
      Test: atest pts-bot
      Flag: TEST_ONLY
      Change-Id: I1205fa586c3d6ee0fd7d3cedb501b30dadf4c107
      0018e462
    • Charlie Boutier's avatar
      pts-bot: disable PBAP test · e4bc9a1a
      Charlie Boutier authored
      Bug: 324916006
      Bug: 324916229
      Test: atest pts-bot
      Flag: TEST_ONLY
      Change-Id: I6ff9cc4c3e67c357033bcacc699a7d9c3a0f9b73
      e4bc9a1a
    • Charlie Boutier's avatar
      pts-bot: disable MAP tests · 3097a10b
      Charlie Boutier authored
      Bug: 324916229
      Bug: 323528790
      Test: atest pts-bot
      Flag: TEST_ONLY
      Change-Id: I8491032bd112836baa06d4f20ef9974e1379252b
      3097a10b
    • Charlie Boutier's avatar
      pts-bot: disable HID tests · e5cd43c3
      Charlie Boutier authored
      Bug: 324915939
      Bug: 324916229
      Test: atest pts-bot
      Flag: TEST_ONLY
      Change-Id: I8797ad656e6fa85edeb2a634a9049c6207bbda7e
      e5cd43c3
    • Charlie Boutier's avatar
      pts-bot: Update MAP ICS · c07f1765
      Charlie Boutier authored
      Bug: 274788900
      Bug: 243948847
      Flag: TEST_ONLY
      Test: atest pts-bot
      Change-Id: Ia9e22688a6a12698f5f81f75f31d901a8ec76bf9
      c07f1765
    • Charlie Boutier's avatar
      pts-bot: update PBAP ICS · a7f80ecf
      Charlie Boutier authored
      Bug: 274789300
      Bug: 243948847
      Flag: TEST_ONLY
      Test: atest pts-bot
      Change-Id: I86561eccdbd518bfd2d89eb91b699b28c033b626
      a7f80ecf
    • Charlie Boutier's avatar
      pts-bot: update SDP ICS · ff611594
      Charlie Boutier authored
      Bug: 274786824
      Bug: 243948847
      Flag: TEST_ONLY
      Test: atest pts-bot
      Change-Id: Ic7f92288a01ced594aeb76b7837b5055eb70cf78
      ff611594
    • Charlie Boutier's avatar
      pts-bot: update SAP ICS · db8f6a0f
      Charlie Boutier authored
      Bug: 274789594
      Bug: 243948847
      Flag: TEST_ONLY
      Test: atest pts-bot
      Change-Id: I001ee8164cfea4ec3a81959dfec6b24c1fb5b756
      db8f6a0f
    • Charlie Boutier's avatar
      pts-bot: Update HSP ICS · ced7501f
      Charlie Boutier authored
      Bug: 274789136
      Bug: 243948847
      Flag: TEST_ONLY
      Test: atest pts-bot
      Change-Id: If3ca5bfd2455f2957a341e6484f048485444ec19
      ced7501f
    • Charlie Boutier's avatar
      pts-bot: update HID ICS · 9632eaee
      Charlie Boutier authored
      Bug: 274789127
      Bug: 243948847
      Flag: TEST_ONLY
      Test: atest pts-bot
      Change-Id: I108eec48946a8f88ee7f7807a7eb5f0c2a31f4a2
      9632eaee
    • Charlie Boutier's avatar
      pts-bot: update ICS with ICS_20240131-2331500252.pts · eea15b36
      Charlie Boutier authored
      This update update the ICS by adding back ICS removed by aosp/2923091.
      
      Also add new ICS needed by the consistency check.
      
      Bug: 321974103
      Test: atest pts-bot
      Flag: TEST_ONLY
      Change-Id: I1289f79668cd43aff0fca10df54ffa3b227430f6
      eea15b36
    • Charlie Boutier's avatar
      pts-bot: Update config file to incorporate le audio tests · 99118fa8
      Charlie Boutier authored
      The LE ICS Update removed several ICS entries from the file ICS_20240123-0400419254.pts.
      This includes custom ICS entries added by the Pandora TEAM for pts-bot,
      which remain supported by the Bluetooth stack.
      Other deleted ICS entries are no longer present in Launch Studio.
      
      List of manually added ICS still existing and needed:
      TSPC_ATT_2_3b
      TSPC_AVRCP_7_12
      TSPC_AVRCP_7_13
      TSPC_AVRCP_7_14
      TSPC_AVRCP_7_15
      TSPC_AVRCP_7_30
      TSPC_GAP_20a_1
      TSPC_GAP_20a_2
      TSPC_GAP_20a_3
      TSPC_GAP_20a_4
      TSPC_GAP_20a_5
      TSPC_GAP_25_10
      TSPC_GAP_35_10
      TSPC_HFP_3_18a
      TSPC_HFP_3_18c
      TSPC_HFP_3_21b
      TSPC_PBAP_9_13d
      TSPC_PBAP_9_13e
      
      They will be added in another CL
      
      Bug: 321974103
      Test: atest pts-bot
      Flag: TEST_ONLY
      Change-Id: Ib1ab1a3df19cdf8444975ef1adaa693b07adb3d0
      99118fa8
    • Hyundo Moon's avatar
      OppService: Extract stop behaviors with a method · eaed715e
      Hyundo Moon authored
      This is a minor code cleanup before changing logic
      for fixing b/321897599.
      
      Bug: 319729818
      Test: m -j;
      Flag: EXEMPT, mechanical refactor
      Change-Id: Id6d3790315462faa04ea07ed62b5bc577e2d7f2b
      eaed715e
    • Jack He's avatar
      LeAudioService: Replace `synchronized(mGroupLock)` with ReentrantLock · 923fbc39
      Jack He authored
      So that we can flag the implementation to use ReentrantReadWriteLock
      later
      
      synchronized(object) {}
      
      is equivalent to
      
      mLock.lock();
      try {} finally { mLock.unlock(); }
      
      Bug: 325674688
      Test: atest BluetoothInstrumentationTests
      Flag: EXEMPT, mechanical refactor, no logical change
      Change-Id: I666db6a8dd8e024f68e0b1092677a23744b16252
      923fbc39
  7. Feb 20, 2024
    • Kihong Seong's avatar
      Fix ScanManagerTest#testFilteredScanTimeout · 72fe77c4
      Kihong Seong authored
      This change fixes test flakiness by changing the test to use
      the TestLooper and assure MSG_SCAN_TIMEOUT is handled before test
      assertions. Currently the test is using Thread.sleep which is causing
      flakiness.
      
      Bug: 324798161
      Test: atest BluetoothInstrumentationTests
      Flag: EXEMPT, test fix only
      Change-Id: I85a3fe4a5f346c109a3f5ceee22910d086fb4b8b
      72fe77c4
  8. Feb 18, 2024
  9. Feb 17, 2024
    • Rongxuan Liu's avatar
      [le audio] Update broadcast audio quality per sinks capabilities · bd1e0a99
      Rongxuan Liu authored
      If any connected broadcast receivers could not support HIGH quality,
      framework will downgrade the broadcast audio quality to STANDARD.
      
      This change only applied to broadcast feature function which is behind the feature flag.
      
      Bug: 325644399
      Bug: 316005152
      Test: atest LeAudioBroadcastServiceTest
      Test: manual test broadcast
      Change-Id: If39a904c942c27c7749147ec97a78162aba97b88
      bd1e0a99
  10. Feb 16, 2024
    • Kihong Seong's avatar
      Fix ScanManagerTest#testDowngradeDuringScanForConcurrencyScreenOff · e7c0523b
      Kihong Seong authored
      The test is flaky due to MSG_STOP_CONNECTING not handled before
      assertions of scan mode changes, since MSG_STOP_CONNECTING is sent with
      delay and the current test is just waiting for the delay to end with
      sleeping. This fix uses the testLooper to change the test to assure that
      MSG_STOP_CONNECTING is always handled before test assertions by using a
      configuring the handler clock.
      
      Bug: 324806849
      Test: atest BluetoothInstrumentationTests
      Flag: EXEMPT, test fix only
      Change-Id: I9299cae6689e9dc0670bcdbe31f0d053431f5e19
      e7c0523b
  11. Feb 15, 2024
    • Grzegorz Kołodziejczyk's avatar
      bass_client: Add intentional and unintentional device disconnection tests · b48d431c
      Grzegorz Kołodziejczyk authored
      This change adds test of unintentional and intentional disconnection in
      broadcast and broadcast assistant context.
      
      Tag: #feature
      Bug: 322332749
      Bug: 308171251
      Test: atest BassClientServiceTest
      Change-Id: I59bfb0778a7ac8a8be9f4cd1ea534837a735e670
      b48d431c
    • Grzegorz Kołodziejczyk's avatar
      broadcast: Consider stopping broadcast if no potential receivers · f2b49494
      Grzegorz Kołodziejczyk authored
      This CL extends broadcast experience with considering automatic
      broadcast stop in case if there are no more potential receivers.
      
      Tag: #feature
      Bug: 322332749
      Bug: 308171251
      Test: atest LeAudioServiceTest
      Test: atest LeAudioBroadcastServiceTest
      Change-Id: Ia1d5adc5e4907170affe6159f4dee6fbbcfb77aa
      f2b49494
    • Jayden Kim's avatar
      Report Bluetooth system state in energy info · 645f683a
      Jayden Kim authored
      Bug: 322861875
      Bug: 323083457
      Test: m -j
      Test: manual check bta_dm_obtain_system_context in logcat by
      running adb shell dumpsys batterystats. The log should be aligned with
      system context in terms of inquiry, LE scan, activation of
      SCO/A2DP/LeAudio and number of ACL link.
      
      Change-Id: If425c3afb7fbddc25c2e2bff328c06e722e9158e
      645f683a
    • Hyundo Moon's avatar
      Fix BluetoothMapSettingsTest failure in some devices · 2ff9d78a
      Hyundo Moon authored
      In some devices, the BluetoothMapSettings activity doesn't fill the
      entire screen, and also don't get focus when they pop up.
      As a result, Espresso uses a wrong root view to find the desired view
      in, which makes the test fail.
      
      This CL adds a click event on the activity so that the correct
      root view can be used for finding the desired view in it.
      
      Also it adds @FlakyTest since it is flaky due to intrinsic nature
      of UI tests. Among 50 runs on different devices:
      - Did not fail on a phone device.
      - Failed about 3% in a relatively slow device.
      
      Bug: 322817893
      Test: atest BluetoothMapSettingsTest --iteration 50
      Flag: EXEMPT, test-only change
      Change-Id: I7a83aeb538a2a863da01e4a4ae0688d1331e9e16
      2ff9d78a
    • Charlie Boutier's avatar
      pts-bot: sort the pass, skip and flaky tests · d8d53196
      Charlie Boutier authored
      Test: atest pts-bot
      Flag: TEST_ONLY
      Bug: 321974103
      Change-Id: I4152da5b2b9e5c0baa3629360632b431d143058e
      d8d53196
  12. Feb 14, 2024
Loading