Don't emit DeviceAdded signal when recovering from crash
Currently we emit DeviceAdded
signals for every non-authorized device after we got the D-Bus name (after startup). This means that if a currently unauthorized device was plugged in when the screen was locked, the user then unlocks the screen and does not authorize the device somehow the device will not be authorized. If we then crash, we would re-emit the DeviceAdded
signal and the gnome-shell would authorize the device now.
We could protected against that by having some sort of "journal" where we use the current boot-id and device uid to record un-authorized devices. When the device gets authorized (by us or form the outside) we remove the entry. On restarts we only emit DeviceAdded
signals for devices not in the "journal".