Add support for sending and receiving multipart SMSes

Authored by sredman on May 16 2017, 7:02 PM.

Description

Add support for sending and receiving multipart SMSes

Summary:
The SMS protocol does not support sending a message longer than 160 characters. Android's SmsManager.sendTextMessage(..) fails to send in case the message is too long.
Instead of failing, check the message length. If it is longer than 160 characters, break it up and send it as several messages

On receive, collect the list of messages, then combine their bodies

Test Plan:
Send a long message via KDE Connect and verify that it is actually sent
Send a short message via KDE Connect and verify that it can also be sent
Ideally: Test sending a message which is the maximum length for an SMS (160 characters) and verify that it is sent as exactly one SMS (And billed properly)

Receive a long message and verify that it is delivered as a single long message, even though we all know that it was transmitted as a multi-part SMS
Receive a short message and verify that it is correctly delivered

Reviewers: KDE Connect, albertvaka

Reviewed By: KDE Connect, albertvaka

Subscribers: albertvaka

Differential Revision: https://phabricator.kde.org/D5848