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

Commit 374b17a6 authored by Kyunglyul Hyun's avatar Kyunglyul Hyun
Browse files

Use TRANSPORT_LE for unknown device type

This commit fixes an issue where using BT_TRANSPORT_AUTO
with an unknown device type resulted in
the allocation of a control block for TRANSPORT_AUTO,
preventing callbacks from being invoked after connection.

This change effectively reverts the logic unintentionally
introduced in aosp/3185968, which caused this issue.

Bug: 369765048
Flag: EXEMPT, revert of aosp/3185968
Test: atest GattClientTest
Change-Id: I4858d89ba0390890936dd71955c66793d52085e3
parent 144eb1ec
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -349,6 +349,8 @@ void btif_gattc_open_impl(int client_if, RawAddress address, tBLE_ADDR_TYPE addr


      default:
      default:
        log::error("Unknown device type {}", DeviceTypeText(device_type));
        log::error("Unknown device type {}", DeviceTypeText(device_type));
        // transport must not be AUTO for finding control blocks. Use LE for backward compatibility.
        transport = BT_TRANSPORT_LE;
        break;
        break;
    }
    }
  }
  }
+4 −0
Original line number Original line Diff line number Diff line
@@ -322,6 +322,8 @@ static void btif_gatts_open_impl(int server_if, const RawAddress& address, bool


      default:
      default:
        log::error("Unknown device type {}", DeviceTypeText(device_type));
        log::error("Unknown device type {}", DeviceTypeText(device_type));
        // transport must not be AUTO for finding control blocks. Use LE for backward compatibility.
        transport = BT_TRANSPORT_LE;
        break;
        break;
    }
    }
  }
  }
@@ -355,6 +357,8 @@ static void btif_gatts_open_impl_use_address_type(int server_if, const RawAddres


      default:
      default:
        log::error("Unknown device type {}", DeviceTypeText(device_type));
        log::error("Unknown device type {}", DeviceTypeText(device_type));
        // transport must not be AUTO for finding control blocks. Use LE for backward compatibility.
        transport = BT_TRANSPORT_LE;
        break;
        break;
    }
    }
  }
  }