Ignore scheduled onDeviceGone call on simulated device if it is already no longer present.
Bug: 253637009
Test: atest CtsCompanionDeviceManagerCoreTestCases
atest CtsCompanionDeviceManagerUiAutomationTestCases
Change-Id: Ia7f5eabde8879ff4f6bc5b5cc19455bbd4164ac9
This commit is contained in:
@@ -363,7 +363,9 @@ public class CompanionDevicePresenceMonitor implements AssociationStore.OnChange
|
|||||||
@Override
|
@Override
|
||||||
public void handleMessage(@NonNull Message msg) {
|
public void handleMessage(@NonNull Message msg) {
|
||||||
final int associationId = msg.what;
|
final int associationId = msg.what;
|
||||||
onDeviceGone(mSimulated, associationId, /* sourceLoggingTag */ "simulated");
|
if (mSimulated.contains(associationId)) {
|
||||||
|
onDeviceGone(mSimulated, associationId, /* sourceLoggingTag */ "simulated");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user