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

Commit e45ccc92 authored by Marco Loaiza's avatar Marco Loaiza
Browse files

Only notify listeners if device Id changed

Bug: 265262866
Test: atest DeviceAssociationTest
Change-Id: I9bc58ca3c36f1b3f82b63a1d88ea1b50a35da0e1
parent 6529d77f
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -3053,9 +3053,12 @@ class ContextImpl extends Context {
            throw new UnsupportedOperationException(
                    "Cannot update device ID on a Context created with createDeviceContext()");
        }

        if (mDeviceId != updatedDeviceId) {
            mDeviceId = updatedDeviceId;
            notifyOnDeviceChangedListeners(updatedDeviceId);
        }
    }

    @Override
    public int getDeviceId() {