2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-30 05:37:43 +00:00

Use stringbuilder

This commit is contained in:
Albert Vaca 2018-01-17 00:05:57 +01:00
parent 4b21d67da0
commit 1b62a5ae32

View File

@ -233,16 +233,11 @@ public class TelephonyPlugin extends Plugin {
np.set("event","sms");
String messageBody = new String();
for (int index = 0; index < messages.size(); index ++)
{
messageBody += messages.get(index).getMessageBody();
}
if (messageBody != null) {
np.set("messageBody",messageBody);
StringBuilder messageBody = new StringBuilder();
for (int index = 0; index < messages.size(); index ++) {
messageBody.append(messages.get(index).getMessageBody());
}
np.set("messageBody", messageBody.toString());
String phoneNumber = messages.get(0).getOriginatingAddress();