Refactor dbus linked devices interface

Export a separate dbus object for each device
This commit is contained in:
AsamK 2021-10-02 18:04:30 +02:00
parent 1548ce9c79
commit 778adacb80
8 changed files with 157 additions and 38 deletions

View file

@ -117,7 +117,7 @@ public interface Manager extends Closeable {
List<Device> getLinkedDevices() throws IOException;
void removeLinkedDevices(int deviceId) throws IOException;
void removeLinkedDevices(long deviceId) throws IOException;
void addDeviceLink(URI linkUri) throws IOException, InvalidKeyException;

View file

@ -414,7 +414,7 @@ public class ManagerImpl implements Manager {
}
@Override
public void removeLinkedDevices(int deviceId) throws IOException {
public void removeLinkedDevices(long deviceId) throws IOException {
dependencies.getAccountManager().removeDevice(deviceId);
var devices = dependencies.getAccountManager().getDevices();
account.setMultiDevice(devices.size() > 1);