Confirm pump plugin activation for all hardware pumps (MDT, Insight).
This commit is contained in:
parent
cf1bcf9943
commit
d9de09d7f0
|
@ -2,6 +2,8 @@ package info.nightscout.androidaps.plugins.pump.common;
|
|||
|
||||
import java.util.Date;
|
||||
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderFragment;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -105,6 +107,10 @@ public abstract class PumpPluginAbstract extends PluginBase implements PumpInter
|
|||
*/
|
||||
public abstract void onStartCustomActions();
|
||||
|
||||
@Override
|
||||
public void switchAllowed(ConfigBuilderFragment.PluginViewHolder.PluginSwitcher pluginSwitcher, FragmentActivity activity) {
|
||||
confirmPumpPluginActivation(pluginSwitcher, activity);
|
||||
}
|
||||
|
||||
/**
|
||||
* Service class (same one you did serviceConnection for)
|
||||
|
|
|
@ -8,7 +8,9 @@ import android.os.Handler;
|
|||
import android.os.IBinder;
|
||||
import android.os.Looper;
|
||||
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import info.nightscout.androidaps.plugins.common.ManufacturerType;
|
||||
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderFragment;
|
||||
import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction;
|
||||
import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType;
|
||||
import info.nightscout.androidaps.plugins.pump.insight.app_layer.parameter_blocks.*;
|
||||
|
@ -229,6 +231,11 @@ public class LocalInsightPlugin extends PluginBase implements PumpInterface, Con
|
|||
MainApp.instance().unbindService(serviceConnection);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void switchAllowed(ConfigBuilderFragment.PluginViewHolder.PluginSwitcher pluginSwitcher, FragmentActivity activity) {
|
||||
confirmPumpPluginActivation(pluginSwitcher, activity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInitialized() {
|
||||
return connectionService != null && alertService != null && connectionService.isPaired();
|
||||
|
|
Loading…
Reference in a new issue