Handle received EventNewBg depending on args.
(cherry picked from commit 79b7a7b)
This commit is contained in:
parent
7f45316a24
commit
ad3bf19e4c
|
@ -531,6 +531,8 @@ public class IobCobCalculatorPlugin implements PluginBase {
|
|||
|
||||
@Subscribe
|
||||
public void onEventNewBG(EventNewBG ev) {
|
||||
if (!ev.isActiveBgSource)
|
||||
return;
|
||||
if (this != getPlugin()) {
|
||||
log.debug("Ignoring event for non default instance");
|
||||
return;
|
||||
|
|
|
@ -142,6 +142,8 @@ public class WizardDialog extends DialogFragment implements OnClickListener, Com
|
|||
|
||||
@Subscribe
|
||||
public void onStatusEvent(final EventNewBG e) {
|
||||
if (!e.isActiveBgSource || !e.isNew)
|
||||
return;
|
||||
Activity activity = getActivity();
|
||||
if (activity != null)
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
|
|
|
@ -255,7 +255,8 @@ public class PersistentNotificationPlugin implements PluginBase {
|
|||
|
||||
@Subscribe
|
||||
public void onStatusEvent(final EventNewBG ev) {
|
||||
updateNotification();
|
||||
if (ev.isActiveBgSource && ev.isNew)
|
||||
updateNotification();
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
|
|
|
@ -182,7 +182,8 @@ public class WearPlugin implements PluginBase {
|
|||
|
||||
@Subscribe
|
||||
public void onStatusEvent(final EventNewBG ev) {
|
||||
sendDataToWatch(true, true, true);
|
||||
if (ev.isActiveBgSource)
|
||||
sendDataToWatch(true, true, true);
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
|
|
|
@ -235,7 +235,8 @@ public class StatuslinePlugin implements PluginBase {
|
|||
|
||||
@Subscribe
|
||||
public void onStatusEvent(final EventNewBG ev) {
|
||||
sendStatus();
|
||||
if (ev.isActiveBgSource && ev.isNew)
|
||||
sendStatus();
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
|
|
Loading…
Reference in a new issue