log invoke() source
This commit is contained in:
parent
6621c2f610
commit
66bd06076e
|
@ -11,5 +11,5 @@ public interface APSInterface {
|
|||
public APSResult getLastAPSResult();
|
||||
public Date getLastAPSRun();
|
||||
|
||||
public void invoke();
|
||||
public void invoke(String initiator);
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ public class LoopFragment extends Fragment implements View.OnClickListener, Frag
|
|||
public void onClick(View view) {
|
||||
switch (view.getId()) {
|
||||
case R.id.loop_run:
|
||||
getPlugin().invoke(true);
|
||||
getPlugin().invoke("Loop button", true);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -108,15 +108,15 @@ public class LoopPlugin implements PluginBase {
|
|||
|
||||
@Subscribe
|
||||
public void onStatusEvent(final EventTreatmentChange ev) {
|
||||
invoke(true);
|
||||
invoke("EventTreatmentChange", true);
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onStatusEvent(final EventNewBG ev) {
|
||||
invoke(true);
|
||||
invoke("EventNewBG", true);
|
||||
}
|
||||
|
||||
public void invoke(boolean allowNotification) {
|
||||
public void invoke(String initiator, boolean allowNotification) {
|
||||
try {
|
||||
if (Config.logFunctionCalls)
|
||||
log.debug("invoke");
|
||||
|
@ -136,7 +136,7 @@ public class LoopPlugin implements PluginBase {
|
|||
|
||||
APSInterface usedAPS = configBuilder.getActiveAPS();
|
||||
if (usedAPS != null && ((PluginBase) usedAPS).isEnabled(PluginBase.APS)) {
|
||||
usedAPS.invoke();
|
||||
usedAPS.invoke(initiator);
|
||||
result = usedAPS.getLastAPSResult();
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ public class OpenAPSAMAFragment extends Fragment implements View.OnClickListener
|
|||
public void onClick(View view) {
|
||||
switch (view.getId()) {
|
||||
case R.id.openapsma_run:
|
||||
getPlugin().invoke();
|
||||
getPlugin().invoke("OpenAPSAMA button");
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -99,7 +99,8 @@ public class OpenAPSAMAPlugin implements PluginBase, APSInterface {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void invoke() {
|
||||
public void invoke(String initiator) {
|
||||
log.debug("invoke from " + initiator);
|
||||
lastAPSResult = null;
|
||||
DetermineBasalAdapterAMAJS determineBasalAdapterAMAJS = null;
|
||||
try {
|
||||
|
|
|
@ -67,7 +67,7 @@ public class OpenAPSMAFragment extends Fragment implements View.OnClickListener,
|
|||
public void onClick(View view) {
|
||||
switch (view.getId()) {
|
||||
case R.id.openapsma_run:
|
||||
getPlugin().invoke();
|
||||
getPlugin().invoke("OpenAPSMA button");
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -97,7 +97,8 @@ public class OpenAPSMAPlugin implements PluginBase, APSInterface {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void invoke() {
|
||||
public void invoke(String initiator) {
|
||||
log.debug("invoke from " + initiator);
|
||||
lastAPSResult = null;
|
||||
DetermineBasalAdapterMAJS determineBasalAdapterMAJS = null;
|
||||
try {
|
||||
|
|
|
@ -214,7 +214,7 @@ public class OverviewFragment extends Fragment {
|
|||
acceptTempButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
MainApp.getConfigBuilder().getActiveLoop().invoke(false);
|
||||
MainApp.getConfigBuilder().getActiveLoop().invoke("Accept temp button", false);
|
||||
final LoopPlugin.LastRun finalLastRun = LoopPlugin.lastRun;
|
||||
if (finalLastRun != null && finalLastRun.lastAPSRun != null && finalLastRun.constraintsProcessed.changeRequested) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
|
||||
|
|
Loading…
Reference in a new issue