Skip to content
Snippets Groups Projects
  1. Nov 04, 2022
  2. Nov 01, 2022
  3. Oct 29, 2022
  4. Oct 28, 2022
  5. Oct 27, 2022
  6. Oct 25, 2022
    • Michael Groover's avatar
      Add exported flag to exposed test runtime receivers · bccf41ef
      Michael Groover authored
      Android T allows apps to declare a runtime receiver as not exported
      by invoking registerReceiver with a new RECEIVER_NOT_EXPORTED flag;
      receivers registered with this flag will only receive broadcasts from
      the platform and the app itself. However to ensure developers can
      properly protect their receivers, all apps targeting a future
      platform release and registering a receiver for non-system
      broadcasts must specify either the exported or not exported flag
      when invoking #registerReceiver; if one of these flags is not
      provided, the platform will throw a SecurityException. This commit
      updates all the exposed receivers with the RECEIVER_EXPORTED flag
      to maintain the existing behavior for these tests.
      
      Bug: 234659204
      Tag: #compatibility
      Test: atest BassClientServiceTest
      Test: atest HapClientTest
      Change-Id: Ib832007a0c80755e9a50d029eca45a69b4011ea6
      bccf41ef
  7. Oct 21, 2022
  8. Oct 19, 2022
    • Etienne Ruffieux's avatar
      Made Bluetooth codec configuration APIs public. · 64d4e6b6
      Etienne Ruffieux authored
      Continuation of the work started in Android T of making
      Bluetooth codec configuration available via public APIs.
      
      BluetoothA2dp#setCodecConfigPreference, BluetoothA2dp#
      getCodecStatus & BluetoothA2dp#ACTION_CODEC_CONFIG_CHANGED
      are made public instead of system APIs.
      setCodecConfigPreference requires a CDM association between
      the calling application and the Bluetooth device.
      
      Bug: 170678351
      Tag: #feature
      Test: atest FrameworkBluetoothTests
      Change-Id: I40597060127cf2499548d1906d3d5743f157e131
      64d4e6b6
  9. Oct 17, 2022
    • Cole Faust's avatar
      Fix errorprone warnings that should be errors · 8675483c
      Cole Faust authored
      This commit is part of a large scale change to fix errorprone
      errors that have been downgraded to warnings in the android
      source tree, so that they can be promoted to errors again.
      The full list of changes include the following, but not all
      will be present in any one individual commit:
      
      BadAnnotationImplementation
      BadShiftAmount
      BanJNDI
      BoxedPrimitiveEquality
      ComparableType
      ComplexBooleanConstant
      CollectionToArraySafeParameter
      ConditionalExpressionNumericPromotion
      DangerousLiteralNull
      DoubleBraceInitialization
      DurationFrom
      DurationTemporalUnit
      EmptyTopLevelDeclaration
      EqualsNull
      EqualsReference
      FormatString
      FromTemporalAccessor
      GetClassOnAnnotation
      GetClassOnClass
      HashtableContains
      IdentityBinaryExpression
      IdentityHashMapBoxing
      InstantTemporalUnit
      InvalidTimeZoneID
      InvalidZoneId
      IsInstanceIncompatibleType
      JUnitParameterMethodNotFound
      LockOnBoxedPrimitive
      MathRoundIntLong
      MislabeledAndroidString
      MisusedDayOfYear
      MissingSuperCall
      MisusedWeekYear
      ModifyingCollectionWithItself
      NoCanIgnoreReturnValueOnClasses
      NonRuntimeAnnotation
      NullableOnContainingClass
      NullTernary
      OverridesJavaxInjectableMethod
      ParcelableCreator
      PeriodFrom
      PreconditionsInvalidPlaceholder
      ProtoBuilderReturnValueIgnored
      ProtoFieldNullComparison
      RandomModInteger
      RectIntersectReturnValueIgnored
      ReturnValueIgnored
      SelfAssignment
      SelfComparison
      SelfEquals
      SizeGreaterThanOrEqualsZero
      StringBuilderInitWithChar
      TreeToString
      TryFailThrowable
      UnnecessaryCheckNotNull
      UnusedCollectionModifiedInPlace
      XorPower
      
      See https://errorprone.info/bugpatterns for more
      information on the checks.
      
      Bug: 253827323
      Test: m RUN_ERROR_PRONE=true javac-check
      Change-Id: I9408872c39c30cd2c9c1038b4a56d0d412344bde
      8675483c
  10. Oct 14, 2022
  11. Oct 11, 2022
    • Harshit Mahajan's avatar
      [Bluetooth] Remove explicit targetSdkVersion · cf419d68
      Harshit Mahajan authored
      Going forward targetSdkVersion would be set by build system.
      It would be by default set to 10000 before SDK finalization,
      and updated to the new API level after finalization.
      
      Effectively it would mean:
      1. '10000' in aosp and internal master
      2. Finalized number in development branches like "33" in "tm-dev"
      3. As sdk hasn't been finalised in "udc-dev", it would be "10000"
      which would be automatically updated to finalized version after sdk finalization.
      
      Removing the target sdk version declaration from the blueprint and manifest files.
      More details can be found here go/mainline-modules-target-sdk-version-fix
      
      Bug: 242296003
      Tag: #refactor
      Test: croot; sdks=`find ./out -name 'Bluetooth.apk' | grep -v .intermediates`; echo $sdks; for sdk in $sdks;do aapt2 dump badging `echo $sdk` | grep targetSdkVersion:; done
      1. outputs 33 in tm-mainline-prod
      2. outputs 10000 in master
      Change-Id: I1eb75adf878761b55e8589dba098732849c6f304
      cf419d68
  12. Oct 10, 2022
  13. Sep 13, 2022
    • Sungsoo Lim's avatar
      Make onServiceDisconnected be called · f314930e
      Sungsoo Lim authored
      FYI, ServiceConnection.onServiceDisconnected is not called when
      Context.unbindService is called.
      
      Bug: 233690300
      Tag: #refactor
      Test: atest CtsBluetoothTestCases DeviceHealthChecks
      Change-Id: I51ad4e0ecf6b81bce32ccc7e8b4b9550e3695e9c
      f314930e
  14. Sep 09, 2022
    • Binyi Wu's avatar
      Revert "[test] fix GoogleBluetoothInstrumentationTests" · 9ba33fbd
      Binyi Wu authored
      This reverts commit 594198b9.
      
      Reason for revert: DroidMonitor-triggered revert due to b/245864423
      Test: N/A
      
      Bug: 245864423
      Change-Id: Iddc765940dc338939282a7cefc078f70e0f2d29a
      9ba33fbd
    • ahujapalash's avatar
      Security fix for byte slices · 7f99a1c1
      ahujapalash authored
      Adding changes to slice only the first 16 bytes of
      the mIrk field when serializing. When deserializing
      we only get the first 16 bytes when reading, therefore
      it is not necessary to serialize the entire array when
      writing
      
      Bug: 244569009
      Test: Sample Android App mentioned in the bug
      Change-Id: I99154fa3fd2f75a24232ef8df517e4d97839140b
      7f99a1c1
  15. Sep 08, 2022
    • Hui Peng's avatar
      Fix a deadlock bug in Bluetooth Framework · 83c6281b
      Hui Peng authored
      Both BluetoothDevice and BluetoothAdapter maintain a reference to a
      IBluetooth proxy object (sService) and each class uses a lock object
      to serialize access to their own reference. These references are updated
      by BluetoothManagerService with registered callbacks (IBlueoothManagerCallback).
      
      In the current implentaion, when an app thread uses BluetoothDevice#getService
      to access its reference to service proxy, with the BluetoothManager updating it
      at the same time, as the order of taking the locks is different, deadlock is possible
      under certain circumstances (triggered in bug 241212710).
      
      This patch fixes the deadlock issue by removing the reference to service
      proxy object in BluetoothDevice class, and accesses are via
      the reference in BluetoothAdapter class instead.
      
      Test: existing unit tests
      Bug: 241212710
      Tag: #stability
      Change-Id: I15cd2707acf5caa04d97c6ede3bd5bedd6475c65
      83c6281b
  16. Sep 03, 2022
    • William Escande's avatar
      Fix checkstyle in frameworks · b0c6ede1
      William Escande authored
      All BluetoothCodecConfig error are fixed
      
      Test: checkstyle + build. No functionnal changes
      Bug: 244876154
      Merged-In: I2f94ffd62ae76c10ae6a835c81335fb0eae5a97f
      Change-Id: I2f94ffd62ae76c10ae6a835c81335fb0eae5a97f
      b0c6ede1
    • William Escande's avatar
      Fix checkstyle in frameworks · 77e6c2dc
      William Escande authored
      All frameworks error are fixed except the Copyright header
      Excpet BluetoothCodecConfig due to merge conflict
      
      Test: checkstyle + build. No functionnal changes
      Bug: 244876154
      Change-Id: I073878d776b4757f93533c3430194c672438ca00
      77e6c2dc
  17. Aug 29, 2022
  18. Aug 25, 2022
    • Songchun Fan's avatar
      [test] fix GoogleBluetoothInstrumentationTests · 594198b9
      Songchun Fan authored
      Non-data apps that have a sharedUserId shared with a privileged app and
      use privileged permissions need to testOnly.
      
      BUG: 243738091
      Fixes: 243738091
      BUG: 236173905
      Test: atest GoogleBluetoothInstrumentationTests
      Change-Id: I33ed22b844a07a4964e8da21ae83f7a71fd6dad8
      594198b9
    • William Escande's avatar
      Remove unsupportedAppUsage in aidl · 4644ccd6
      William Escande authored
      Bug: 229914434
      Test: Build + start bt + connect a device
      Change-Id: Ie47cce2bfb9c00cf41c093baba726ea1c0421701
      4644ccd6
  19. Aug 23, 2022
    • William Escande's avatar
      Change bluetooth cache to be static · ea6274ae
      William Escande authored
      Whith a non static cache, we are creating a cache every time a new
      BluetoothDevice is created, and then we have to rely on the GC.
      The number of cache can sometimes reach 10 000.
      
      Fix: 235637412
      Test: basic bt functionnality
      Test: adb shell dumpsys cacheinfo com.android.bluetooth
      Change-Id: I6659dd9050b42bb57d0640df8117150cd67cb026
      ea6274ae
    • Etienne Ruffieux's avatar
      Fixed service / framework test suites broken after migration · 1be662c9
      Etienne Ruffieux authored
      Bluetooth/service and Bluetooth/framework test suites were
      broken after the migration of the files from frameworks.
      The Bluetooth/framework test suite is split between stress
      tests that require a physical Bluetooth device to run and
      the unit tests that test the framework hidden APIs.
      Both framework unit tests and service tests are signed
      and can be added to the MTS.
      
      Test: atest FrameworkBluetoothTests
      Test: atest ServiceBluetoothTests
      Bug: 232577476
      Tag: #feature
      Change-Id: Ibdb20c650db2483c4569d979da5e024e0e95284c
      Merged-In: Ibdb20c650db2483c4569d979da5e024e0e95284c
      1be662c9
  20. Aug 22, 2022
  21. Aug 16, 2022
    • Cole Faust's avatar
      Fix array-related errorprone warnings · 760b1810
      Cole Faust authored
      The ArrayEquals, ArrayHashCode, ArrayToString, and
      ArraysAsListPrimitiveArray errorprone findings were
      demoted from errors to warnings. Fix existing
      occurrences of them so they can be made errors again.
      
      Bug: 242630963
      Test: RUN_ERROR_PRONE=true m javac-check
      Change-Id: Ie9d62731bef7e282d0909697963fce681c356d05
      760b1810
  22. Aug 12, 2022
    • Alice Kuo's avatar
      Align the LE audio context type value and naming with SIG assigned number · 56069e28
      Alice Kuo authored
      The previous value and naming is dismatch with the publiched assigned
      number, and the stack definition as well.
      
      The patch includes the following modification
      1. Correct the context type value
      2. Align the naming and comment
      3. Change the order based on the context type value
      
      Bug: 240145498
      Test: PTS test case and check the context type picker is the same
      between bt stack and framework
      
      Change-Id: Ib18d07a64a323791786ad60aa00bcfc0af712552
      56069e28
  23. Aug 08, 2022
    • Sungsoo Lim's avatar
      Return false getProfileProxy when not supported · 1026023c
      Sungsoo Lim authored
      Bug: 239486150
      Tag: #refactor
      Test: atest CtsBluetoothTestCases
      Ignore-AOSP-First: Merge conflict
      Change-Id: I56e6e14bc4b809617afebba34c9942c4761ee8eb
      Merged-In: I56e6e14bc4b809617afebba34c9942c4761ee8eb
      (cherry picked from commit 6d9c5c1e)
      1026023c
  24. Aug 03, 2022
  25. Jul 14, 2022
  26. Jul 13, 2022
    • Rahul Sabnis's avatar
      Fixes a bug in the BluetoothDevice#getIdentityAddress API where it · 44496dc2
      Rahul Sabnis authored
      returns the mAddress field of the device instead of null when the
      identity address is not known.
      
      Tag: #feature
      Bug: 238353063
      Test: atest AdapterServiceTest#testAddressConsolidate
      Ignore-AOSP-First: Change needs to land in TM release
      Change-Id: I577843c9e2cc279915d0632ff25bde66aa949e94
      (cherry picked from commit 448c2830)
      Merged-In: I577843c9e2cc279915d0632ff25bde66aa949e94
      44496dc2
  27. Jun 30, 2022
  28. Jun 29, 2022
  29. Jun 27, 2022
    • Abhishek Pandit-Subedi's avatar
      Remove specific OWNERS for framework/tests · ba4a0c54
      Abhishek Pandit-Subedi authored
      The path provided in framework/tests isn't always accessible and can
      fail code-owners validation.  It should just inherit OWNERS from
      framework/ instead.
      
      Bug: 237278264
      Tag: #floss
      Test: git push
      Change-Id: I6d29fc38807f5c108d74fb4e4d31688a1755e22b
      ba4a0c54
  30. Jun 24, 2022
    • Kyunglyul Hyun's avatar
      Correct isDirect in BluetoothGatt#connect · 213409cb
      Kyunglyul Hyun authored
      isDirect was !mAutoConnect when it was first connected
      (in mBluetoothCallback#onClientRegistered)
      but it was always false in reconnect
      
      Tag: #stability
      Bug: 233292528
      Test: atest BluetoothInstrumentationTests
      Change-Id: Ic7913d6612fc292d3e9d48c6b49faffe1f6a3034
      213409cb
  31. Jun 23, 2022
  32. Jun 22, 2022
  33. Jun 21, 2022
    • William Escande's avatar
      Follow error prone recommendation · e5975fec
      William Escande authored
      ```
      ObexServerSockets.java:228: warning:
      BluetoothSocket is final and does not override Object.toString
                  Log.d(mTag, "onConnect() socket: " + conSocket);
                                                       ^
      BluetoothPbapService.java:767: warning:
       BluetoothSocket is final and does not override Object.toString
                          + " socket=" + socket);
                                         ^
      
      AvrcpCoverArtService.java:256: warning:
       BluetoothSocket is final and does not override Object.toString
               debug("onConnect() - device=" + device + ", socket=" + socket);
                                                                         ^
      PbapClientConnectionHandler.java:377: warning:
       BluetoothSocket is final and does not override Object.toString
                          Log.d(TAG, "Closing socket" + mSocket);
                                                        ^
       [...]
          (see https://errorprone.info/bugpattern/ObjectToString)
      ```
      
      Bug: 236759221
      Test: m RUN_ERROR_PRONE=true Bluetooth
      Change-Id: I6a49a8ef8c6b380547cbb817468fa33bf89347a3
      e5975fec
  34. Jun 10, 2022
    • Etienne Ruffieux's avatar
      BluetoothDevice#getUuids() returns null again when no Uuids · ba60dff8
      Etienne Ruffieux authored
      getUuids was wrongly returning an empty array of Uuids when
      fetchUuidsWithSdp had not been called. It now returns null
      again.
      
      Test: atest CtsBluetoothTestCases
      Bug: 235456437
      Tag: #feature
      Merged-In: If8aafc1b0ab4e253fdacc827726d76825b3bd1e4
      Change-Id: I5757bebec004605b901f2f031c25b2036e2c139e
      ba60dff8
Loading