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

Commit bfbf0e4b authored by Raphael Kim's avatar Raphael Kim
Browse files

Ignore scheduled onDeviceGone call on simulated device if it is already no longer present.

Bug: 253637009
Test: atest CtsCompanionDeviceManagerCoreTestCases
      atest CtsCompanionDeviceManagerUiAutomationTestCases
Change-Id: Ia7f5eabde8879ff4f6bc5b5cc19455bbd4164ac9
parent 9cd45bac
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -363,7 +363,9 @@ public class CompanionDevicePresenceMonitor implements AssociationStore.OnChange
        @Override
        public void handleMessage(@NonNull Message msg) {
            final int associationId = msg.what;
            if (mSimulated.contains(associationId)) {
                onDeviceGone(mSimulated, associationId, /* sourceLoggingTag */ "simulated");
            }
        }
    }
}