Fix checking if association's MAC address changed in AssociationStoreImpl

Test: atest CtsCompanionDeviceManagerCoreTestCases
Test: atest CtsCompanionDeviceManagerUiAutomationTestCases
Test: atest CtsOsTestCases:CompanionDeviceManagerTest
Change-Id: I8360035a793d1ba8a4f736e2b0d894decf337a26
This commit is contained in:
Sergey Nikolaienkov
2022-01-31 10:31:09 +01:00
parent 2d0e9deee6
commit 895defc396

View File

@@ -125,7 +125,7 @@ class AssociationStoreImpl implements AssociationStore {
// Update the MacAddress-to-List<Association> map if needed.
final MacAddress updatedAddress = updated.getDeviceMacAddress();
final MacAddress currentAddress = current.getDeviceMacAddress();
macAddressChanged = Objects.equals(currentAddress, updatedAddress);
macAddressChanged = !Objects.equals(currentAddress, updatedAddress);
if (macAddressChanged) {
if (currentAddress != null) {
mAddressMap.get(currentAddress).remove(id);