refresh treatments over SMS
This commit is contained in:
parent
6147a71dd7
commit
b361d99f03
1 changed files with 9 additions and 1 deletions
|
@ -186,10 +186,18 @@ public class SmsCommunicatorFragment extends Fragment implements PluginBase {
|
||||||
|
|
||||||
if (splited.length > 0) {
|
if (splited.length > 0) {
|
||||||
switch (splited[0].toUpperCase()) {
|
switch (splited[0].toUpperCase()) {
|
||||||
case "RNSC":
|
case "RT":
|
||||||
Intent restartNSClient = new Intent(Intents.ACTION_RESTART);
|
Intent restartNSClient = new Intent(Intents.ACTION_RESTART);
|
||||||
|
MainApp.getDbHelper().resetTreatments();
|
||||||
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 = "RT " + q.size() + " receivers";
|
||||||
|
receivedSms.processed = true;
|
||||||
|
break;
|
||||||
|
case "RNSC":
|
||||||
|
restartNSClient = new Intent(Intents.ACTION_RESTART);
|
||||||
|
MainApp.instance().getApplicationContext().sendBroadcast(restartNSClient);
|
||||||
|
q = MainApp.instance().getApplicationContext().getPackageManager().queryBroadcastReceivers(restartNSClient, 0);
|
||||||
reply = "RNSC " + q.size() + " receivers";
|
reply = "RNSC " + q.size() + " receivers";
|
||||||
receivedSms.processed = true;
|
receivedSms.processed = true;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue