fix casting after refactor
This commit is contained in:
parent
39894cdc40
commit
0e6185064a
3 changed files with 6 additions and 7 deletions
|
@ -39,7 +39,6 @@ import info.nightscout.androidaps.interfaces.TempBasalsInterface;
|
||||||
import info.nightscout.androidaps.interfaces.TreatmentsInterface;
|
import info.nightscout.androidaps.interfaces.TreatmentsInterface;
|
||||||
import info.nightscout.androidaps.plugins.Loop.APSResult;
|
import info.nightscout.androidaps.plugins.Loop.APSResult;
|
||||||
import info.nightscout.androidaps.plugins.Loop.DeviceStatus;
|
import info.nightscout.androidaps.plugins.Loop.DeviceStatus;
|
||||||
import info.nightscout.androidaps.plugins.Loop.LoopFragment;
|
|
||||||
import info.nightscout.androidaps.plugins.Loop.LoopPlugin;
|
import info.nightscout.androidaps.plugins.Loop.LoopPlugin;
|
||||||
import info.nightscout.androidaps.plugins.OpenAPSMA.DetermineBasalResult;
|
import info.nightscout.androidaps.plugins.OpenAPSMA.DetermineBasalResult;
|
||||||
import info.nightscout.androidaps.plugins.Overview.Dialogs.BolusProgressDialog;
|
import info.nightscout.androidaps.plugins.Overview.Dialogs.BolusProgressDialog;
|
||||||
|
@ -690,7 +689,7 @@ public class ConfigBuilderPlugin implements PluginBase, PumpInterface, Constrain
|
||||||
intent.putExtras(bundle);
|
intent.putExtras(bundle);
|
||||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||||
context.sendBroadcast(intent);
|
context.sendBroadcast(intent);
|
||||||
DbLogger.dbAdd(intent, data.toString(), ConfigBuilderFragment.class);
|
DbLogger.dbAdd(intent, data.toString(), ConfigBuilderPlugin.class);
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
@ -719,7 +718,7 @@ public class ConfigBuilderPlugin implements PluginBase, PumpInterface, Constrain
|
||||||
intent.putExtras(bundle);
|
intent.putExtras(bundle);
|
||||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||||
context.sendBroadcast(intent);
|
context.sendBroadcast(intent);
|
||||||
DbLogger.dbAdd(intent, data.toString(), ConfigBuilderFragment.class);
|
DbLogger.dbAdd(intent, data.toString(), ConfigBuilderPlugin.class);
|
||||||
}
|
}
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -741,7 +740,7 @@ public class ConfigBuilderPlugin implements PluginBase, PumpInterface, Constrain
|
||||||
intent.putExtras(bundle);
|
intent.putExtras(bundle);
|
||||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||||
context.sendBroadcast(intent);
|
context.sendBroadcast(intent);
|
||||||
DbLogger.dbAdd(intent, data.toString(), ConfigBuilderFragment.class);
|
DbLogger.dbAdd(intent, data.toString(), ConfigBuilderPlugin.class);
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
@ -767,7 +766,7 @@ public class ConfigBuilderPlugin implements PluginBase, PumpInterface, Constrain
|
||||||
intent.putExtras(bundle);
|
intent.putExtras(bundle);
|
||||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||||
context.sendBroadcast(intent);
|
context.sendBroadcast(intent);
|
||||||
DbLogger.dbAdd(intent, data.toString(), ConfigBuilderFragment.class);
|
DbLogger.dbAdd(intent, data.toString(), ConfigBuilderPlugin.class);
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class LoopPlugin implements PluginBase {
|
||||||
|
|
||||||
public LoopPlugin() {
|
public LoopPlugin() {
|
||||||
if (sHandlerThread == null) {
|
if (sHandlerThread == null) {
|
||||||
sHandlerThread = new HandlerThread(LoopFragment.class.getSimpleName());
|
sHandlerThread = new HandlerThread(LoopPlugin.class.getSimpleName());
|
||||||
sHandlerThread.start();
|
sHandlerThread.start();
|
||||||
sHandler = new Handler(sHandlerThread.getLooper());
|
sHandler = new Handler(sHandlerThread.getLooper());
|
||||||
}
|
}
|
||||||
|
|
|
@ -199,7 +199,7 @@ public class SmsCommunicatorPlugin implements PluginBase {
|
||||||
bolusWaitingForConfirmation.processed = true;
|
bolusWaitingForConfirmation.processed = true;
|
||||||
PumpInterface pumpInterface = MainApp.getConfigBuilder();
|
PumpInterface pumpInterface = MainApp.getConfigBuilder();
|
||||||
if (pumpInterface != null) {
|
if (pumpInterface != null) {
|
||||||
danaRPlugin = (DanaRPlugin) MainApp.getSpecificPlugin(DanaRFragment.class);
|
danaRPlugin = (DanaRPlugin) MainApp.getSpecificPlugin(DanaRPlugin.class);
|
||||||
PumpEnactResult result = pumpInterface.deliverTreatment(bolusWaitingForConfirmation.bolusRequested, 0, null);
|
PumpEnactResult result = pumpInterface.deliverTreatment(bolusWaitingForConfirmation.bolusRequested, 0, null);
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
reply = String.format(MainApp.sResources.getString(R.string.bolusdelivered), bolusWaitingForConfirmation.bolusRequested);
|
reply = String.format(MainApp.sResources.getString(R.string.bolusdelivered), bolusWaitingForConfirmation.bolusRequested);
|
||||||
|
|
Loading…
Reference in a new issue