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

Commit e1e8e2b9 authored by Myles Watson's avatar Myles Watson
Browse files

RootCanal: Open network ports only if there is a console

Bug: 128355308
Test: toggle airplane mode and check for opening sockets
Change-Id: I8c4581b708c05a8c72dba3604c02adea97c1653b
parent cb6c5d3f
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -124,9 +124,11 @@ Return<void> BluetoothHci::initialize(const sp<IBluetoothHciCallbacks>& cb) {

  if (BtTestConsoleEnabled()) {
    SetUpTestChannel(6111);
    SetUpHciServer(6211,
                   [this](int fd) { test_model_.IncomingHciConnection(fd); });
    SetUpLinkLayerServer(
        6311, [this](int fd) { test_model_.IncomingLinkLayerConnection(fd); });
  }
  SetUpHciServer(6211, [this](int fd) { test_model_.IncomingHciConnection(fd); });
  SetUpLinkLayerServer(6311, [this](int fd) { test_model_.IncomingLinkLayerConnection(fd); });

  unlink_cb_ = [cb](sp<BluetoothDeathRecipient>& death_recipient) {
    if (death_recipient->getHasDied())