Merge "Ignore scheduled onDeviceGone call on simulated device if it is already no longer present." into tm-dev am: 534925c288

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20612010

Change-Id: If2d218258c59d45d1581ac8f83569539c1d8ab59
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Liana Kazanova
2022-12-02 21:58:08 +00:00
committed by Automerger Merge Worker

View File

@@ -363,7 +363,9 @@ public class CompanionDevicePresenceMonitor implements AssociationStore.OnChange
@Override
public void handleMessage(@NonNull Message msg) {
final int associationId = msg.what;
onDeviceGone(mSimulated, associationId, /* sourceLoggingTag */ "simulated");
if (mSimulated.contains(associationId)) {
onDeviceGone(mSimulated, associationId, /* sourceLoggingTag */ "simulated");
}
}
}
}