Replace deprecated DBusMap

This commit is contained in:
AsamK 2024-09-08 19:22:02 +02:00
parent a0d1b081ff
commit eca3c6fa30
2 changed files with 35 additions and 4 deletions

View file

@ -799,6 +799,34 @@
"queryAllDeclaredConstructors":true,
"methods":[{"name":"<init>","parameterTypes":["java.lang.String","java.lang.String"] }, {"name":"pin","parameterTypes":[] }, {"name":"verificationCode","parameterTypes":[] }]
},
{
"name":"org.asamk.signal.dbus.DbusProperties",
"queryAllDeclaredMethods":true
},
{
"name":"org.asamk.signal.dbus.DbusSignalControlImpl",
"queryAllDeclaredMethods":true
},
{
"name":"org.asamk.signal.dbus.DbusSignalImpl",
"queryAllDeclaredMethods":true
},
{
"name":"org.asamk.signal.dbus.DbusSignalImpl$DbusSignalConfigurationImpl",
"queryAllDeclaredMethods":true
},
{
"name":"org.asamk.signal.dbus.DbusSignalImpl$DbusSignalDeviceImpl",
"queryAllDeclaredMethods":true
},
{
"name":"org.asamk.signal.dbus.DbusSignalImpl$DbusSignalGroupImpl",
"queryAllDeclaredMethods":true
},
{
"name":"org.asamk.signal.dbus.DbusSignalImpl$DbusSignalIdentityImpl",
"queryAllDeclaredMethods":true
},
{
"name":"org.asamk.signal.json.JsonAttachment",
"allDeclaredFields":true,
@ -1831,6 +1859,10 @@
"name":"org.bouncycastle.pqc.jcajce.provider.XMSS$Mappings",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"org.freedesktop.dbus.connections.base.GlobalHandler",
"queryAllDeclaredMethods":true
},
{
"name":"org.freedesktop.dbus.errors.ServiceUnknown",
"methods":[{"name":"<init>","parameterTypes":["java.lang.String"] }]
@ -1863,7 +1895,7 @@
"name":"org.freedesktop.dbus.interfaces.Properties",
"allDeclaredMethods":true,
"allDeclaredClasses":true,
"methods":[{"name":"Get","parameterTypes":["java.lang.String","java.lang.String"] }, {"name":"GetAll","parameterTypes":["java.lang.String"] }]
"methods":[{"name":"Get","parameterTypes":["java.lang.String","java.lang.String"] }, {"name":"GetAll","parameterTypes":["java.lang.String"] }, {"name":"Set","parameterTypes":["java.lang.String","java.lang.String","java.lang.Object"] }]
},
{
"name":"org.freedesktop.dbus.interfaces.Properties$PropertiesChanged",

View file

@ -49,7 +49,6 @@ import org.asamk.signal.manager.api.UpdateProfile;
import org.asamk.signal.manager.api.UserStatus;
import org.asamk.signal.manager.api.UsernameLinkUrl;
import org.asamk.signal.manager.api.UsernameStatus;
import org.freedesktop.dbus.DBusMap;
import org.freedesktop.dbus.DBusPath;
import org.freedesktop.dbus.connections.impl.DBusConnection;
import org.freedesktop.dbus.exceptions.DBusException;
@ -1063,7 +1062,7 @@ public class DbusManagerImpl implements Manager {
return List.of();
}
final List<DBusMap<String, Variant<?>>> attachments = getValue(extras, "attachments");
final List<Map<String, Variant<?>>> attachments = getValue(extras, "attachments");
return attachments.stream().map(a -> {
final String file = a.containsKey("file") ? getValue(a, "file") : null;
return new MessageEnvelope.Data.Attachment(a.containsKey("remoteId")
@ -1090,7 +1089,7 @@ public class DbusManagerImpl implements Manager {
return List.of();
}
final List<DBusMap<String, Variant<?>>> mentions = getValue(extras, "mentions");
final List<Map<String, Variant<?>>> mentions = getValue(extras, "mentions");
return mentions.stream()
.map(a -> new MessageEnvelope.Data.Mention(new RecipientAddress(this.<String>getValue(a, "recipient")),
getValue(a, "start"),