mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Update dbus-java
This commit is contained in:
parent
d8d859ab02
commit
425e451237
3 changed files with 5 additions and 3 deletions
|
@ -34,6 +34,7 @@ import org.asamk.signal.output.OutputWriter;
|
|||
import org.asamk.signal.output.PlainTextWriterImpl;
|
||||
import org.asamk.signal.util.IOUtils;
|
||||
import org.freedesktop.dbus.connections.impl.DBusConnection;
|
||||
import org.freedesktop.dbus.connections.impl.DBusConnectionBuilder;
|
||||
import org.freedesktop.dbus.errors.ServiceUnknown;
|
||||
import org.freedesktop.dbus.errors.UnknownMethod;
|
||||
import org.freedesktop.dbus.exceptions.DBusException;
|
||||
|
@ -365,7 +366,7 @@ public class App {
|
|||
} else {
|
||||
busType = DBusConnection.DBusBusType.SESSION;
|
||||
}
|
||||
try (var dBusConn = DBusConnection.getConnection(busType)) {
|
||||
try (var dBusConn = DBusConnectionBuilder.forType(busType).build()) {
|
||||
if (command instanceof ProvisioningCommand c) {
|
||||
if (account != null) {
|
||||
throw new UserErrorException("You cannot specify a account (phone number) when linking");
|
||||
|
|
|
@ -23,6 +23,7 @@ import org.asamk.signal.output.OutputWriter;
|
|||
import org.asamk.signal.output.PlainTextWriter;
|
||||
import org.asamk.signal.util.IOUtils;
|
||||
import org.freedesktop.dbus.connections.impl.DBusConnection;
|
||||
import org.freedesktop.dbus.connections.impl.DBusConnectionBuilder;
|
||||
import org.freedesktop.dbus.exceptions.DBusException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -342,7 +343,7 @@ public class DaemonCommand implements MultiLocalCommand, LocalCommand {
|
|||
}
|
||||
DBusConnection conn;
|
||||
try {
|
||||
conn = DBusConnection.getConnection(busType);
|
||||
conn = DBusConnectionBuilder.forType(busType).build();
|
||||
dbusRunner.run(conn, DbusConfig.getObjectPath());
|
||||
} catch (DBusException e) {
|
||||
throw new UnexpectedErrorException("Dbus command failed: " + e.getMessage(), e);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue