Update SmsCommunicatorPlugin.java
This commit is contained in:
parent
a49afea27c
commit
79a6b65bb9
|
@ -167,6 +167,7 @@ public class SmsCommunicatorPlugin implements PluginBase {
|
||||||
if (loopPlugin != null && loopPlugin.isEnabled(PluginBase.LOOP)) {
|
if (loopPlugin != null && loopPlugin.isEnabled(PluginBase.LOOP)) {
|
||||||
loopPlugin.setFragmentEnabled(PluginBase.LOOP, false);
|
loopPlugin.setFragmentEnabled(PluginBase.LOOP, false);
|
||||||
reply = MainApp.sResources.getString(R.string.smscommunicator_loophasbeendisabled);
|
reply = MainApp.sResources.getString(R.string.smscommunicator_loophasbeendisabled);
|
||||||
|
newSms = new Sms(receivedSms.phoneNumber, reply, new Date());
|
||||||
}
|
}
|
||||||
receivedSms.processed = true;
|
receivedSms.processed = true;
|
||||||
break;
|
break;
|
||||||
|
@ -175,6 +176,7 @@ public class SmsCommunicatorPlugin implements PluginBase {
|
||||||
if (loopPlugin != null && !loopPlugin.isEnabled(PluginBase.LOOP)) {
|
if (loopPlugin != null && !loopPlugin.isEnabled(PluginBase.LOOP)) {
|
||||||
loopPlugin.setFragmentEnabled(PluginBase.LOOP, true);
|
loopPlugin.setFragmentEnabled(PluginBase.LOOP, true);
|
||||||
reply = MainApp.sResources.getString(R.string.smscommunicator_loophasbeenenabled);
|
reply = MainApp.sResources.getString(R.string.smscommunicator_loophasbeenenabled);
|
||||||
|
newSms = new Sms(receivedSms.phoneNumber, reply, new Date());
|
||||||
}
|
}
|
||||||
receivedSms.processed = true;
|
receivedSms.processed = true;
|
||||||
break;
|
break;
|
||||||
|
@ -186,6 +188,7 @@ public class SmsCommunicatorPlugin implements PluginBase {
|
||||||
} else {
|
} else {
|
||||||
reply = MainApp.sResources.getString(R.string.smscommunicator_loopisdisabled);
|
reply = MainApp.sResources.getString(R.string.smscommunicator_loopisdisabled);
|
||||||
}
|
}
|
||||||
|
newSms = new Sms(receivedSms.phoneNumber, reply, new Date());
|
||||||
}
|
}
|
||||||
receivedSms.processed = true;
|
receivedSms.processed = true;
|
||||||
break;
|
break;
|
||||||
|
@ -199,6 +202,7 @@ public class SmsCommunicatorPlugin implements PluginBase {
|
||||||
MainApp.instance().getApplicationContext().sendBroadcast(restartNSClient);
|
MainApp.instance().getApplicationContext().sendBroadcast(restartNSClient);
|
||||||
List<ResolveInfo> q = MainApp.instance().getApplicationContext().getPackageManager().queryBroadcastReceivers(restartNSClient, 0);
|
List<ResolveInfo> q = MainApp.instance().getApplicationContext().getPackageManager().queryBroadcastReceivers(restartNSClient, 0);
|
||||||
reply = "TERATMENTS REFRESH " + q.size() + " receivers";
|
reply = "TERATMENTS REFRESH " + q.size() + " receivers";
|
||||||
|
newSms = new Sms(receivedSms.phoneNumber, reply, new Date());
|
||||||
receivedSms.processed = true;
|
receivedSms.processed = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -210,6 +214,7 @@ public class SmsCommunicatorPlugin implements PluginBase {
|
||||||
MainApp.instance().getApplicationContext().sendBroadcast(restartNSClient);
|
MainApp.instance().getApplicationContext().sendBroadcast(restartNSClient);
|
||||||
List<ResolveInfo> q = MainApp.instance().getApplicationContext().getPackageManager().queryBroadcastReceivers(restartNSClient, 0);
|
List<ResolveInfo> q = MainApp.instance().getApplicationContext().getPackageManager().queryBroadcastReceivers(restartNSClient, 0);
|
||||||
reply = "NSCLIENT RESTART " + q.size() + " receivers";
|
reply = "NSCLIENT RESTART " + q.size() + " receivers";
|
||||||
|
newSms = new Sms(receivedSms.phoneNumber, reply, new Date());
|
||||||
receivedSms.processed = true;
|
receivedSms.processed = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -218,6 +223,7 @@ public class SmsCommunicatorPlugin implements PluginBase {
|
||||||
DanaRPlugin danaRPlugin = (DanaRPlugin) MainApp.getSpecificPlugin(DanaRPlugin.class);
|
DanaRPlugin danaRPlugin = (DanaRPlugin) MainApp.getSpecificPlugin(DanaRPlugin.class);
|
||||||
if (danaRPlugin != null && danaRPlugin.isEnabled(PluginBase.PUMP))
|
if (danaRPlugin != null && danaRPlugin.isEnabled(PluginBase.PUMP))
|
||||||
reply = danaRPlugin.shortStatus();
|
reply = danaRPlugin.shortStatus();
|
||||||
|
newSms = new Sms(receivedSms.phoneNumber, reply, new Date());
|
||||||
receivedSms.processed = true;
|
receivedSms.processed = true;
|
||||||
break;
|
break;
|
||||||
case "BASAL":
|
case "BASAL":
|
||||||
|
|
Loading…
Reference in a new issue