Only notify listeners if device Id changed
Bug: 265262866 Test: atest DeviceAssociationTest Change-Id: I9bc58ca3c36f1b3f82b63a1d88ea1b50a35da0e1
This commit is contained in:
@@ -3053,8 +3053,11 @@ class ContextImpl extends Context {
|
||||
throw new UnsupportedOperationException(
|
||||
"Cannot update device ID on a Context created with createDeviceContext()");
|
||||
}
|
||||
mDeviceId = updatedDeviceId;
|
||||
notifyOnDeviceChangedListeners(updatedDeviceId);
|
||||
|
||||
if (mDeviceId != updatedDeviceId) {
|
||||
mDeviceId = updatedDeviceId;
|
||||
notifyOnDeviceChangedListeners(updatedDeviceId);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user