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

Commit afcd60e6 authored by Weichin Weng's avatar Weichin Weng Committed by android-build-merger
Browse files

Merge "Close unexpected HearingAid open event if is not attempting to connect"

am: f324ac07

Change-Id: Id6ca92d830e6e7f10d22260c15f6b47fea3b80fa
parents 0750cf8b f324ac07
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -343,7 +343,11 @@ class HearingAidImpl : public HearingAid {

    HearingDevice* hearingDevice = hearingDevices.FindByAddress(address);
    if (!hearingDevice) {
      DVLOG(2) << "Skipping unknown device, address=" << address;
      /* When Hearing Aid is quickly disabled and enabled in settings, this case
       * might happen */
      LOG(WARNING) << "Closing connection to non hearing-aid device, address="
                   << address;
      BTA_GATTC_Close(conn_id);
      return;
    }