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

Commit 6209c205 authored by Jakub Pawlowski's avatar Jakub Pawlowski
Browse files

Fix included service parsing (3/3)

Bug: 65637368
Test: sl4a GattIncludedServiceTest
Change-Id: Idb967df9d5064b0532db7f5c250f677d1dbbc54c
parent 6f08232e
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -311,8 +311,7 @@ public final class BluetoothGatt implements BluetoothProfile {

                        for (BluetoothGattService brokenRef : includedServices) {
                            BluetoothGattService includedService = getService(mDevice,
                                    brokenRef.getUuid(), brokenRef.getInstanceId(),
                                    brokenRef.getType());
                                    brokenRef.getUuid(), brokenRef.getInstanceId());
                            if (includedService != null) {
                                fixedService.addIncludedService(includedService);
                            } else {
@@ -714,10 +713,9 @@ public final class BluetoothGatt implements BluetoothProfile {
     * @hide
     */
    /*package*/ BluetoothGattService getService(BluetoothDevice device, UUID uuid,
            int instanceId, int type) {
            int instanceId) {
        for (BluetoothGattService svc : mServices) {
            if (svc.getDevice().equals(device)
                    && svc.getType() == type
                    && svc.getInstanceId() == instanceId
                    && svc.getUuid().equals(uuid)) {
                return svc;