Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f52b5811 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge changes I77fed50b,Icb963b0c,Id1d683d8,I91d9ccc5 into main

* changes:
  Avoid binder calls in HidHostService
  HidHost: various cleanup
  HidHost: Use AdapterService provided
  Utils: add Adapter to getByteBrEdrAddress params
parents 0fe8974d d73ca454
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -250,14 +250,21 @@ public final class Utils {
        return identity != null ? identity : address;
    }

    /**
     * @see #getByteBrEdrAddress(AdapterService, BluetoothDevice)
     */
    public static byte[] getByteBrEdrAddress(BluetoothDevice device) {
        return getByteBrEdrAddress(AdapterService.getAdapterService(), device);
    }

    /**
     * Returns the correct device address to be used for connections over BR/EDR transport.
     *
     * @param service the provided AdapterService
     * @param device the device for which to obtain the connection address
     * @return either identity address or device address as a byte array
     */
    public static byte[] getByteBrEdrAddress(BluetoothDevice device) {
        final AdapterService service = AdapterService.getAdapterService();
    public static byte[] getByteBrEdrAddress(AdapterService service, BluetoothDevice device) {
        // If dual mode device bonded over BLE first, BR/EDR address will be identity address
        // Otherwise, BR/EDR address will be same address as in BluetoothDevice#getAddress
        byte[] address = service.getByteIdentityAddress(device);
+0 −1
Original line number Diff line number Diff line
@@ -5432,7 +5432,6 @@ public class AdapterService extends Service {
     * @param device the remote device that we want to get UUIDs from
     * @return the uuids of the remote device
     */
    @VisibleForTesting
    public ParcelUuid[] getRemoteUuids(BluetoothDevice device) {
        DeviceProperties deviceProp = mRemoteDevices.getDeviceProperties(device);
        if (deviceProp == null) {