Commit 42668340 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

[sms] Restore compatibility with current Android release

The current code requires the multitarget support. This is only available in the yet-to-be-released Android version.
Fall back to the old style packet format as a quick fix for 20.08 before we can implement a proper solution in master.

BUG: 427266
parent 436607ff
Pipeline #38021 passed with stage
in 14 minutes and 27 seconds
......@@ -59,26 +59,15 @@ bool SmsPlugin::receivePacket(const NetworkPacket& np)
void SmsPlugin::sendSms(const QDBusVariant& addresses, const QString& messageBody, const qint64 subID)
QList<ConversationAddress> addressList = ConversationAddress::listfromDBus(addresses);
const QList<ConversationAddress> addressList = ConversationAddress::listfromDBus(addresses);
QVariantList addressMapList;
for (const ConversationAddress address : addressList) {
QVariantMap addressMap({{QStringLiteral("address"), address.address()}});
qDebug() <<address.address();
if (addressList.isEmpty()) {
qCDebug(KDECONNECT_PLUGIN_SMS) << "Empty address list";
QVariantMap packetMap({
{QStringLiteral("sendSms"), true},
{QStringLiteral("addresses"), addressMapList},
{QStringLiteral("messageBody"), messageBody}
if (subID != -1) {
packetMap[QStringLiteral("subID")] = subID;
NetworkPacket np(PACKET_TYPE_SMS_REQUEST, packetMap);
qCDebug(KDECONNECT_PLUGIN_SMS) << "Dispatching SMS send request to remote";
sendSms(addressList.first().address(), messageBody);
void SmsPlugin::sendSms(const QString& address, const QString& messageBody)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment