applied formatting
This commit is contained in:
parent
b9056384f9
commit
b2e70fd801
1 changed files with 4 additions and 5 deletions
|
@ -118,7 +118,7 @@ public class SmsCommunicatorPlugin extends PluginBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean isCommand(String command, String number) {
|
boolean isCommand(String command, String number) {
|
||||||
switch(command.toUpperCase()) {
|
switch (command.toUpperCase()) {
|
||||||
case "BG":
|
case "BG":
|
||||||
case "LOOP":
|
case "LOOP":
|
||||||
case "TREATMENTS":
|
case "TREATMENTS":
|
||||||
|
@ -760,14 +760,13 @@ public class SmsCommunicatorPlugin extends PluginBase {
|
||||||
void sendSMS(Sms sms) {
|
void sendSMS(Sms sms) {
|
||||||
SmsManager smsManager = SmsManager.getDefault();
|
SmsManager smsManager = SmsManager.getDefault();
|
||||||
sms.text = stripAccents(sms.text);
|
sms.text = stripAccents(sms.text);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (L.isEnabled(L.SMS))
|
if (L.isEnabled(L.SMS))
|
||||||
log.debug("Sending SMS to " + sms.phoneNumber + ": " + sms.text);
|
log.debug("Sending SMS to " + sms.phoneNumber + ": " + sms.text);
|
||||||
if (sms.text.getBytes().length<=140)
|
if (sms.text.getBytes().length <= 140)
|
||||||
smsManager.sendTextMessage(sms.phoneNumber, null, sms.text, null, null);
|
smsManager.sendTextMessage(sms.phoneNumber, null, sms.text, null, null);
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
ArrayList<String> parts = smsManager.divideMessage(sms.text);
|
ArrayList<String> parts = smsManager.divideMessage(sms.text);
|
||||||
smsManager.sendMultipartTextMessage(sms.phoneNumber, null, parts,
|
smsManager.sendMultipartTextMessage(sms.phoneNumber, null, parts,
|
||||||
null, null);
|
null, null);
|
||||||
|
|
Loading…
Reference in a new issue