Device support: Make "replaced" semantics more sensible.
When adding a device whose id is already in the list, we interpret this as an update. So far, so good. However, the current code implements this rather simplistically by just doing remove+add, which potentially puts the device into a different position in the list and also emits "added" and "removed" signals for the respective id, which is conceptually wrong. The new implementation distinguishes the two cases more carefully. Change-Id: Id2480947141e4515606adfd3e0d84f65fe7b9cc5 Reviewed-by: Jarek Kobus <email@example.com> Reviewed-by: Tobias Hunger <firstname.lastname@example.org>