key_nsclient_localbroadcasts default to false
This commit is contained in:
parent
8fec60ea35
commit
8ec3649cea
14 changed files with 19 additions and 19 deletions
|
@ -28,7 +28,7 @@ public class BroadcastAckAlarm {
|
||||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||||
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
||||||
|
|
||||||
if(SP.getBoolean(R.string.key_nsclient_localbroadcasts, true)) {
|
if(SP.getBoolean(R.string.key_nsclient_localbroadcasts, false)) {
|
||||||
bundle = new Bundle();
|
bundle = new Bundle();
|
||||||
bundle.putInt("level", originalAlarm.getLevel());
|
bundle.putInt("level", originalAlarm.getLevel());
|
||||||
bundle.putString("group", originalAlarm.getGroup());
|
bundle.putString("group", originalAlarm.getGroup());
|
||||||
|
|
|
@ -24,7 +24,7 @@ public class BroadcastAlarm {
|
||||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||||
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
||||||
|
|
||||||
if(SP.getBoolean(R.string.key_nsclient_localbroadcasts, true)) {
|
if(SP.getBoolean(R.string.key_nsclient_localbroadcasts, false)) {
|
||||||
bundle = new Bundle();
|
bundle = new Bundle();
|
||||||
bundle.putString("data", alarm.toString());
|
bundle.putString("data", alarm.toString());
|
||||||
intent = new Intent(Intents.ACTION_ALARM);
|
intent = new Intent(Intents.ACTION_ALARM);
|
||||||
|
|
|
@ -24,7 +24,7 @@ public class BroadcastAnnouncement {
|
||||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||||
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
||||||
|
|
||||||
if(SP.getBoolean(R.string.key_nsclient_localbroadcasts, true)) {
|
if(SP.getBoolean(R.string.key_nsclient_localbroadcasts, false)) {
|
||||||
bundle = new Bundle();
|
bundle = new Bundle();
|
||||||
bundle.putString("data", announcement.toString());
|
bundle.putString("data", announcement.toString());
|
||||||
intent = new Intent(Intents.ACTION_ANNOUNCEMENT);
|
intent = new Intent(Intents.ACTION_ANNOUNCEMENT);
|
||||||
|
|
|
@ -26,7 +26,7 @@ public class BroadcastCals {
|
||||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||||
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
||||||
|
|
||||||
if(SP.getBoolean(R.string.key_nsclient_localbroadcasts, true)) {
|
if(SP.getBoolean(R.string.key_nsclient_localbroadcasts, false)) {
|
||||||
bundle = new Bundle();
|
bundle = new Bundle();
|
||||||
bundle.putString("cals", cals.toString());
|
bundle.putString("cals", cals.toString());
|
||||||
bundle.putBoolean("delta", isDelta);
|
bundle.putBoolean("delta", isDelta);
|
||||||
|
|
|
@ -24,7 +24,7 @@ public class BroadcastClearAlarm {
|
||||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||||
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
||||||
|
|
||||||
if(SP.getBoolean(R.string.key_nsclient_localbroadcasts, true)) {
|
if(SP.getBoolean(R.string.key_nsclient_localbroadcasts, false)) {
|
||||||
bundle = new Bundle();
|
bundle = new Bundle();
|
||||||
bundle.putString("data", clearalarm.toString());
|
bundle.putString("data", clearalarm.toString());
|
||||||
intent = new Intent(Intents.ACTION_CLEAR_ALARM);
|
intent = new Intent(Intents.ACTION_CLEAR_ALARM);
|
||||||
|
|
|
@ -29,7 +29,7 @@ public class BroadcastDeviceStatus {
|
||||||
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(SP.getBoolean(R.string.key_nsclient_localbroadcasts, true)) {
|
if(SP.getBoolean(R.string.key_nsclient_localbroadcasts, false)) {
|
||||||
splitted = BroadcastTreatment.splitArray(statuses);
|
splitted = BroadcastTreatment.splitArray(statuses);
|
||||||
for (JSONArray part : splitted) {
|
for (JSONArray part : splitted) {
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class BroadcastFood {
|
||||||
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SP.getBoolean(R.string.key_nsclient_localbroadcasts, true)) {
|
if (SP.getBoolean(R.string.key_nsclient_localbroadcasts, false)) {
|
||||||
for (JSONArray part : splitted) {
|
for (JSONArray part : splitted) {
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
bundle.putString("foods", part.toString());
|
bundle.putString("foods", part.toString());
|
||||||
|
@ -57,7 +57,7 @@ public class BroadcastFood {
|
||||||
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SP.getBoolean(R.string.key_nsclient_localbroadcasts, true)) {
|
if (SP.getBoolean(R.string.key_nsclient_localbroadcasts, false)) {
|
||||||
for (JSONArray part : splitted) {
|
for (JSONArray part : splitted) {
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
bundle.putString("foods", part.toString());
|
bundle.putString("foods", part.toString());
|
||||||
|
@ -81,7 +81,7 @@ public class BroadcastFood {
|
||||||
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
||||||
|
|
||||||
|
|
||||||
if (SP.getBoolean(R.string.key_nsclient_localbroadcasts, true)) {
|
if (SP.getBoolean(R.string.key_nsclient_localbroadcasts, false)) {
|
||||||
bundle = new Bundle();
|
bundle = new Bundle();
|
||||||
bundle.putString("foods", foods.toString());
|
bundle.putString("foods", foods.toString());
|
||||||
bundle.putBoolean("delta", isDelta);
|
bundle.putBoolean("delta", isDelta);
|
||||||
|
|
|
@ -26,7 +26,7 @@ public class BroadcastMbgs {
|
||||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||||
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
||||||
|
|
||||||
if(SP.getBoolean(R.string.key_nsclient_localbroadcasts, true)) {
|
if(SP.getBoolean(R.string.key_nsclient_localbroadcasts, false)) {
|
||||||
bundle = new Bundle();
|
bundle = new Bundle();
|
||||||
bundle.putString("mbgs", mbgs.toString());
|
bundle.putString("mbgs", mbgs.toString());
|
||||||
bundle.putBoolean("delta", isDelta);
|
bundle.putBoolean("delta", isDelta);
|
||||||
|
|
|
@ -26,7 +26,7 @@ public class BroadcastProfile {
|
||||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||||
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
||||||
|
|
||||||
if(SP.getBoolean(R.string.key_nsclient_localbroadcasts, true)) {
|
if(SP.getBoolean(R.string.key_nsclient_localbroadcasts, false)) {
|
||||||
bundle = new Bundle();
|
bundle = new Bundle();
|
||||||
bundle.putString("profile", profile.getData().toString());
|
bundle.putString("profile", profile.getData().toString());
|
||||||
bundle.putBoolean("delta", isDelta);
|
bundle.putBoolean("delta", isDelta);
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class BroadcastSgvs {
|
||||||
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(SP.getBoolean(R.string.key_nsclient_localbroadcasts, true)) {
|
if(SP.getBoolean(R.string.key_nsclient_localbroadcasts, false)) {
|
||||||
for (JSONArray part : splitted) {
|
for (JSONArray part : splitted) {
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
bundle.putString("sgvs", part.toString());
|
bundle.putString("sgvs", part.toString());
|
||||||
|
|
|
@ -27,7 +27,7 @@ public class BroadcastStatus {
|
||||||
LocalBroadcastManager.getInstance(MainApp.instance())
|
LocalBroadcastManager.getInstance(MainApp.instance())
|
||||||
.sendBroadcast(createIntent(status, isDelta));
|
.sendBroadcast(createIntent(status, isDelta));
|
||||||
|
|
||||||
if(SP.getBoolean(R.string.key_nsclient_localbroadcasts, true)) {
|
if(SP.getBoolean(R.string.key_nsclient_localbroadcasts, false)) {
|
||||||
context.sendBroadcast(createIntent(status, isDelta));
|
context.sendBroadcast(createIntent(status, isDelta));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class BroadcastTreatment {
|
||||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||||
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
||||||
|
|
||||||
if (SP.getBoolean(R.string.key_nsclient_localbroadcasts, true)) {
|
if (SP.getBoolean(R.string.key_nsclient_localbroadcasts, false)) {
|
||||||
bundle = new Bundle();
|
bundle = new Bundle();
|
||||||
bundle.putString("treatment", treatment.toString());
|
bundle.putString("treatment", treatment.toString());
|
||||||
bundle.putBoolean("delta", isDelta);
|
bundle.putBoolean("delta", isDelta);
|
||||||
|
@ -60,7 +60,7 @@ public class BroadcastTreatment {
|
||||||
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SP.getBoolean(R.string.key_nsclient_localbroadcasts, true)) {
|
if (SP.getBoolean(R.string.key_nsclient_localbroadcasts, false)) {
|
||||||
splitted = splitArray(treatments);
|
splitted = splitArray(treatments);
|
||||||
for (JSONArray part : splitted) {
|
for (JSONArray part : splitted) {
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
|
@ -87,7 +87,7 @@ public class BroadcastTreatment {
|
||||||
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SP.getBoolean(R.string.key_nsclient_localbroadcasts, true)) {
|
if (SP.getBoolean(R.string.key_nsclient_localbroadcasts, false)) {
|
||||||
splitted = splitArray(treatments);
|
splitted = splitArray(treatments);
|
||||||
for (JSONArray part : splitted) {
|
for (JSONArray part : splitted) {
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
|
@ -112,7 +112,7 @@ public class BroadcastTreatment {
|
||||||
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
||||||
|
|
||||||
|
|
||||||
if (SP.getBoolean(R.string.key_nsclient_localbroadcasts, true)) {
|
if (SP.getBoolean(R.string.key_nsclient_localbroadcasts, false)) {
|
||||||
bundle = new Bundle();
|
bundle = new Bundle();
|
||||||
bundle.putString("treatments", treatments.toString());
|
bundle.putString("treatments", treatments.toString());
|
||||||
bundle.putBoolean("delta", isDelta);
|
bundle.putBoolean("delta", isDelta);
|
||||||
|
|
|
@ -24,7 +24,7 @@ public class BroadcastUrgentAlarm {
|
||||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||||
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
LocalBroadcastManager.getInstance(MainApp.instance()).sendBroadcast(intent);
|
||||||
|
|
||||||
if(SP.getBoolean(R.string.key_nsclient_localbroadcasts, true)) {
|
if(SP.getBoolean(R.string.key_nsclient_localbroadcasts, false)) {
|
||||||
bundle = new Bundle();
|
bundle = new Bundle();
|
||||||
bundle.putString("data", urgentalarm.toString());
|
bundle.putString("data", urgentalarm.toString());
|
||||||
intent = new Intent(Intents.ACTION_URGENT_ALARM);
|
intent = new Intent(Intents.ACTION_URGENT_ALARM);
|
||||||
|
|
|
@ -127,7 +127,7 @@
|
||||||
android:title="@string/ns_create_announcements_from_errors_title" />
|
android:title="@string/ns_create_announcements_from_errors_title" />
|
||||||
|
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:defaultValue="true"
|
android:defaultValue="false"
|
||||||
android:key="@string/key_nsclient_localbroadcasts"
|
android:key="@string/key_nsclient_localbroadcasts"
|
||||||
android:summary="@string/ns_localbroadcasts"
|
android:summary="@string/ns_localbroadcasts"
|
||||||
android:title="@string/ns_localbroadcasts_title" />
|
android:title="@string/ns_localbroadcasts_title" />
|
||||||
|
|
Loading…
Reference in a new issue